CN117331963A - Data access processing method and device, electronic equipment and storage medium - Google Patents

Data access processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117331963A
CN117331963A CN202311597223.6A CN202311597223A CN117331963A CN 117331963 A CN117331963 A CN 117331963A CN 202311597223 A CN202311597223 A CN 202311597223A CN 117331963 A CN117331963 A CN 117331963A
Authority
CN
China
Prior art keywords
database
identifier
target
access
statement
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311597223.6A
Other languages
Chinese (zh)
Other versions
CN117331963B (en
Inventor
赵其桂
谢鹏
张敏
张君华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202311597223.6A priority Critical patent/CN117331963B/en
Publication of CN117331963A publication Critical patent/CN117331963A/en
Application granted granted Critical
Publication of CN117331963B publication Critical patent/CN117331963B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data access processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring a database access statement, wherein the database access statement is written according to an identifier rule of a second database; analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement; and determining an access result of the database access statement based on the target grammar tree and a pre-created target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database. According to the method and the device, through improvement of grammar analysis and a system table in a kernel system of the first database, the first database presents a compatible mode of the second database, service codes do not need to be maintained again according to the characteristics of the databases, and therefore development and maintenance efficiency of the databases is improved.

Description

Data access processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of database technologies, and in particular, to a data access processing method, a device, an electronic apparatus, and a storage medium.
Background
At present, most business systems are developed and designed by taking an Oracle database as a base, but with the development of internet technology, more databases are adapted to businesses, more code versions are required to be maintained, and the data security problem is getting worse. The common problem is that in the process of importing data of one database into another database, the data actually stored in the databases have differences due to the differences of the characteristics of the two databases. The results obtained by querying the database in the same service and the same code section are different, which finally results in the logic exception of the whole service execution.
The prior art solves the above-mentioned problems mainly by not using special symbols to process the identifiers when creating database objects, or by using special symbols to process the identifiers. In the mode of processing the identifier without using special symbols, a developer needs to know the case of the identifier returned by each query statement, so that logic judgment conforming to expectations is written, and a correct execution result is obtained. In the way identifiers are processed using special symbols, special symbols need to be added when creating database objects and referencing database objects, and corresponding special symbols are added when querying data to retrieve the correct results in the database.
However, whatever the above-described method, the service code needs to be re-maintained according to the characteristics of the database, resulting in inefficiency in the development and maintenance of the database.
Disclosure of Invention
The present invention aims to provide a data access processing method, a device, an electronic device and a storage medium, which solve the problem that in the prior art, service codes need to be re-maintained according to the characteristics of a database, resulting in low development and maintenance efficiency of the database.
In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
in a first aspect, an embodiment of the present application provides a data access processing method, where the method includes:
acquiring a database access statement, wherein the database access statement is written according to an identifier rule of a second database;
analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement;
and determining an access result of the database access statement based on the target grammar tree and a pre-created target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database.
As a possible implementation manner, the parsing the database access sentence based on the identifier rule of the second database to obtain a target syntax tree corresponding to the database access sentence includes:
performing lexical analysis on the database access statement based on the identifier rule of the second database to obtain a lexical analysis result of the database access statement;
and carrying out grammar analysis on the lexical analysis result to obtain the target grammar tree.
As a possible implementation manner, the performing lexical analysis on the database access sentence based on the identifier rule of the second database to obtain a lexical analysis result of the database access sentence includes:
determining a regular expression of the database access statement;
and obtaining a lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database.
As a possible implementation manner, the second database is an Oracle database;
the obtaining the lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database comprises the following steps:
If the regular expression of the target identifier in the database access statement is matched with the regular rule corresponding to the identifier containing the double-quotation mark, taking the characters except the double quotation mark in the target identifier as the lexical analysis result of the target identifier, wherein the target identifier is any identifier in the database access statement;
and if the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without the double-quotation marks, converting the characters in the target identifier into capitalized characters to obtain a lexical analysis result of the target identifier.
As a possible implementation manner, the determining, based on the target syntax tree and a target system table created in advance, an access result of the database access statement includes:
searching each identifier in the target grammar tree from the target system table to obtain an identifier searching result;
and determining the access result of the database access statement according to the identifier search result.
As a possible implementation manner, the determining the access result of the database access statement according to the identifier lookup result includes:
If the identifier lookup result indicates that at least one identifier in the target grammar tree does not exist in the target system table, determining that the access result is access failure;
otherwise, according to the target grammar tree, accessing at least one data table in the first database to obtain an access result.
As a possible implementation manner, before the obtaining the database access statement, the method further includes:
instantiation of the first database is performed based on the identifier rules of the second database.
As a possible implementation manner, the instantiating the first database based on the identifier rule of the second database includes:
generating the target system table based on identifier rules of the second database;
generating an initialization script of the first database based on the identifier rule of the second database;
and running the initialization script based on the target system table.
As a possible implementation manner, the generating the target system table based on the identifier rule of the second database includes:
and when the second database is an Oracle database, converting characters in each identifier in the initial system table into capital characters to obtain the target system table.
As a possible implementation manner, the method further includes:
obtaining a database update statement, wherein the database update statement is used for creating a new data table in the first database or updating a table name or a field name of the data table in the first database;
and writing data into the target system table according to the identifier rule of the second database according to the database update statement.
In a second aspect, an embodiment of the present application provides a data access processing apparatus, applied to a kernel system of a first database, where the apparatus includes:
the acquisition module is used for acquiring database access sentences which are written according to identifier rules of the second database;
the analysis module is used for analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement;
the determining module is used for determining an access result of the database access statement based on the target grammar tree and a pre-established target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database.
As a possible implementation manner, the parsing module is specifically configured to:
performing lexical analysis on the database access statement based on the identifier rule of the second database to obtain a lexical analysis result of the database access statement;
and carrying out grammar analysis on the lexical analysis result to obtain the target grammar tree.
As a possible implementation manner, the parsing module is further configured to:
determining a regular expression of the database access statement;
and obtaining a lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database.
As a possible implementation manner, the second database is an Oracle database, and the parsing module is further configured to:
if the regular expression of the target identifier in the database access statement is matched with the regular rule corresponding to the identifier containing the double-quotation mark, taking the characters except the double quotation mark in the target identifier as the lexical analysis result of the target identifier, wherein the target identifier is any identifier in the database access statement;
and if the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without the double-quotation marks, converting the characters in the target identifier into capitalized characters to obtain a lexical analysis result of the target identifier.
As a possible implementation manner, the determining module is specifically configured to:
searching each identifier in the target grammar tree from the target system table to obtain an identifier searching result;
and determining the access result of the database access statement according to the identifier search result.
As a possible implementation manner, the determining module is further configured to:
if the identifier lookup result indicates that at least one identifier in the target grammar tree does not exist in the target system table, determining that the access result is access failure;
otherwise, according to the target grammar tree, accessing at least one data table in the first database to obtain an access result.
As a possible implementation manner, the apparatus further includes:
and the instantiation module is used for instantiating the first database based on the identifier rule of the second database.
As a possible implementation manner, the instantiation module is specifically configured to:
generating the target system table based on identifier rules of the second database;
generating an initialization script of the first database based on the identifier rule of the second database;
And running the initialization script based on the target system table.
As a possible implementation manner, the instantiation module is further configured to:
and when the second database is an Oracle database, converting characters in each identifier in the initial system table into capital characters to obtain the target system table.
As a possible implementation manner, the instantiation module is further configured to:
obtaining a database update statement, wherein the database update statement is used for creating a new data table in the first database or updating a table name or a field name of the data table in the first database;
and writing data into the target system table according to the identifier rule of the second database according to the database update statement.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the steps of the data access processing method according to any of the first aspects above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data access processing method according to any of the first aspects described above.
According to the data access processing method, the device, the electronic equipment and the storage medium, in a kernel system of a first database, database access sentences written according to identifier rules of a second database are obtained, the database access sentences are analyzed based on the identifier rules of the second database, a target grammar tree corresponding to the database access sentences is generated, a target system table for recording metadata of the first database is created in the kernel system of the first database in advance, and the identifiers and field values in the target system table are in accordance with the identifier rules of the second database. Based on the method, the kernel system of the first database is improved, specifically, the first database presents a compatible mode of the second database through the improvement of grammar analysis and a system table in the kernel system of the first database, so that the first database is compatible with the second database, the problem of case and case of identifiers in the second database can be solved, service codes do not need to be re-maintained according to the characteristics of the databases, and therefore the development and maintenance efficiency of the databases is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 shows an application scenario schematic diagram of a data access processing method provided in an embodiment of the present application;
FIG. 2 shows a flowchart of a data access processing method according to an embodiment of the present application;
FIG. 3 shows a flowchart of a first database instantiation method provided by an embodiment of the present application;
fig. 4 is a schematic flow chart of a metadata writing method according to an embodiment of the present application;
fig. 5 shows a flowchart of a method for constructing a target syntax tree according to an embodiment of the present application;
fig. 6 shows a flow diagram of a lexical parsing method according to an embodiment of the present application;
fig. 7 is a schematic flow chart of another lexical parsing method according to an embodiment of the present application;
Fig. 8 is a schematic flow chart of an access result determining method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a data access processing apparatus according to an embodiment of the present application;
fig. 10 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not intended to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this application, illustrates operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to the flow diagrams and one or more operations may be removed from the flow diagrams as directed by those skilled in the art.
In addition, the described embodiments are only some, but not all, of the embodiments of the present application. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features stated hereinafter, but not to exclude the addition of other features.
In the prior art, although two ways are provided to solve the problem of database compatibility, no matter what way is adopted, a service code is re-maintained according to the characteristics of the adapted database, and as the number of databases adapted to service domains increases, the number of maintained code versions increases, so that the engineering quantity in the early stage of database development is large, the later maintenance cost is high, and the development and maintenance efficiency of the database is low.
Based on the above problems, the application provides a data access processing method, which enables the kernel system of a first database to be compatible with the function of a second database (Oracle database) by improving the kernel system of the first database, so that the data in the first database can be normally accessed without any modification to service codes.
For convenience of explanation of the technical solution of the present application, in the following embodiments of the present application, the first database is taken as a LightDB database, and the second database is taken as an Oracle database as an example.
Fig. 1 shows an application scenario schematic diagram of a data access processing method provided in an embodiment of the present application. Referring to fig. 1, the database access method of the present application may be applied to a kernel system of a LightDB database, where the kernel system of the LightDB database is modified from an original kernel system of an original LightDB database, and is capable of being compatible with functions of an Oracle database, so that the LightDB database may be correspondingly served to any business system that is developed and designed with the Oracle database as a base, when operating in an Oracle compatible mode. These business systems can write a database access statement and access the LightDB database according to Oracle's identifier rules.
With continued reference to fig. 1, the kernel system of the LightDB database may also operate in a LightDB compatible mode. In this case, no improvement is required for the kernel system of the LightDB database. The LightDB database operating in LightDB mode may serve a business system designed for development according to the LightDB rules. These business systems may write a database access statement according to the identifier rules of the LightDB and access the LightDB database.
Because the processing logic of identifiers is different from different databases, the LightDB database is not compatible with the processing logic written according to the identifier rule of the Oracle database, so that when the same business system which is developed and designed by taking the Oracle database as a base is used for inquiring codes in the same section, access abnormality can occur when the LightDB database is accessed.
Illustratively, the kernel system of the LightDB database, i.e., the database kernel, is essentially a database engine, which is a collection of core functions that complete the data operations of the database management system (database managementsystem, DBMS). Generally, the database kernel comprises five parts, namely a parser, a planner, an optimizer, an executor and a storage engine. The parser is used for performing lexical and grammatical parsing on Structured Query Language (SQL) sentences input by a database user and judging the query intention of the user; the planner generates a corresponding execution plan according to the analysis result of the SQL statement; the optimizer is used for optimizing the preliminarily generated execution plan so as to efficiently complete the operation requested by the user; the executor performs specific execution according to each operation step in the plan according to the optimized execution plan, and a result required by a user is obtained; the storage engine is responsible for the functions of reading, writing, indexing and the like in the process, so that input and output capabilities are provided for other functional components.
Based on the method, the kernel system of the LightDB database is improved, two versions of system tables are maintained in the kernel system of the improved LightDB database, the lower case version corresponds to the LightDB compatible mode, the upper case version corresponds to the Oracle compatible mode, and grammar analysis of the kernel system of the LightDB database is improved, so that after a database access statement written by using an identifier rule of the Oracle database is obtained, grammar and lexical analysis are carried out on the database access statement by using an analyzer of a database kernel of the LightDB database, and a user access request is completed through a planner, an optimizer and an executor, so that an access result is obtained. Therefore, the LightDB database can present and be compatible with an Oracle mode, so that the development and maintenance efficiency of the database is improved.
The data access processing method provided in the embodiment of the present application is described in detail below with reference to the content shown in fig. 1.
Referring to fig. 2, a flow chart of a data access processing method provided in an embodiment of the present application is applied to a kernel system of a first database, and the method specifically includes the following steps:
s201, acquiring a database access statement, wherein the database access statement is written according to an identifier rule of a second database.
Optionally, the database access statement is an SQL statement written according to an identifier rule of the Oracle database, and the database access statement may be, for example, a query statement, an update statement, a delete statement, or a new statement, so as to implement addition, deletion, and modification of service data. In an Oracle database, an identifier generally refers to the name of a named object, such as a table name, column name, variable name, etc., for example, when Oracle creates a table, a unique name needs to be named for each table, which is an identifier.
Optionally, the identifier rules include identifier naming rules, identifier resolution rules, and the like. In particular, the identifier naming convention is relatively flexible, may include letters, numbers and underlining, but the naming must begin with letters and cannot be longer than 64 characters. Furthermore, the identifiers are case-specific in the Oracle database, that is, identifiers of different cases are treated as different objects. The identifier parsing rule is that an object referred by the identifier is searched in the current schema, if the object is found, the object is used, if the object is not found in the schema, the search is continued in the public schema, if the object referred by the identifier is found, the object is used, and if the object referred by the identifier is not found in the public schema, the object is not present.
Where schema is the organization and structure of a database, schema objects may be tables, columns, data types, views, stored procedures, relationships, primary keys, foreign keys, and so on. The other schema objects such as the table are created without any mode specified, and in a default case, the created objects such as the table are automatically put into a mode named "public", that is, the public schema is formed.
S202, analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement.
Alternatively, since the kernel system of the first database is compatible with the functions of the Oracle database, the database access statement written according to the identifier naming rule of the Oracle database can be parsed based on the identifier parsing rule of the Oracle database. Specifically, in the Oracle database, if the identifier in the database access statement is bracketed by double quotation marks, the case of the character string is not changed during grammar and lexical analysis, and the character string is stored according to the original text. If the identifiers in the database access statement are not bracketed with double quotation marks, the identifiers are stored by default in uppercase.
Illustratively, the patterns of morphemes are described using regular expressions based on lexical analyzers such as flex tools. In the parsing process using the flex tool, after recognizing the lexical units such as operators, special symbols, keywords, etc., it is necessary to determine the number of lines, start positions, end positions, etc. where each lexical unit appears. The starting position is the ending position of the last identified lexical unit, the ending position is the starting position plus the morpheme length, and finally the token value is returned to complete the identification of a morpheme. In contrast, the special lexical elements such as notes, spaces, line breaks and the like need only be identified and need not be output to the analysis result. Thus, after analyzing the database access statement, the target grammar tree corresponding to the database access statement is obtained. Each node of the target grammar tree has a grammar symbol, the root node is a start symbol, and the sub-nodes of each node are connected together from left to right to conform to the grammar rule.
S203, determining an access result of the database access statement based on the target grammar tree and a pre-established target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database.
Optionally, the target system table is a system table which is created in advance in a kernel system of the LightDB database and conforms to the Oracle database schema. In order to realize control of the database system, it is necessary to provide a function of a data dictionary that stores not only description information of various objects but also detail information of various objects required for system management. In the LightDB database system, the system table plays the role of a data dictionary, i.e. where the structural metadata is stored, and in the LightDB database system, the system table is represented as a general table or view where the system information is stored, and the user can delete and reconstruct the table, add columns, insert and update values.
It should be noted that, the LightDB database and the Oracle database have a set of system tables, the LightDB compatible mode corresponds to a set of lower-case system tables, the Oracle compatible mode corresponds to a set of upper-case system tables, the target system table is a system table which is created in advance in the kernel system of the LightDB database and records metadata of the LightDB database, and identifiers and field values in the target system table both conform to identifier rules of the Oracle database.
In this embodiment, in the kernel system of the first database, a database access statement written according to an identifier rule of the second database is obtained, the database access statement is parsed based on the identifier rule of the second database, a target syntax tree corresponding to the database access statement is generated, a target system table for recording metadata of the second database is created in the kernel system of the first database in advance, and both the identifier and the field value in the target system table conform to the identifier rule of the second database. Through the improvement of a grammar analysis mode and a system table in a kernel system of the first database, the first database presents a second database mode, so that the first database is compatible with the second database, the problem of case and case of an identifier of the second database can be solved, service codes are not required to be re-maintained according to the characteristics of the database, and the development and maintenance efficiency of the database is improved.
As a possible implementation manner, before the step S201 of obtaining the database access statement, the method further includes: instantiation of the first database is performed based on the identifier rules of the second database.
Optionally, the LightDB database is subjected to database instantiation according to the identifier rule of the Oracle database, where the database instantiation refers to a process of converting the logical structure of the database into an actual storage structure. Illustratively, the process of database instantiation includes operations of creating a table, defining fields, setting constraints, establishing an index, etc., and finally mapping the logical structure of the database onto the physical storage space.
Illustratively, as shown in fig. 3, the instantiation of the first database is performed based on the identifier rule of the second database, and specifically includes the following steps:
s301, generating a target system table based on identifier rules of the second database.
Illustratively, when the second database is an Oracle database, characters in each identifier in the initial system table are converted into capital characters, and a target system table is obtained.
Wherein the initial system table may be a default system table of the LightDB database, and identifiers in the initial system table all follow identifier rules of the LightDB.
Before the first database is instantiated, it is necessary to determine whether the Oracle compatible mode or the LightDB compatible mode is instantiated, and if the Oracle compatible mode or the LightDB compatible mode is the LightDB compatible mode, a system table with upper case is not required to be generated, and lexical analysis and semantic analysis are not required to be processed. Only when the Oracle compatible mode is instantiated, since the identifiers of the system tables in the Oracle database are uppercase characters, the characters in each identifier in the initial system table need to be converted into uppercase characters when creating the target system table in the LightDB database. It should be noted that the first-generated target system table is essentially an empty system table, and only identifiers such as table names of some tables are recorded, but field values and metadata corresponding to the identifiers are not recorded. When a data table is created in a first database operating in the Oracle compatible mode, corresponding field values and metadata are written into the target system accordingly.
For example, a target system table may be generated using a perl tool. Specifically, converting characters in each identifier in the initial system table to uppercase characters includes all writing fields in the structures defined by the system table in the.h header file and the.dat data file to uppercase, and when using the structures defined by the.h header file, converting the referenced fields to uppercase. In addition, the perl tool contains a template file and an execution file, and in the process of generating the target system table, the fields in the system table referenced by the template file also need to be converted into capitalization, and after the execution of the execution file, letters defined by macros in a d.h file corresponding to the h header file generated also become capitalization so as to be used for creating an index.
It is noted that hard coding is inevitably applied during the comparison of strings. In the kernel system of the LightDB database, which involves the comparison of strings, the comparison in the database kernel uses the function strcmp, and the compared string constants also need to be converted into uppercase.
S302, generating an initialization script of the first database based on the identifier rule of the second database.
Illustratively, the database initialization script is the database's required initialization view and full text retrieval function. And carrying out some initialization configuration on the LightDB database according to identifier naming rules, identifier analysis rules and other identifier rules of the Oracle database so as to ensure the normal operation of the database. Specifically, the process of generating the initialization script of the LightDB database includes creating a database, creating a table, inserting data, querying data, updating data, deleting data, and the like. The initialization of the LightDB database can be completed by executing the corresponding command line. The strings of the system table field used in the where condition used in the initialization script also need to be all converted into uppercase.
S303, running an initialization script based on the target system table.
For example, after generating the target system table and the initialization script of the LightDB database in the kernel system of the LightDB database, the initialization script is run according to the target system table, so that the newly created database has the basic capability of the database and can operate normally.
Based on the method, the instantiation of the LightDB database is carried out according to the identifier rule of the Oracle database, so that an Oracle mode-compatible target system table and an Oracle mode-compatible initialization script are generated in a kernel system of the LightDB database, and the initialization script of the LightDB database can be ensured to normally run.
As a possible implementation manner, since only the identifier compatible with the Oracle mode is currently recorded in the target system table, and the metadata of the LightDB database is not recorded yet, after the target system table is generated, the metadata is also written into the target system table. As shown in fig. 4, the method further includes:
s401, acquiring a database update statement, wherein the database update statement is used for creating a new data table in the first database or updating the table name or field name of the data table in the first database.
Illustratively, the database update statement is also written according to the identifier rule of the Oracle database, and a new data table is created in the LightDB database by using the database update statement, or the table name or field name of the data table in the LightDB database is updated, so that metadata is written into the target system table, and a foundation is laid for subsequent data query.
S402, writing data into the target system table according to the identifier rule of the second database according to the database update statement.
The target system table is a two-dimensional structure consisting of columns and rows, and in the process of adding metadata to the target system table by using a database update statement, row and column values of identifiers corresponding to the metadata in the target system table need to be known, so that the metadata corresponding to each identifier is accurately stored in a corresponding position of the target system table.
It should be noted that, before storing metadata in the target system table, the target system table needs to be opened first, but the target system table cannot be opened directly, and the target system table needs to be opened through an object identifier (Object Identifier, OID), where the object identifier OID is a globally unique value associated with the object and used for unambiguously identifying the object, so that it can be ensured that the storage location of the metadata is accurately located and managed during the process of storing the metadata in the target system table.
Based on this, while the target system table is being generated, according to the database update statement, and the metadata of the record LightDB database is stored into the target system table according to the identifier rule of the second database, so as to determine the access result of the database access statement.
As a possible implementation manner, as shown in fig. 5, the step S202 of analyzing the database access sentence based on the identifier rule of the second database to obtain the target syntax tree corresponding to the database access sentence specifically includes the following steps:
s501, performing lexical analysis on the database access statement based on the identifier rule of the second database to obtain a lexical analysis result of the database access statement.
Optionally, the lexical analysis tool flex reads the database access sentence, at this time, the database access sentence input into the lexical analysis tool flex is used as an LEX source file, a regular expression and a processing code of a corresponding mode are contained, the lexical analysis tool flex automatically generates a corresponding lexical analysis function, such as int yylex (), through scanning the source file, and outputs the corresponding lexical analysis function into a file with a file name specified as lexyy.c, the file is an output file of LEX or an output lexical analyzer, and then the lexical analysis result of the database access sentence is obtained by using the lexical analyzer to perform lexical analysis on the database access sentence according to the identifier analysis rule of the Oracle database.
As shown in fig. 6, the step S501 specifically includes the following steps:
s601, determining a regular expression of a database access statement.
Illustratively, a regular expression, also known as a regular expression, is a logical formula that operates on strings and special characters, and is typically used to retrieve, replace text that meets a certain pattern or rule. Currently, many programming languages support string operations using regular expressions, for example, a powerful regular expression engine is built in a lexical parsing tool flex, and a rule string is formed by using predefined special characters and combinations of the special characters to express a filtering logic for the string. Thus, the lexical resolution tool flex may be utilized to create corresponding canonical rules for the identifier with double quotation marks and the identifier without double quotation marks, respectively.
S602, obtaining a lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database.
For example, if the regular expression of the target identifier in the database access sentence is matched with the regular rule corresponding to the identifier containing the double-quote number, taking the characters except the double-quote number in the target identifier as the lexical analysis result of the target identifier, wherein the target identifier is any identifier in the database access sentence;
If the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without the double-quotation marks, converting the characters in the target identifier into capitalized characters, and obtaining the lexical analysis result of the target identifier.
For example, as shown in fig. 7, it is first determined whether the target identifier in the database access statement uses double quotation marks, and a rule is created for regular expression matching of the double quotation marks by using a flex tool, and syntax analysis is performed, and then a lexical analysis result is obtained after the processing by the executor. Specifically, if the target identifier in the database access sentence uses double quotation marks, when the lexical analysis is performed on the database access sentence, the regular expression of the target identifier is matched with the regular rule corresponding to the identifier containing the double quotation marks, that is, the rule of xdstart is matched by using the regular expression, so that the character strings in the double quotation marks are saved in the str member of the structural body yylval according to the original text, that is, the characters except the double quotation marks in the target identifier are used as the lexical analysis result of the target identifier. If the target identifier in the database access statement does not use double quotation marks, when the lexical analysis is carried out on the database access statement, the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without double quotation marks, namely, the regular expression is utilized to match the identifier rule, a logic processing part of the lexically analyzed identifier regular expression in a kernel system of the LightDB database is modified, and characters in the target identifier are converted into capitalized characters, for example, character strings with the yyleng length in yytext are converted into capitalization.
It should be noted that, in the process of judging whether the target identifier in the database access sentence uses the double-quotation marks, and in the process of matching the regular expression using the target identifier with the regular rule corresponding to the identifier without double-quotation marks or the identifier with double-quotation marks, the character string comparison is required, and the hard coding process is required in the places related to the character string comparison.
S502, carrying out grammar analysis on the lexical analysis result to obtain a target grammar tree.
Illustratively, a very important function of parsing a grammar is to construct a tree data structure, whether the interpreter executes the current sentence or the compiler converts the sentence into a low-level language, and the parse tree is an important structure for going up and down. So the grammar analysis tree is constructed according to the grammar analysis result and grammar rule generated by the grammar analysis tool flex, the grammar analysis result conforming to the grammar rule is also a character string, namely the character string is converted into a hierarchical structure, and the target grammar tree is obtained.
Specifically, the process of generating the target syntax tree may include three steps of lexical analysis, syntax analysis, and semantic analysis. The lexical analysis refers to dividing the source code of the lexical analysis result into a series of words, namely lexical units, such as variable names, numbers, operators and the like. The grammar analysis refers to constructing a grammar analysis tree according to the lexical unit sequence and grammar rules generated by the lexical analyzer. Semantic analysis refers to performing context analysis on a semantic parse tree to check whether semantic errors exist, such as checking whether variable types match, whether function parameters are correct, and the like.
It should be noted that in the target syntax tree, the nodes of the tree represent the symbols of the syntax rules or terminal symbols, and the edges of the tree represent the process of rule application. The corresponding syntax tree is unique for a given lexical parsing result, i.e. string.
Based on the method, the lexical analysis result is subjected to grammar analysis to generate a target grammar tree, and the grammar tree can accurately represent the grammar structure in the lexical analysis result relative to a grammar list or a grammar map, and is more convenient for program analysis, optimization and code generation. In addition, the syntax tree provides richer syntax information, and syntax analysis and error detection are easier to perform by using the syntax tree.
As a possible implementation manner, as shown in fig. 8, the step S203 determines an access result of the database access statement based on the target syntax tree and the target system table created in advance, and specifically includes the following steps:
s801, searching each identifier in a target grammar tree from a target system table to obtain an identifier searching result.
Illustratively, after the lexical analysis result is parsed to generate a target syntax tree, the target syntax tree includes a plurality of identifiers, for example, table names indicating data tables to be accessed by the database access statement, and the like. Then, according to each identifier in the target syntax tree, searching the corresponding identifier from the target system table, for example, ABC, ABE, DEF is present in the identifier existing in the current target syntax tree, ABC, ABD, ABE, BCD, DEF and metadata corresponding to each identifier are stored in the target system table, and the obtained identifier searching result is the identifier ABC, ABE, DEF corresponding to the identifier in the target syntax tree in the target system table. That is, the identifier lookup result characterizes whether the same identifier exists in the target system table as the identifier in the target syntax tree.
S802, determining an access result of the database access statement according to the identifier search result.
For example, if the identifier lookup result indicates that at least one identifier in the target syntax tree does not exist in the target system table, determining that the access result is an access failure; otherwise, according to the target grammar tree, accessing at least one data table in the first database to obtain an access result.
For example, the identifier ABC, ABE, DEF existing in the target syntax tree is taken as an example, the identifier ABC, ABD, ABE, BCD, DEF and the metadata corresponding to each identifier are stored in the target system table, the identifier ABC, ABE, DEF in the target syntax number exists in the target system table, that is, the access result is indicated as the access success, and the metadata of the data table corresponding to the identifier ABC, ABE, DEF in the LightDB database is obtained to obtain the access result. Otherwise, if the identifiers existing in the target syntax tree include BCD and DEF and the identifiers stored in the target system table are ABC, ABD, ABE, the identifiers in the target syntax tree do not exist in the target system table, which means that the data table corresponding to the identifiers BCD and DEF does not exist in the LightDB database, that is, the access fails.
In the process of determining whether at least one identifier in the target syntax tree exists in the target system table, the character string comparison is also required, and the hard coding process is also required in the place where the character string comparison is concerned.
Based on this, according to a data access processing method of the embodiment of the present application, when an initialization instance of the LightDB database is performed, a system table conforming to the Oracle compatible mode uppercase is generated. When lexical analysis is performed on the database access statement, it is first determined whether the target identifier in the database access statement uses double quotation marks, and the target identifier without quotation marks is converted into capitalization. Thus, the database kernel of the LightDB database converts all keywords related to the character string comparison into uppercase through compatible mode and hard-coded processing, and the identifier case comparison is strictly performed at the time of comparison.
In addition, the embodiment of the application does not affect the database performance of the LightDB database and the Oracle database, but is based on the kernel system of the LightDB database to realize the compatibility of writing the Oracle identifier Fu Daxiao, so that a business system developed for a base based on the Oracle database can be adapted to the LightDB database, and the normal operation of the LightDB database is not affected. In addition, in the process of writing the kernel system compatible Oracle identifier Fu Daxiao based on the LightDB database, only the modification identifier and the corresponding character string are related, and a developer does not need to maintain service codes again, so that the development period is greatly shortened, quick online can be realized, and the development and maintenance efficiency of the database is improved.
Based on the same inventive concept, the embodiment of the present application further provides a data access processing device corresponding to the data access processing method, and since the principle of the device in the embodiment of the present application for solving the problem is similar to that of the data access processing method in the embodiment of the present application, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 9, which is a schematic structural diagram of a data access processing apparatus according to an embodiment of the present application, the data access processing apparatus 900 includes: an acquisition module 901, a parsing module 902, a determination module 903, wherein:
the acquiring module 901 is configured to acquire a database access statement, where the database access statement is written according to an identifier rule of the second database;
the parsing module 902 is configured to parse the database access statement based on the identifier rule of the second database, to obtain a target syntax tree corresponding to the database access statement;
the determining module 903 is configured to determine an access result of the database access statement based on the target syntax tree and a pre-created target system table, where the target system table is used to record metadata of the first database, and an identifier and a field value in the target system table both conform to an identifier rule of the second database.
Thus, according to the data access processing device of the embodiment of the application, in the kernel system of the LightDB database, the database access statement written according to the identifier rule of the Oracle database is acquired, the database access statement is parsed based on the identifier rule of the Oracle database, the target syntax tree corresponding to the database access statement is generated, the target system table for recording the metadata of the LightDB database is created in the kernel system of the LightDB database in advance, and the identifier and the field value in the target system table are both in accordance with the identifier rule of the Oracle database. Based on the method, the kernel system of the LightDB database is improved, specifically, the LightDB database is enabled to be in an Oracle mode through grammar analysis and improvement of a system table in the kernel system of the LightDB database, so that the LightDB database is compatible with the Oracle database, the problem of case and case of an Oracle identifier can be solved, service codes do not need to be maintained again according to the characteristics of the database, and therefore development and maintenance efficiency of the database is improved.
In one possible implementation, the parsing module 902 is specifically configured to:
performing lexical analysis on the database access statement based on the identifier rule of the second database to obtain a lexical analysis result of the database access statement;
And carrying out grammar analysis on the lexical analysis result to obtain a target grammar tree.
In a possible implementation manner, the parsing module 902 is further configured to:
determining a regular expression of a database access statement;
and obtaining the lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database.
In one possible implementation, the second database is an Oracle database, and the parsing module 902 is further configured to:
if the regular expression of the target identifier in the database access statement is matched with the regular rule corresponding to the identifier containing the double-quotation mark, taking the characters except the double quotation mark in the target identifier as the lexical analysis result of the target identifier, wherein the target identifier is any identifier in the database access statement;
if the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without the double-quotation marks, converting the characters in the target identifier into capitalized characters, and obtaining the lexical analysis result of the target identifier.
In one possible implementation manner, the determining module 903 is specifically configured to:
searching each identifier in the target grammar tree from the target system table to obtain an identifier searching result;
And determining the access result of the database access statement according to the identifier search result.
In a possible implementation manner, the determining module 903 is further configured to:
if the identifier searching result indicates that at least one identifier in the target grammar tree does not exist in the target system table, determining that the access result is access failure;
otherwise, according to the target grammar tree, accessing at least one data table in the first database to obtain an access result.
In one possible embodiment, the data access processing apparatus 900 further includes:
and the instantiation module is used for instantiating the first database based on the identifier rule of the second database.
In one possible implementation manner, the instantiation module is specifically configured to:
generating a target system table based on the identifier rules of the second database;
generating an initialization script of the first database based on the identifier rule of the second database;
the initialization script is run based on the target system table.
In a possible implementation manner, the instantiation module is further configured to:
and when the second database is an Oracle database, converting characters in each identifier in the initial system table into capital characters to obtain a target system table.
In a possible implementation manner, the instantiation module is further configured to:
acquiring a database update statement, wherein the database update statement is used for creating a new data table in a first database or updating a table name or a field name of the data table in the first database;
and writing data into the target system table according to the identifier rule of the second database according to the database update statement.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
The embodiment of the application further provides an electronic device 1000, as shown in fig. 10, which is a schematic structural diagram of the electronic device 1000 provided in the embodiment of the application, including: the processor 1001, memory 1002, and optionally, may also include a bus 1003. The memory 1002 stores machine readable instructions executable by the processor 1001, which when executed by the processor 1001 performs the steps of the data access processing method as described in any of the preceding claims, when the electronic device 1000 is running, the processor 1001 communicates with the memory 1002 via the bus 1003.
Embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the data access processing method according to any of the above.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the method embodiments, which are not described in detail in this application. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other form.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes or substitutions are covered in the protection scope of the present application.

Claims (13)

1. A method of data access processing, characterized by a kernel system applied to a first database, the method comprising:
acquiring a database access statement, wherein the database access statement is written according to an identifier rule of a second database;
analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement;
and determining an access result of the database access statement based on the target grammar tree and a pre-created target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database.
2. The method according to claim 1, wherein the parsing the database access statement based on the identifier rule of the second database to obtain the target syntax tree corresponding to the database access statement includes:
Performing lexical analysis on the database access statement based on the identifier rule of the second database to obtain a lexical analysis result of the database access statement;
and carrying out grammar analysis on the lexical analysis result to obtain the target grammar tree.
3. The method according to claim 2, wherein the performing lexical analysis on the database access sentence based on the identifier rule of the second database to obtain the lexical analysis result of the database access sentence includes:
determining a regular expression of the database access statement;
and obtaining a lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database.
4. A method according to claim 3, wherein the second database is an Oracle database;
the obtaining the lexical analysis result of the database access statement according to the regular expression of the database access statement and the identifier rule of the second database comprises the following steps:
if the regular expression of the target identifier in the database access statement is matched with the regular rule corresponding to the identifier containing the double-quotation mark, taking the characters except the double quotation mark in the target identifier as the lexical analysis result of the target identifier, wherein the target identifier is any identifier in the database access statement;
And if the regular expression of the target identifier is matched with the regular rule corresponding to the identifier without the double-quotation marks, converting the characters in the target identifier into capitalized characters to obtain a lexical analysis result of the target identifier.
5. The method of claim 1, wherein the determining the access result of the database access statement based on the target syntax tree and a pre-created target system table comprises:
searching each identifier in the target grammar tree from the target system table to obtain an identifier searching result;
and determining the access result of the database access statement according to the identifier search result.
6. The method of claim 5, wherein determining the access result of the database access statement based on the identifier lookup result comprises:
if the identifier lookup result indicates that at least one identifier in the target grammar tree does not exist in the target system table, determining that the access result is access failure;
otherwise, according to the target grammar tree, accessing at least one data table in the first database to obtain an access result.
7. The method of any of claims 1-6, further comprising, prior to the retrieving the database access statement:
instantiation of the first database is performed based on the identifier rules of the second database.
8. The method of claim 7, wherein the instantiating the first database based on the identifier rule of the second database comprises:
generating the target system table based on identifier rules of the second database;
generating an initialization script of the first database based on the identifier rule of the second database;
and running the initialization script based on the target system table.
9. The method of claim 8, wherein the generating the target system table based on the identifier rules of the second database comprises:
and when the second database is an Oracle database, converting characters in each identifier in the initial system table into capital characters to obtain the target system table.
10. The method according to claim 9, wherein the method further comprises:
obtaining a database update statement, wherein the database update statement is used for creating a new data table in the first database or updating a table name or a field name of the data table in the first database;
And writing data into the target system table according to the identifier rule of the second database according to the database update statement.
11. A data access processing apparatus, characterized by a kernel system applied to a first database, the apparatus comprising:
the acquisition module is used for acquiring database access sentences which are written according to identifier rules of the second database;
the analysis module is used for analyzing the database access statement based on the identifier rule of the second database to obtain a target grammar tree corresponding to the database access statement;
the determining module is used for determining an access result of the database access statement based on the target grammar tree and a pre-established target system table, wherein the target system table is used for recording metadata of the first database, and identifiers and field values in the target system table are in accordance with identifier rules of the second database.
12. An electronic device, comprising: a processor and a memory storing machine readable instructions executable by the processor, which when executed by an electronic device, perform the steps of the data access processing method of any of claims 1 to 10.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the data access processing method according to any of claims 1 to 10.
CN202311597223.6A 2023-11-28 2023-11-28 Data access processing method and device, electronic equipment and storage medium Active CN117331963B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311597223.6A CN117331963B (en) 2023-11-28 2023-11-28 Data access processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311597223.6A CN117331963B (en) 2023-11-28 2023-11-28 Data access processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117331963A true CN117331963A (en) 2024-01-02
CN117331963B CN117331963B (en) 2024-03-08

Family

ID=89293726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311597223.6A Active CN117331963B (en) 2023-11-28 2023-11-28 Data access processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117331963B (en)

Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5388257A (en) * 1991-07-24 1995-02-07 At&T Corp. Method and apparatus for operating a computer based file system
US6615214B1 (en) * 1999-12-22 2003-09-02 International Business Machines Corporation Accommodation of data definition statements in the sharing of dynamic SQL statements
US6951013B1 (en) * 2002-03-01 2005-09-27 Lozins Neal N Method for facilitating development and testing of relational database application software
US7257597B1 (en) * 2001-12-18 2007-08-14 Siebel Systems, Inc. Table substitution
US20070198456A1 (en) * 2006-02-06 2007-08-23 International Business Machines Corporation Method and system for controlling access to semantic web statements
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN102073640A (en) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Method, system and server for testing structured query language (SQL) statements
CN102867045A (en) * 2012-09-05 2013-01-09 武汉达梦数据库有限公司 Method and system for realizing compatibility of heterogeneous database reserved words based on driver layer
CN105320681A (en) * 2014-07-16 2016-02-10 中兴通讯股份有限公司 Database content combination method and device
CN107292167A (en) * 2017-06-27 2017-10-24 北京计算机技术及应用研究所 Based on the SQL statement safety detection method for simplifying syntax tree
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN108446289A (en) * 2017-09-26 2018-08-24 北京中安智达科技有限公司 A kind of data retrieval method for supporting heterogeneous database
CN108984653A (en) * 2018-06-27 2018-12-11 广州市南方人力资源评价中心有限公司 A method of realizing the online development management of multisystem
CN109033410A (en) * 2018-08-03 2018-12-18 韩雪松 A kind of SQL analytic method based on canonical and character string cutting
CN109656934A (en) * 2018-11-19 2019-04-19 武汉达梦数据库有限公司 Source oracle database DDL synchronous method and equipment based on log parsing
CN109992595A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 Different database conversion method, apparatus, equipment and storage medium
CN111061757A (en) * 2019-12-19 2020-04-24 用友网络科技股份有限公司 Database language conversion method and device, electronic equipment and storage medium
CN111522816A (en) * 2020-04-16 2020-08-11 云和恩墨(北京)信息技术有限公司 Data processing method, device, terminal and medium based on database engine
US20210287287A1 (en) * 2020-03-10 2021-09-16 Td Ameritrade Ip Company, Inc. Systems and Methods for Generating Ordered Operation Sets According to Time-Series Data Projections
CN113792027A (en) * 2021-08-23 2021-12-14 浙江金惠科技有限公司 Universal database conversion device
US11269824B1 (en) * 2018-12-20 2022-03-08 Datometry, Inc. Emulation of database updateable views for migration to a different database
CN115859956A (en) * 2022-12-02 2023-03-28 中孚安全技术有限公司 Self-adaption method and system for analyzing SQL (structured query language) grammar based on abstract syntax tree
CN116226170A (en) * 2023-03-14 2023-06-06 上海亘岩网络科技有限公司 Database statement conversion method and device, electronic equipment and storage medium
CN116842042A (en) * 2023-06-30 2023-10-03 中国人民解放军国防科技大学 Universal method, device, electronic equipment and storage medium for dissimilating database

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5388257A (en) * 1991-07-24 1995-02-07 At&T Corp. Method and apparatus for operating a computer based file system
US6615214B1 (en) * 1999-12-22 2003-09-02 International Business Machines Corporation Accommodation of data definition statements in the sharing of dynamic SQL statements
US7257597B1 (en) * 2001-12-18 2007-08-14 Siebel Systems, Inc. Table substitution
US6951013B1 (en) * 2002-03-01 2005-09-27 Lozins Neal N Method for facilitating development and testing of relational database application software
US20070198456A1 (en) * 2006-02-06 2007-08-23 International Business Machines Corporation Method and system for controlling access to semantic web statements
CN101158975A (en) * 2007-11-21 2008-04-09 金蝶软件(中国)有限公司 Method and system for accessing distinct type data-base
CN102073640A (en) * 2009-11-19 2011-05-25 阿里巴巴集团控股有限公司 Method, system and server for testing structured query language (SQL) statements
CN102867045A (en) * 2012-09-05 2013-01-09 武汉达梦数据库有限公司 Method and system for realizing compatibility of heterogeneous database reserved words based on driver layer
CN105320681A (en) * 2014-07-16 2016-02-10 中兴通讯股份有限公司 Database content combination method and device
CN107292167A (en) * 2017-06-27 2017-10-24 北京计算机技术及应用研究所 Based on the SQL statement safety detection method for simplifying syntax tree
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN108446289A (en) * 2017-09-26 2018-08-24 北京中安智达科技有限公司 A kind of data retrieval method for supporting heterogeneous database
CN108984653A (en) * 2018-06-27 2018-12-11 广州市南方人力资源评价中心有限公司 A method of realizing the online development management of multisystem
CN109033410A (en) * 2018-08-03 2018-12-18 韩雪松 A kind of SQL analytic method based on canonical and character string cutting
CN109656934A (en) * 2018-11-19 2019-04-19 武汉达梦数据库有限公司 Source oracle database DDL synchronous method and equipment based on log parsing
US11269824B1 (en) * 2018-12-20 2022-03-08 Datometry, Inc. Emulation of database updateable views for migration to a different database
CN109992595A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 Different database conversion method, apparatus, equipment and storage medium
CN111061757A (en) * 2019-12-19 2020-04-24 用友网络科技股份有限公司 Database language conversion method and device, electronic equipment and storage medium
US20210287287A1 (en) * 2020-03-10 2021-09-16 Td Ameritrade Ip Company, Inc. Systems and Methods for Generating Ordered Operation Sets According to Time-Series Data Projections
CN111522816A (en) * 2020-04-16 2020-08-11 云和恩墨(北京)信息技术有限公司 Data processing method, device, terminal and medium based on database engine
CN113792027A (en) * 2021-08-23 2021-12-14 浙江金惠科技有限公司 Universal database conversion device
CN115859956A (en) * 2022-12-02 2023-03-28 中孚安全技术有限公司 Self-adaption method and system for analyzing SQL (structured query language) grammar based on abstract syntax tree
CN116226170A (en) * 2023-03-14 2023-06-06 上海亘岩网络科技有限公司 Database statement conversion method and device, electronic equipment and storage medium
CN116842042A (en) * 2023-06-30 2023-10-03 中国人民解放军国防科技大学 Universal method, device, electronic equipment and storage medium for dissimilating database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
欧义发;: "试析Oracle数据库SQL语句的性能优化", 电脑编程技巧与维护, no. 08, 18 August 2020 (2020-08-18), pages 98 - 99 *

Also Published As

Publication number Publication date
CN117331963B (en) 2024-03-08

Similar Documents

Publication Publication Date Title
Caprile et al. Nomen est omen: Analyzing the language of function identifiers
RU2605077C2 (en) Method and system for storing and searching information extracted from text documents
Balmin et al. Incremental validation of XML documents
CA2710882C (en) Managing an archive for approximate string matching
Göde et al. Studying clone evolution using incremental clone detection
CN107203468B (en) AST-based software version evolution comparative analysis method
KR20080086456A (en) A method and system for editing text with a find and replace function leveraging derivations of the find and replace input
CN111913739B (en) Service interface primitive defining method and system
CN1619546A (en) Label system-translation of text and multi-language support at runtime and design
JP7168411B2 (en) Information processing system and information processing method
CN116842042A (en) Universal method, device, electronic equipment and storage medium for dissimilating database
CN114817298A (en) Method, device and equipment for extracting field-level data blood margin and storage medium
CN116226170A (en) Database statement conversion method and device, electronic equipment and storage medium
Fan et al. A differential testing approach for evaluating abstract syntax tree mapping algorithms
JP5107556B2 (en) Improved Chinese-English translation tool
CN109947711B (en) Automatic multi-language file management method in IOS project development process
Cooke-Fox et al. Computer translation of IUPAC systematic organic chemical nomenclature. 3. Syntax analysis and semantic processing
CN113032371A (en) Database grammar analysis method and device and computer equipment
CN117331963B (en) Data access processing method and device, electronic equipment and storage medium
CN116360794A (en) Database language analysis method, device, computer equipment and storage medium
CN112699642B (en) Index extraction method and device for complex medical texts, medium and electronic equipment
EP0990983A1 (en) Automation of the design recovery and forward engineering of legacy applications
KR100501936B1 (en) System and method for source code checking
Butler Analysing Java Identifier Names
Valantin CDS/ISIS and MINISIS: a functional analysis and comparison

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant