CN107577812A - A kind of method for quickly reading of entity data bak - Google Patents
A kind of method for quickly reading of entity data bak Download PDFInfo
- Publication number
- CN107577812A CN107577812A CN201710904666.3A CN201710904666A CN107577812A CN 107577812 A CN107577812 A CN 107577812A CN 201710904666 A CN201710904666 A CN 201710904666A CN 107577812 A CN107577812 A CN 107577812A
- Authority
- CN
- China
- Prior art keywords
- database
- sql statement
- user input
- data
- object model
- 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.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention relates to a kind of method for quickly reading of entity data bak, when needing entity data bak quickly to read, user input data is obtained first, then user input data is sent to database object model, data type in user input data is resolved to type corresponding to database by the database object model, OC analysis of object in user input data is structure corresponding to database table by the database object model, structure corresponding to the database object model type and database table according to corresponding to the database parsed, generate SQL statement, SQL statement is sent to database by the database object model, database performs SQL statement and returns to Query Result.The present invention, by SQL statement encapsulation that is cumbersome, repeating, do not have to repeat when accessing database to write SQL statement, corresponding function can be achieved with a Codabar code, reduce workload, improve development efficiency, effectively avoid mistake caused by the duplication of labour.
Description
Technical field
The present invention relates to database technical field, specifically a kind of method for quickly reading of entity data bak.
Background technology
With the development of database technology, various demands continuously emerge, and constantly supervise further technological innovation, rise
Level.In program development, programmer runs into following situation sometimes:
When company goes to work, the sometimes work on daytime does not finish, and programmer will take work home overtime work at night and continue to do.But
It is that company is typically entity data bak with database for the supporting exploitation of program development, is deployed on development support server
, the development support server is a server inside corporate lan, and service end normal operation is dependent on exploitation branch
Hold the exploitation database on server.Due to being in, overtime work can not be accessed inside corporate lan, therefore cannot be connected
Exploitation database on upper development support server, this results in service end cisco unity malfunction, function during program development
It can not just debug.
In the prior art, a kind of solution method is exactly to use virtual data base.Just the use of company is journey when company goes to work
Sequence develops supporting exploitation database;Go back home, just use the virtual data base analog development database in internal memory, do one
A little basic function debuggings, are definitely generally enough.
Need largely to localize storage service in current app.In order to meet current business demand, we need in app
Data base tool is largely used, it is contemplated that allowing the convenient exploitation of programmer.
Entity data bak, which reads data, needs following steps:
1st, connected with Database,
2nd, SQL query statement is write,
3rd, query statement is performed,
4th, Query Result is obtained,
5th, database is closed.
Obviously, today of frequent reading/data storage is frequently interacted, needed with database in needs, accesses data
The workload in storehouse is very big, programmer it is cumbersome write SQL statement, not only workload is big, and easily causes to malfunction, it is necessary to
This further is reasonably optimized.
The content of the invention
For defect present in prior art, it is an object of the invention to provide a kind of quick reading of entity data bak
Method, SQL statement that is cumbersome, repeating is encapsulated, does not have to repeat when accessing database to write SQL statement, is with a Codabar code
Function corresponding to can be achieved, reduces workload, improves development efficiency, effectively avoid mistake caused by the duplication of labour.
To achieve the above objectives, the present invention adopts the technical scheme that:
A kind of method for quickly reading of entity data bak, it is characterised in that comprise the following steps:
When needing entity data bak quickly to read, user input data is obtained first,
Then user input data is sent to database object model,
Data type in user input data is resolved to type corresponding to database by the database object model,
OC analysis of object in user input data is structure corresponding to database table by the database object model,
Structure corresponding to the database object model type and database table according to corresponding to the database parsed, generation
SQL statement,
SQL statement is sent to database by the database object model,
Database performs SQL statement and returns to Query Result.
On the basis of above-mentioned technical proposal, the database object model is designed using four layer architectures, including:
Data type analytic sheaf, for the data type in user input data to be resolved into type corresponding to database,
Object placement's layer, for being structure corresponding to database table by the OC analysis of object in user input data, and make data
Structural support corresponding to the table of storehouse parses type corresponding to obtained database,
SQL statement generation layer, for structure, generation corresponding to the type according to corresponding to the database parsed and database table
SQL statement,
Database-operation level, for SQL statement to be sent into database, for receiving the Query Result returned.
On the basis of above-mentioned technical proposal, in object placement's layer, defined according to user, produce whether upgrade database
Option:
After object placement's layer parses structure corresponding to database table, and the existing database table of database is compared, and is on duty
When different quantity exceeds user defined value, the option of upgrade database is produced.
On the basis of above-mentioned technical proposal, in SQL statement generation layer, according to the option of incoming upgrade database,
Generate in SQL statement, increase corresponding database upgrade instruction.
The method for quickly reading of entity data bak of the present invention, SQL statement that is cumbersome, repeating is encapsulated, accesses number
SQL statement is write without repeating according to during storehouse, corresponding function can be achieved with a Codabar code, reduce workload, improve
Development efficiency, effectively avoid mistake caused by the duplication of labour.
Brief description of the drawings
The present invention has drawings described below:
The configuration diagram of Fig. 1 present invention.
The FB(flow block) of Fig. 2 present invention.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing.
As shown in Figure 1, 2, the method for quickly reading of entity data bak of the present invention, comprises the following steps:
When needing entity data bak quickly to read, user input data is obtained first,
Then user input data is sent to database object model,
Data type in user input data is resolved to type corresponding to database by the database object model,
OC analysis of object in user input data is structure corresponding to database table by the database object model,
Structure corresponding to the database object model type and database table according to corresponding to the database parsed, generation
SQL statement,
SQL statement is sent to database by the database object model,
Database performs SQL statement and returns to Query Result.
On the basis of above-mentioned technical proposal, the database object model is designed using four layer architectures, including:
Data type analytic sheaf, for the data type in user input data to be resolved into type corresponding to database,
Object placement's layer, for being structure corresponding to database table by the OC analysis of object in user input data, and make data
Structural support corresponding to the table of storehouse parses type corresponding to obtained database,
SQL statement generation layer, for structure, generation corresponding to the type according to corresponding to the database parsed and database table
SQL statement,
Database-operation level, for SQL statement to be sent into database, for receiving the Query Result returned.
On the basis of above-mentioned technical proposal, in object placement's layer, defined according to user, produce whether upgrade database
Option:
After object placement's layer parses structure corresponding to database table, and the existing database table of database is compared, and is on duty
When different quantity exceeds user defined value, the option of upgrade database is produced.
On the basis of above-mentioned technical proposal, in SQL statement generation layer, according to the option of incoming upgrade database,
Generate in SQL statement, increase corresponding database upgrade instruction.
The content not being described in detail in this specification belongs to prior art known to professional and technical personnel in the field.
Claims (4)
1. a kind of method for quickly reading of entity data bak, it is characterised in that comprise the following steps:
When needing entity data bak quickly to read, user input data is obtained first,
Then user input data is sent to database object model,
Data type in user input data is resolved to type corresponding to database by the database object model,
OC analysis of object in user input data is structure corresponding to database table by the database object model,
Structure corresponding to the database object model type and database table according to corresponding to the database parsed, generation
SQL statement,
SQL statement is sent to database by the database object model,
Database performs SQL statement and returns to Query Result.
2. the method for quickly reading of entity data bak as claimed in claim 1, it is characterised in that:The database object model
Designed using four layer architectures, including:
Data type analytic sheaf, for the data type in user input data to be resolved into type corresponding to database,
Object placement's layer, for being structure corresponding to database table by the OC analysis of object in user input data, and make data
Structural support corresponding to the table of storehouse parses type corresponding to obtained database,
SQL statement generation layer, for structure, generation corresponding to the type according to corresponding to the database parsed and database table
SQL statement,
Database-operation level, for SQL statement to be sent into database, for receiving the Query Result returned.
3. the method for quickly reading of entity data bak as claimed in claim 2, it is characterised in that:In object placement's layer, according to
User define, produce whether the option of upgrade database:
After object placement's layer parses structure corresponding to database table, and the existing database table of database is compared, and is on duty
When different quantity exceeds user defined value, the option of upgrade database is produced.
4. the method for quickly reading of entity data bak as claimed in claim 3, it is characterised in that:In SQL statement generation layer, root
According to the option of incoming upgrade database, in SQL statement is generated, increase corresponding database upgrade instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710904666.3A CN107577812A (en) | 2017-09-29 | 2017-09-29 | A kind of method for quickly reading of entity data bak |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710904666.3A CN107577812A (en) | 2017-09-29 | 2017-09-29 | A kind of method for quickly reading of entity data bak |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107577812A true CN107577812A (en) | 2018-01-12 |
Family
ID=61039563
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710904666.3A Pending CN107577812A (en) | 2017-09-29 | 2017-09-29 | A kind of method for quickly reading of entity data bak |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107577812A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577817A (en) * | 2017-09-30 | 2018-01-12 | 北京酷我科技有限公司 | A kind of reading/writing method of entity data bak |
CN108647283A (en) * | 2018-05-04 | 2018-10-12 | 武汉灵动在线科技有限公司 | A kind of configuration of game data is quick to be generated and analytic method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101067814A (en) * | 2007-05-10 | 2007-11-07 | 浪潮集团山东通用软件有限公司 | Mapping conversion method between data access level Xml format data and relational data |
CN101901265A (en) * | 2010-07-29 | 2010-12-01 | 中国运载火箭技术研究院 | Objectification management system of virtual test data |
CN102841889A (en) * | 2011-06-20 | 2012-12-26 | 中兴通讯股份有限公司 | Method and device for achieving efficient database access based on ORM (object relational mapping) architecture |
CN106844693A (en) * | 2017-01-24 | 2017-06-13 | 浙江大学 | A kind of conversion methods of openEHR Template to relational database |
-
2017
- 2017-09-29 CN CN201710904666.3A patent/CN107577812A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101067814A (en) * | 2007-05-10 | 2007-11-07 | 浪潮集团山东通用软件有限公司 | Mapping conversion method between data access level Xml format data and relational data |
CN101901265A (en) * | 2010-07-29 | 2010-12-01 | 中国运载火箭技术研究院 | Objectification management system of virtual test data |
CN102841889A (en) * | 2011-06-20 | 2012-12-26 | 中兴通讯股份有限公司 | Method and device for achieving efficient database access based on ORM (object relational mapping) architecture |
CN106844693A (en) * | 2017-01-24 | 2017-06-13 | 浙江大学 | A kind of conversion methods of openEHR Template to relational database |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107577817A (en) * | 2017-09-30 | 2018-01-12 | 北京酷我科技有限公司 | A kind of reading/writing method of entity data bak |
CN108647283A (en) * | 2018-05-04 | 2018-10-12 | 武汉灵动在线科技有限公司 | A kind of configuration of game data is quick to be generated and analytic method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108121542B (en) | MyBatis-based SQL statement configuration method and system | |
CN101958987B (en) | Method and system for dynamically converting telecommunications service data | |
CN104077665A (en) | Power grid project manufacturing cost analysis data collecting system and method | |
CN111125440B (en) | Monad-based persistent layer composite condition query method and storage medium | |
CN103970736A (en) | Method for converting Excel sheet to database table | |
CN102799624B (en) | Large-scale graph data query method in distributed environment based on Datalog | |
CN103500196A (en) | EXCEL data export method and export device in multi-concurrence large data volume environment | |
CN103186467B (en) | Data correctness verification method and device | |
CN103699620A (en) | Method and system for achieving database operation by utilizing object relational mapping (ORM) frame in object orientation | |
CN103488704A (en) | Method and device for storing data | |
CN104750472B (en) | The resource package management method and device of a kind of terminal applies | |
CN101673199A (en) | Terminal parameter configuration server and automatic generating method of software interface thereof | |
CN108536745A (en) | Tables of data extracting method, terminal, equipment and storage medium based on Shell | |
CN104573065A (en) | Report display engine based on metadata | |
CN103605663B (en) | General database checking and metadata loading method | |
CN107577812A (en) | A kind of method for quickly reading of entity data bak | |
CN106844369A (en) | Objectification SQL statement building method and device | |
CN103645895B (en) | Automatic configuration method and cloud compiling system | |
CN107562955A (en) | A kind of rapid generation of SQL statement | |
CN102231676A (en) | Network management data collecting method and device | |
CN107329998A (en) | User's increment class data capture method, device and equipment | |
CN103176782A (en) | Method and device for visiting data bases | |
CN107577816A (en) | A kind of method of entity data bak read-write | |
CN110399534A (en) | Terminal capabilities report form generation method, device, equipment and storage medium | |
CN104572812B (en) | A kind of history data store and indexing means |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180112 |
|
RJ01 | Rejection of invention patent application after publication |