Method for accessing relational databases of different types
A database and relational technology, applied in the field of relational databases, can solve problems such as complexity and workload, and achieve the effect of reducing complexity, shielding database types, and executing efficiency advantages
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
example 1
[0030] SQL Server: SELECT SubString(Code, 1, 3) FROM T WHERE ID=@p1
[0031] Oracle: SELECT SubStr(Code, 1, 3) FROM T WHERE ID=: p1
[0032] The above is the first three characters of the Code field in the row where the specified ID is obtained from the table T in SQL development. The SQL difference between SQL Server and Oracle database is shown above.
[0033] The unified packaging shown in the present invention is as follows:
[0034] SQL: SELECT{F:SubStr(Code,1,3)} FROM T WHERE ID={0}
[0035] When the above SQL is executed, it will be matched to a specific database execution object according to the configuration item. The execution object will perform a regular expression search on the text that matches the replacement, match and transform according to the content in the curly braces, and replace the original SQL text The curly braces part of, finally get the SQL statement executable on the target database.
example 2
[0037] SQL Server: ALTER TABLE T ALTER COLUMN COL1 VARCHAR(10)
[0038] Oracle: ALTER TABLE T MODIFY COL1 VARCHAR(10)
[0039] The above is in development, modify the SQL of column COL1 in table T, the SQL difference between SQL Server and Oracle database is shown above.
[0040] For SQL statements with large differences, the SQL statement compatibility method is not used, and the system provides a programming interface for encapsulation:
[0041] C#: void AlterColumn(string tblName, string colName, string property);
[0042] In the defined programming interface, an AlterColumn method is provided to modify the field properties of the database. There are three parameters, namely table name, field name, and field property. The program call source code for this example is as follows:
[0043] C#: AlterColumn("T", "COL1", "VARCHAR(10)");
[0044] The above example 1 and example 2 respectively illustrate the method of defining database access standards in two forms: SQL specification and prog...
PUM
![No PUM](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/noPUMSmall.5c5f49c7.png)
Abstract
Description
Claims
Application Information
![application no application](https://static-eureka.patsnap.com/ssr/23.2.0/_nuxt/application.06fe782c.png)
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap