Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Database operation method and device

An operation method and technology for operating equipment, applied in the database field, can solve the problems of increasing the workload and difficulty of developers, fewer host languages, and low versatility, and achieve a universal effect

Inactive Publication Date: 2013-05-08
HUAWEI TECH CO LTD
View PDF4 Cites 25 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The disadvantage of static SQL is that it needs to precompile source files, which increases the workload and difficulty of developers, and currently there are few host languages ​​that support static SQL, and the versatility is low

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Database operation method and device
  • Database operation method and device
  • Database operation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0067] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0068] The user program of dynamic SQL is written in pure host language. Every time the user program is called, the SQL text in the program is sent to the database, and the database library compiles it to generate a corresponding execution plan. The following program 1 is written in Java language and adopts User program fragment for dynamic SQL:

[0069] Procedure 1:

[0070]

[0071] As shown in Program 1, the SQL text is pure Java language. In dynamic SQL, i...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a database operation method and a device. The method comprises the steps of receiving a structured query language (SQL) text, judging whether SQL sentences in the SQL text is predefined SQL sentences in predefined SQL grammar, wherein the predefined SQL sentences in the predefined SQL grammar and corresponding original SQL sentences in original SQL grammar correspond to the same execution plan, if the SQL sentences are the predefined SQL sentences in the predefined SQL grammar, inquiring an execution plan bond by the SQL sentences in a corresponding relation table of the predefined SQL sentences and execution plans, executing the execution plan, and returning a corresponding result to a client side. The database operation method has generality and is free of affecting stability of a database system.

Description

technical field [0001] The invention relates to the field of databases, in particular to a database operation method and equipment. Background technique [0002] A relational database is a database built on a relational model. At present, the main relational database products include Oracle, DB2, SQL Server, PostgreSQL, and MYSQL. Structured Query Language (Structured Query Language, SQL) is the main user program interface language of various relational databases. User programs can implement operations such as query, insertion, deletion, and update of data in various relational databases through SQL. These operations are collectively referred to as operations on the database in this article. SQL text is embedded in user programs (source files) written in various host languages ​​such as C, C++, Java, Pathon, etc. At present, the main ways to use SQL to query and manipulate data are dynamic SQL and static SQL. [0003] Dynamic SQL means that every time the user program is ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30G06F9/44
Inventor 张仲良
Owner HUAWEI TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products