CN106446182A - Database engine - Google Patents

Database engine Download PDF

Info

Publication number
CN106446182A
CN106446182A CN201610860097.2A CN201610860097A CN106446182A CN 106446182 A CN106446182 A CN 106446182A CN 201610860097 A CN201610860097 A CN 201610860097A CN 106446182 A CN106446182 A CN 106446182A
Authority
CN
China
Prior art keywords
data
database
data source
database engine
thread
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
Application number
CN201610860097.2A
Other languages
Chinese (zh)
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.)
Guizhou Media Education Technology Co Ltd
Original Assignee
Guizhou Media Education Technology Co Ltd
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 Guizhou Media Education Technology Co Ltd filed Critical Guizhou Media Education Technology Co Ltd
Priority to CN201610860097.2A priority Critical patent/CN106446182A/en
Publication of CN106446182A publication Critical patent/CN106446182A/en
Pending legal-status Critical Current

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/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management

Abstract

The invention discloses a database engine. The database engine comprises a load balancing data fetching device and a database entity bean, and is characterized in that multiple data source pools which can be connected with databases of different types are established through data source configuration files, data source names are used to obtain data connection from the data source pools, the data connection is put in a thread data connection pool, and the data source pools and the data connection pool are successively connected with a basic sql execution layer, a persistent object sql conversion layer and an external operation interface layer. By adopting the database engine, the higher SQL execution efficiency can be reached, and unnecessary repeated database connection and related operations of jdbc processing can be reduced to gain time and efficiency for developers.

Description

A kind of database engine
Technical field
The present invention relates to a kind of database engine, belongs to database technical field.
Background technology
In Enterprise Project exploitation, in order to development efficiency is improved, reduce development cost, can cut in terms of database processing, Current conventional database processing scheme has two kinds:One is that this scheme relies on bag too much using the ORM that increases income, such as Hibernate, And left-hand seat difficulty is big, efficiency is also less high;Two are operated using pure JDBC, although this scheme execution efficiency highest, but When processing complex data table, developer will remember field name or sequence number, it is easy to malfunction, and be difficult investigation after mistake, And, current data processing scheme, the connection of substantial amounts of repeated data storehouse and jdbc operation is there is mostly, for this purpose, A set of database manipulation engine should be developed in conjunction with actual demand, reduce unnecessary repeated data storehouse connection and jdbc processes phase Operation is closed, is that developer gains time and efficiency.
Content of the invention
This practical technical problem to be solved is to provide a kind of database engine, can reach higher SQL execution efficiency, Unnecessary repeated data storehouse connection can be reduced and jdbc processes associative operation, be that developer gains time and efficiency, overcome The deficiencies in the prior art.
The technical scheme is that:A kind of database engine, which includes that load balancing is fetched data device, database entity Bean, by data source profile, sets up multiple data source ponds that can be connected with different types of data base, with data source Title obtains data cube computation from data source pond, and data cube computation is put into thread-data connection pool, described data source pond and number It is connected with basic sql execution level, persistence object sql conversion layer, peripheral operation interface layer according to connection pool successively.
Same connection is only existed in the same thread of above-mentioned thread-data connection pool.
In above-mentioned entity bean, data base's table name and literary name section are parsed with reflex mechanism.
The data base created by upper data source pond is linked back data source pond by the load balancing device that fetches data.
Prior art compares, the database engine of the present invention, by data source profile, sets up multiple energy and inhomogeneity The data source pond that the data base of type is connected, obtains data cube computation with DSN from data source pond, data cube computation is put Enter thread-data connection pool, a light-weighted underlying database operation framework can be so set up, is reached higher SQL and execute effect Rate, reduces unnecessary repeated data storehouse connection and jdbc processes associative operation, it is often more important that, engine is carried in same application Operate for multi-data source, be data base's solution of the High Availabitity such as data-base cluster, read and write abruption, database loads equilibrium, high capacity Certainly scheme provides the support of program application level, is that developer gains time and efficiency.
Described data source pond and Data Connection Pool successively with basic sql execution level, persistence object sql conversion layer, outer Portion's operate interface layer is connected, so during database table is automatically created:Obtained from data source pond by DSN Data cube computation, and thread-data connection pool is put into, same connection is only existed in same thread, is ensured with this same The affairs of thread request are submitted to, and the sql sentence of hoc queries data table information calls the interface polls of peripheral operation interface layer to go out All table structural informations in data base, loading of databases entity bean, the data of entity bean are parsed by reflex mechanism Storehouse table name and literary name section, judge the data base's table name with the presence or absence of the entity beanr for parsing in data base, do not exist, execute Operation is created, according to the data base's table name for parsing and field, assembling creates the sql sentence of database table, calls peripheral operation The interface of interface layer, executes sql sentence by the connection in line taking journey connection pool, completes database table establishment;Preserving data During:The content for needing to preserve is put in entity bean, the table structure of entity bean is parsed by reflex mechanism and is filled out Content is filled, group will become the insertion sql sentence of database table, the data cube computation in thread pool is obtained by DSN, is passed through The data cube computation of acquirement executes the insertion sql sentence of database table, completes data and preserves warehouse-in;In inquiry data procedures:Group Dress inquiry sql sentence, obtains the data cube computation in thread pool by DSN, executes data by the data cube computation for obtaining The inquiry sql sentence of storehouse table, Query Result is assembled into corresponding list of entities.
Same connection is only existed in the same thread of above-mentioned thread-data connection pool, so can be in same thread mistake When to obtain connection, it is ensured that got is same connection, ensure that with this affairs of same thread request are submitted to.
In above-mentioned entity bean, data base's table name and literary name section are parsed with reflex mechanism, can so be easy to repercussion The relevant information of database table and field is generated, most importantly field is explained and also generated in the lump.
The data base created by upper data source pond connects back to data source pond by the load balancing device that fetches data, and so may not be used Disconnected reservation and expanding data storehouse, meanwhile, load balancing fetch data device using a plurality of network link sharing data stream can be realized Amount.
Description of the drawings
Fig. 1 is the attachment structure schematic diagram of the present invention;
Specific embodiment
Embodiment 1. is as shown in figure 1, a kind of database engine, and which includes that load balancing is fetched data device, database entity Bean, it is characterised in that;By data source profile, multiple data sources that can be connected are set up with different types of data base Pond, obtains data cube computation with DSN from data source pond, and data cube computation is put into thread-data connection pool, described number It is connected with basic sql execution level, persistence object sql conversion layer, peripheral operation interface layer with Data Connection Pool successively according to source pond, Same connection is only existed in the same thread of thread-data connection pool, in entity bean, number is parsed with reflex mechanism According to storehouse table name and literary name section, the data base created by data source pond connects back to data source pond by the load balancing device that fetches data.
Its operation process
1. database table process is automatically created:
1. database entity bean is set up, and in entity, adds self-defining table name and field to explain.
2. pass through data source profile, multi-data source pond is set up, different types of number can be used in same application According to storehouse.
3. data cube computation is obtained from data source pond by DSN, and thread-data connection pool is put into, same Same connection is only existed in individual thread, ensures that with this affairs of same thread request are submitted to.
4. the sql sentence of hoc queries data table information, calls the interface polls of peripheral operation interface layer to go out in data base All table structural informations.
5. loading of databases entity bean, parses data base's table name and the literary name section of entity bean by reflex mechanism.
6. judge the data base's table name with the presence or absence of the entity beanr for parsing in data base.Do not exist and then execute establishment Operation.
7. according to the data base's table name for parsing and field, assembling creates the sql sentence of database table.
8. the interface of peripheral operation interface layer is called, sql sentence is executed by the connection in line taking journey connection pool, complete number Create according to storehouse table.
2. data procedures are preserved:
1. entity bean is set up.
2. the content for needing to preserve is put in entity bean.
3. table structure and the filling content of entity bean are parsed by reflex mechanism.
4. group will become the insertion sql sentence of database table.
5. the data cube computation in thread pool is obtained by DSN.
6. the data cube computation by obtaining executes the insertion sql sentence of database table.
7. data are completed and preserves warehouse-in.
3. data procedures are inquired about:
1. sql sentence is inquired about in assembling.
2. the data cube computation in thread pool is obtained by DSN.
3. the data cube computation by obtaining executes the inquiry sql sentence of database table.
4. Query Result is assembled into corresponding list of entities.

Claims (4)

1. a kind of database engine, which includes that load balancing is fetched data device, database entity bean, it is characterised in that;By number According to source profile, multiple data source ponds that can be connected are set up with different types of data base, with DSN from data Obtain data cube computation in the pond of source, data cube computation be put into thread-data connection pool, described data source pond and Data Connection Pool according to Secondary with basic sql(sql)Execution level, persistence object sql conversion layer, peripheral operation interface layer are connected.
2. the database engine according to right 1 is required, it is characterised in that:The same thread of the thread-data connection pool In only exist same connection.
3. the database engine according to right 1 is required, it is characterised in that:In described entity bean, with reflex mechanism Parse data base's table name and literary name section.
4. the database engine according to right 3 is required, it is characterised in that:Data base (the data base created by data source pond Connection) being fetched data by load equalizer connects back to data source pond.
CN201610860097.2A 2016-09-29 2016-09-29 Database engine Pending CN106446182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610860097.2A CN106446182A (en) 2016-09-29 2016-09-29 Database engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610860097.2A CN106446182A (en) 2016-09-29 2016-09-29 Database engine

Publications (1)

Publication Number Publication Date
CN106446182A true CN106446182A (en) 2017-02-22

Family

ID=58171084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610860097.2A Pending CN106446182A (en) 2016-09-29 2016-09-29 Database engine

Country Status (1)

Country Link
CN (1) CN106446182A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061801A (en) * 2019-12-25 2020-04-24 天津南大通用数据技术股份有限公司 Transaction type database read-write separation implementation method
CN113535149A (en) * 2021-07-27 2021-10-22 在线途游(北京)科技有限公司 Multi-data source configuration and analysis method and device based on user-defined bean

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567301A (en) * 2003-06-23 2005-01-19 华为技术有限公司 Method and apparatus for accessing database
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN102214092A (en) * 2010-10-11 2011-10-12 新太科技股份有限公司 Software development aided tool bag
CN104598840A (en) * 2015-02-04 2015-05-06 新余兴邦信息产业有限公司 Multi-data-source data processing method and system based on HTTP (hyper text transport protocol)
CN104991824A (en) * 2015-08-03 2015-10-21 上海斐讯数据通信技术有限公司 Method and system for dynamically switching application program data sources
CN105549982A (en) * 2016-01-14 2016-05-04 国网山东省电力公司物资公司 Automated development platform based on model configuration
CN105677323A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating database operation layer codes
CN105677324A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating entity type codes
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
CN106446127A (en) * 2016-09-19 2017-02-22 济南浪潮高新科技投资发展有限公司 Method for protecting data consistency using two-dimensional matrix table in database

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1567301A (en) * 2003-06-23 2005-01-19 华为技术有限公司 Method and apparatus for accessing database
CN101339559A (en) * 2008-07-18 2009-01-07 北京航空航天大学 Long lasting implementing method for data
CN102214092A (en) * 2010-10-11 2011-10-12 新太科技股份有限公司 Software development aided tool bag
CN104598840A (en) * 2015-02-04 2015-05-06 新余兴邦信息产业有限公司 Multi-data-source data processing method and system based on HTTP (hyper text transport protocol)
CN104991824A (en) * 2015-08-03 2015-10-21 上海斐讯数据通信技术有限公司 Method and system for dynamically switching application program data sources
CN105677323A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating database operation layer codes
CN105677324A (en) * 2015-12-31 2016-06-15 合肥大多数信息科技有限公司 Method for automatically generating entity type codes
CN105549982A (en) * 2016-01-14 2016-05-04 国网山东省电力公司物资公司 Automated development platform based on model configuration
CN105808776A (en) * 2016-03-29 2016-07-27 中国建设银行股份有限公司 Data management system and method of distributed database
CN106446127A (en) * 2016-09-19 2017-02-22 济南浪潮高新科技投资发展有限公司 Method for protecting data consistency using two-dimensional matrix table in database

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061801A (en) * 2019-12-25 2020-04-24 天津南大通用数据技术股份有限公司 Transaction type database read-write separation implementation method
CN113535149A (en) * 2021-07-27 2021-10-22 在线途游(北京)科技有限公司 Multi-data source configuration and analysis method and device based on user-defined bean

Similar Documents

Publication Publication Date Title
CN104123374B (en) The method and device of aggregate query in distributed data base
Alsubaiee et al. AsterixDB: A scalable, open source BDMS
US8285708B2 (en) Query submission pipeline using LINQ
US10585887B2 (en) Multi-system query execution plan
US8719312B2 (en) Input/output efficiency for online analysis processing in a relational database
CN109446279A (en) Based on neo4j big data genetic connection management method, system, equipment and storage medium
US8090700B2 (en) Method for updating databases
JP2013503381A5 (en)
US20160034272A1 (en) Managing a catalog of scripts
CN107784026A (en) A kind of ETL data processing methods and device
US20220067105A1 (en) Search engine for concatenating and searching combinations of data files
Fotache et al. NoSQL and SQL Databases for Mobile Applications. Case Study: MongoDB versus PostgreSQL.
Ma et al. G-SQL: Fast query processing via graph exploration
CN106446182A (en) Database engine
US8886659B2 (en) Data framework to enable rich processing of data from any arbitrary data source
CN108334620A (en) A kind of method and device operating Cluster Database based on ORM frames
Hasan et al. Data transformation from sql to nosql mongodb based on r programming language
US20140365516A1 (en) Optimization of join queries for related data
Zhang et al. Unified SQL query middleware for heterogeneous databases
US11636113B2 (en) Method for performing multi-caching on data sources of same type and different types by using cluster-based processing system and device using the same
CN108073584B (en) Data processing method and server
Xu et al. A unified computation engine for big data analytics
CN116089476B (en) Data query method and device and electronic equipment
US20230367819A1 (en) Global index with repartitioning operator
CN114416784B (en) Method and device for processing database query statement and native distributed database

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170222