CN108197277A - A kind of unified data base administration querying method and device - Google Patents

A kind of unified data base administration querying method and device Download PDF

Info

Publication number
CN108197277A
CN108197277A CN201810017064.0A CN201810017064A CN108197277A CN 108197277 A CN108197277 A CN 108197277A CN 201810017064 A CN201810017064 A CN 201810017064A CN 108197277 A CN108197277 A CN 108197277A
Authority
CN
China
Prior art keywords
database
library
sql statement
data base
link information
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
CN201810017064.0A
Other languages
Chinese (zh)
Other versions
CN108197277B (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.)
Fujian Star Software Co Ltd
Original Assignee
Fujian Star Software 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 Fujian Star Software Co Ltd filed Critical Fujian Star Software Co Ltd
Priority to CN201810017064.0A priority Critical patent/CN108197277B/en
Publication of CN108197277A publication Critical patent/CN108197277A/en
Application granted granted Critical
Publication of CN108197277B publication Critical patent/CN108197277B/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/25Integrating or interfacing systems involving database management systems

Abstract

The present invention provides a kind of unified data base administration querying method, and the link information of each database and metadata are stored to a storage medium;The SQL statement performed needed for obtaining, parses the SQL statement, obtains the library to be accessed, and the link information of correspondence database is searched from storage medium, and SQL statement is sent to the corresponding database, and result is returned;The present invention provides a kind of unified data base administration inquiry unit, facilitates management and use of the user to database.

Description

A kind of unified data base administration querying method and device
Technical field
The present invention relates to a kind of unified data base administration querying methods and device.
Background technology
The operation system for having many companies different at present uses different databases, when system manager or DBA need It when being managed each library, needs to be managed using different clients, the management of centralization can not be carried out.
Invention content
The technical problem to be solved in the present invention is to provide a kind of unified data base administration querying method and device, Facilitate management and use of the user to database.
What one of present invention was realized in:A kind of unified data base administration querying method, includes the following steps:
Step 1 stores the link information of each database and metadata to a storage medium;
Step 2 obtains the required SQL statement performed, parses the SQL statement, obtains the library to be accessed, from storage medium It is middle to search the link information of correspondence database, and SQL statement is sent to the corresponding database, result is returned.
Further, it further includes step 3, at interval of N seconds, obtains first number from corresponding database according to link information According to, and will be in the metadata updates to storage medium that changed.
Further, the step 2 is specially further:The SQL statement performed needed for obtaining, parses the SQL statement, obtains To the library to be accessed, if the library comes from disparate databases, operation error message is returned to;If the library comes from same data Library, then search the link information of correspondence database from storage medium, and SQL statement is sent to the corresponding database, Result is returned.
Further, the metadata includes library, table, view and field information.
What one of present invention was realized in:A kind of unified data base administration inquiry unit, including following module:
Memory module stores the link information of each database and metadata to a storage medium;
Management module obtains the required SQL statement performed, parses the SQL statement, obtain the library to be accessed, from storage The link information of correspondence database is searched in medium, and SQL statement is sent to the corresponding database, result is returned.
Further, update module is further included, at interval of N seconds, obtains member from corresponding database according to link information Data, and will be in the metadata updates to storage medium that changed.
Further, the management module is specially further:The SQL statement performed needed for obtaining, parses the SQL languages Sentence, obtains the library to be accessed, if the library comes from disparate databases, returns to operation error message;If the library is from same One database, then search the link information of correspondence database from storage medium, and SQL statement is sent to the corresponding number According to library, result is returned.
Further, the metadata includes library, table, view and field information.
The invention has the advantages that:The present invention a kind of unified data base administration querying method and device, convenient for number Centralized management work is carried out to each different database according to library manager, mitigates the negative of database administrator and user of service Load.
Description of the drawings
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the method for the present invention execution flow chart.
Specific embodiment
As shown in Figure 1, the data base administration querying method that the present invention is unified, includes the following steps:
Step 1 stores the link information of each database and metadata to a storage medium, and the metadata includes Library, table, view and field information;
Step 2 obtains the required SQL statement performed, parses the SQL statement, obtains the library to be accessed, if the library is come From disparate databases, then operation error message is returned;If the library comes from same database, search and correspond to from storage medium The link information of database, and SQL statement is sent to the corresponding database, result is returned.
Step 3, at interval of N seconds, metadata, and the member that will have been changed are obtained from corresponding database according to link information In data update to storage medium.
The unified data base administration inquiry unit of the present invention, including following module:
Memory module stores the link information of each database and metadata to a storage medium, the metadata Including library, table, view and field information;
Management module obtains the required SQL statement performed, parses the SQL statement, obtain the library to be accessed, if described Library comes from disparate databases, then returns to operation error message;If the library comes from same database, searched from storage medium The link information of correspondence database, and SQL statement is sent to the corresponding database, result is returned.
At interval of N seconds, metadata is obtained, and will change according to link information from corresponding database for update module Metadata updates to storage medium in.
A kind of specific embodiment of the present invention:
Scenario-frame:
Unified front end (page/client), server, metadata management, Sql parsings, database
Key step:
One) system initialization
Need a storage medium (can be database or disk file etc.) record each database link information, Library, table, view, field information.
Metadata management service needs to record the link information of each database in advance, is stored in storage medium, mainly There is following information:
Database-name:Unique data library name in metadata management system, generally with the target data to be accessed Library name is identical, if there is the database of duplication of name in different database servers, is modified as with target database difference.
Type of database:The type of target database
Database connection string information:Access the connection string information of various databases.Such as the connection string of mysql databases:" jdbc:mysql:// database IP address:Port /+Target database name to be accessed "
User name:The user name of database is accessed, generally requires the high access rights of comparison.
Password:Access the password of data source.Encryption is needed to store.
2nd, when startup of server, link information that metadatabase management module can be in 1, by all databases The reading of the information such as library, table, view field comes, will be in its deposit storage medium of correspondence with link information.
Two) metadata management
1st, user can inquire all metadata (i.e. all databases of system binding, table, view, field in front end Information), metadata is only read from local storage medium when inquiry.
2nd, user initiates operation in front end using the sql like language of standard, and system does following processing:
2.1st, user can realize selected which database of operation, if user specifies in advance operates which library, user The SQL statement of following operating database is all sent directly to database execution.
If 2.2 users do not specify which database operated in advance, first using existing Sql analytical frameworks, parse Which library is accessed in sentence.Note that these libraries is only allowed otherwise directly to report operating mistake from same database server. Error message is returned to front end, without subsequent operation.Behind the library accessed, it is corresponding that these libraries are found out from storage medium Sql grammers are sent to corresponding database server and performed by database linkage information.
If 2.3 Sql perform failure, error message is returned, is otherwise return success, before result be presented to unification End.
2.4 if the Sql of DDL, then the metadatabase correlation of the storage medium on server is updated after Sql runs succeeded Information.
Three) timing operation is handled
The 1st, if user directly carries out relevant operation, if additions and deletions change Ku Biao or field, metadata management system in database System not can be appreciated that updated information.So it needs to set a timing operation, every N seconds (duration interval can be by user setting) According to the link information preserved in storage medium, target database is gone to read metadata information, by the part update of modification to depositing In storage media, to keep the data in metadata management system consistent with the information in actual database.
Although specific embodiments of the present invention have been described above, those familiar with the art should manage Solution, our described specific embodiments are merely exemplary rather than for the restriction to the scope of the present invention, are familiar with this The equivalent modification and variation that the technical staff in field is made in the spirit according to the present invention, should all cover the present invention's In scope of the claimed protection.

Claims (8)

1. a kind of unified data base administration querying method, it is characterised in that:Include the following steps:
Step 1 stores the link information of each database and metadata to a storage medium;
Step 2 obtains the required SQL statement performed, parses the SQL statement, obtains the library to be accessed, looked into from storage medium The link information of correspondence database is looked for, and SQL statement is sent to the corresponding database, result is returned.
2. a kind of unified data base administration querying method as described in claim 1, it is characterised in that:Further include step 3, every Interval N second obtains metadata according to link information from corresponding database, and by the metadata updates changed to storing Jie In matter.
3. a kind of unified data base administration querying method as described in claim 1, it is characterised in that:The step 2 is into one Step is specially:The SQL statement performed needed for obtaining, parses the SQL statement, obtains the library to be accessed, if the library is not from Same database, then return to operation error message;If the library comes from same database, corresponding data is searched from storage medium The link information in library, and SQL statement is sent to the corresponding database, result is returned.
4. a kind of unified data base administration querying method as described in claim 1, it is characterised in that:The metadata includes Library, table, view and field information.
5. a kind of unified data base administration inquiry unit, it is characterised in that:Including following module:
Memory module stores the link information of each database and metadata to a storage medium;
Management module obtains the required SQL statement performed, parses the SQL statement, obtain the library to be accessed, from storage medium It is middle to search the link information of correspondence database, and SQL statement is sent to the corresponding database, result is returned.
6. a kind of unified data base administration inquiry unit as claimed in claim 5, it is characterised in that:Further include update mould At interval of N seconds, metadata is obtained, and by the metadata updates changed extremely according to link information from corresponding database for block In storage medium.
7. a kind of unified data base administration inquiry unit as claimed in claim 5, it is characterised in that:The management module into One step is specially:The SQL statement performed needed for obtaining, parses the SQL statement, obtains the library to be accessed, if the library comes from Disparate databases then return to operation error message;If the library comes from same database, corresponding number is searched from storage medium The corresponding database is sent to according to the link information in library, and by SQL statement, result is returned.
8. a kind of unified data base administration inquiry unit as claimed in claim 5, it is characterised in that:The metadata includes Library, table, view and field information.
CN201810017064.0A 2018-01-09 2018-01-09 Unified database management query method and device Active CN108197277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810017064.0A CN108197277B (en) 2018-01-09 2018-01-09 Unified database management query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810017064.0A CN108197277B (en) 2018-01-09 2018-01-09 Unified database management query method and device

Publications (2)

Publication Number Publication Date
CN108197277A true CN108197277A (en) 2018-06-22
CN108197277B CN108197277B (en) 2023-02-14

Family

ID=62588717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810017064.0A Active CN108197277B (en) 2018-01-09 2018-01-09 Unified database management query method and device

Country Status (1)

Country Link
CN (1) CN108197277B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110807037A (en) * 2018-08-03 2020-02-18 中国移动通信集团广东有限公司 Data modification method and device, electronic equipment and storage medium
CN111639078A (en) * 2020-05-25 2020-09-08 北京百度网讯科技有限公司 Data query method and device, electronic equipment and readable storage medium
CN111651470A (en) * 2019-03-04 2020-09-11 顺丰科技有限公司 Unified SQL execution and query method and system
CN111708803A (en) * 2020-06-11 2020-09-25 北京计算机技术及应用研究所 Universal heterogeneous database data management method

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184241A (en) * 1999-12-24 2001-07-06 Nec Software Shikoku Ltd Method and device for automatically generating data base access program, and recording medium
US20030182212A1 (en) * 2002-03-22 2003-09-25 Moscone Daniel Patrick Methods and systems for managing business information
US20070130133A1 (en) * 2005-12-02 2007-06-07 Oracle International Corporation Incorporating network constraints into a network data model for a relational database management system
CN101196926A (en) * 2007-12-29 2008-06-11 中国建设银行股份有限公司 Database access platform and access method thereof
CN101639776A (en) * 2009-09-07 2010-02-03 陈小青 Database access and integration method and system thereof
CN102033912A (en) * 2010-11-25 2011-04-27 北京北纬点易信息技术有限公司 Distributed-type database access method and system
CN103678609A (en) * 2013-12-16 2014-03-26 中国科学院计算机网络信息中心 Large data inquiring method based on distribution relation-object mapping processing
CN103914572A (en) * 2014-04-29 2014-07-09 福建星网视易信息系统有限公司 Database construction system, device and method
CN104408174A (en) * 2014-12-12 2015-03-11 用友软件股份有限公司 Database routing device and method
US20160078079A1 (en) * 2014-09-17 2016-03-17 Futurewei Technologies, Inc. Statement based migration for adaptively building and updating a column store database from a row store database based on query demands using disparate database systems
CN105608085A (en) * 2014-11-17 2016-05-25 北京明略软件系统有限公司 Data query method and device of hybrid storage media
CN106503087A (en) * 2016-10-12 2017-03-15 郑州云海信息技术有限公司 A kind of database middleware for Distributed Data Visits
WO2017049911A1 (en) * 2015-09-21 2017-03-30 中兴通讯股份有限公司 Method, device, and database server for implementing distributed transaction

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184241A (en) * 1999-12-24 2001-07-06 Nec Software Shikoku Ltd Method and device for automatically generating data base access program, and recording medium
US20030182212A1 (en) * 2002-03-22 2003-09-25 Moscone Daniel Patrick Methods and systems for managing business information
US20070130133A1 (en) * 2005-12-02 2007-06-07 Oracle International Corporation Incorporating network constraints into a network data model for a relational database management system
CN101196926A (en) * 2007-12-29 2008-06-11 中国建设银行股份有限公司 Database access platform and access method thereof
CN101639776A (en) * 2009-09-07 2010-02-03 陈小青 Database access and integration method and system thereof
CN102033912A (en) * 2010-11-25 2011-04-27 北京北纬点易信息技术有限公司 Distributed-type database access method and system
CN103678609A (en) * 2013-12-16 2014-03-26 中国科学院计算机网络信息中心 Large data inquiring method based on distribution relation-object mapping processing
CN103914572A (en) * 2014-04-29 2014-07-09 福建星网视易信息系统有限公司 Database construction system, device and method
US20160078079A1 (en) * 2014-09-17 2016-03-17 Futurewei Technologies, Inc. Statement based migration for adaptively building and updating a column store database from a row store database based on query demands using disparate database systems
CN105608085A (en) * 2014-11-17 2016-05-25 北京明略软件系统有限公司 Data query method and device of hybrid storage media
CN104408174A (en) * 2014-12-12 2015-03-11 用友软件股份有限公司 Database routing device and method
WO2017049911A1 (en) * 2015-09-21 2017-03-30 中兴通讯股份有限公司 Method, device, and database server for implementing distributed transaction
CN106503087A (en) * 2016-10-12 2017-03-15 郑州云海信息技术有限公司 A kind of database middleware for Distributed Data Visits

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
WU J: "Heterogeneous data integration model based on virtual view", 《2012 7TH INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE & EDUCATION (ICCSE)》 *
李欣: "针对数据库中元数据的采集方法设计与实现", 《信息技术与信息化》 *
王金萍: "传感网异构数据采集及数据融合技术的研究与实现", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
胡文杰 等: "基于元数据库方法的高校档案信息资源整合策略", 《新校园(上旬刊)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110807037A (en) * 2018-08-03 2020-02-18 中国移动通信集团广东有限公司 Data modification method and device, electronic equipment and storage medium
CN111651470A (en) * 2019-03-04 2020-09-11 顺丰科技有限公司 Unified SQL execution and query method and system
CN111639078A (en) * 2020-05-25 2020-09-08 北京百度网讯科技有限公司 Data query method and device, electronic equipment and readable storage medium
CN111708803A (en) * 2020-06-11 2020-09-25 北京计算机技术及应用研究所 Universal heterogeneous database data management method

Also Published As

Publication number Publication date
CN108197277B (en) 2023-02-14

Similar Documents

Publication Publication Date Title
US9251163B2 (en) File sharing system and file sharing method
CN108197277A (en) A kind of unified data base administration querying method and device
US7720863B2 (en) Security view-based, external enforcement of business application security rules
US7865537B2 (en) File sharing system and file sharing method
US6574655B1 (en) Associative management of multimedia assets and associated resources using multi-domain agent-based communication between heterogeneous peers
US8214355B2 (en) Small table: multitenancy for lots of small tables on a cloud database
US7797281B1 (en) Granular restore of data objects from a directory service
US20090012932A1 (en) Method and System For Data Storage And Management
US8103624B2 (en) Apparatus and method for automating the logging of table changes in a database
US20100042605A1 (en) Versioning relational database disjoint records
CN103067463A (en) Centralized management system and centralized management method for user root permission
US20150205834A1 (en) PROVIDING FILE METADATA QUERIES FOR FILE SYSTEMS USING RESTful APIs
US20140136496A1 (en) System, method and non-transitory computer readable storage medium for supporting network file accessing and versioning with multiple protocols in a cloud storage server
US7363328B2 (en) Method and system for modifying schema definitions
US10885036B2 (en) Obtaining incremental updates from a database using a partial query
US20190377827A1 (en) Method and system for scalable search using microservice and cloud based search with records indexes
US9626410B2 (en) Vertically partitioned databases
CN110334545B (en) SQL-based permission control method and device and electronic equipment
JP2023534656A (en) Archiving of accelerator-only database tables
US11580152B1 (en) Using path-based indexing to access media recordings stored in a media storage service
CN113377876A (en) Domino platform-based data sub-database processing method, device and platform
US10664501B2 (en) Deriving and interpreting users collective data asset use across analytic software systems
US20170316045A1 (en) Read-after-write consistency for derived non-relational data
CN110825838A (en) Object storage aggregation system and aggregation method thereof
US9020985B2 (en) System and method for managing directories for a database system having an in-memory database

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
CB02 Change of applicant information

Address after: 350000 21 / F, building 5, f District, Fuzhou Software Park, 89 software Avenue, Gulou District, Fuzhou City, Fujian Province

Applicant after: FUJIAN SINOREGAL SOFTWARE CO.,LTD.

Address before: Floor 20-21, building 5, area F, Fuzhou Software Park, 89 software Avenue, Gulou District, Fuzhou City, Fujian Province 350000

Applicant before: FUJIAN SINOREGAL SOFTWARE CO.,LTD.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant