[go: up one dir, main page]

CN110046287A - A kind of the data query method, apparatus and storage medium unrelated with type of database - Google Patents

A kind of the data query method, apparatus and storage medium unrelated with type of database Download PDF

Info

Publication number
CN110046287A
CN110046287A CN201910209044.8A CN201910209044A CN110046287A CN 110046287 A CN110046287 A CN 110046287A CN 201910209044 A CN201910209044 A CN 201910209044A CN 110046287 A CN110046287 A CN 110046287A
Authority
CN
China
Prior art keywords
database
data
data resource
query
resource catalogue
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
CN201910209044.8A
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.)
Xiamen Meiya Pico Information Co Ltd
Original Assignee
Xiamen Meiya Pico Information 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 Xiamen Meiya Pico Information Co Ltd filed Critical Xiamen Meiya Pico Information Co Ltd
Priority to CN201910209044.8A priority Critical patent/CN110046287A/en
Publication of CN110046287A publication Critical patent/CN110046287A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing

Landscapes

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

Abstract

The present invention provides a kind of the data query method, apparatus and storage medium unrelated with type of database.The present invention is by defining data resource catalogue, data resource catalogue data item, database, the relationship between tables of data, to provide the unified query interface of multitype database, this method passes through the unified query interface inquiry request, and be based on it to be distributed to corresponding database enquiry services after configuration information is parsed, query service is inquired in corresponding database according to the query statement of the corresponding databases such as query argument in inquiry request and returns to query result.So as to shield the difference between disparate databases realization, data are retrieved.So that it is not necessary to modify codes for the switching of Database Systems, arbitrarily switching underlying database system can be achieved by the modification of configuration information, using Database Systems with better function, and joined permission control in inquiry request, the safety for improving data base querying, improves user experience.

Description

A kind of the data query method, apparatus and storage medium unrelated with type of database
Technical field
The present invention relates to database processing technical field, especially a kind of data query side unrelated with type of database Method, device and storage medium.
Background technique
With flourishing for database technology, existing database type class is various.In enterprises as business is sent out The difference in exhibition stage can use disparate databases memory scan or same type data differently with batch data in different phase Domain is different inter-sectional using disparate databases memory scan.Same data need to make in different Database Systems With all relevant query statements in the query language modification business of associated databases.
Enterprise may use the ORM frame similar to Hibernate at present, to reduce system R variation Cost.The type for the NoSql that the OGM frame of Hibernate is supported is also less.The scheme of Hibernate is at this stage to NoSql branch Holding property is poor, and the NoSql type that Hibernate OGM is supported is few, is not available in production environment and can not externally provide interface And carry out rights management.
Therefore, the unified query of database is a difficult point in the prior art, and in the related letter for configuring multiple databases Workload is very big when breath, and later period modification difficulty is big, is not convenient to use, and can not provide unified rights management.
Summary of the invention
The present invention is directed to above-mentioned defect in the prior art, proposes following technical solution.
A kind of data query method unrelated with type of database, this method comprises:
Receiving step, receives the inquiry request of input, and the inquiry request is identified including at least data resource catalogue resourceId;
Analyzing step identifies resourceId according to the data resource catalogue and is parsed to obtain data to configuration information Library table identifies tableId and type of database dbType;
The inquiry request is distributed to corresponding data base querying according to type of database dbType and taken by distributing step Business;
Generation step, the query service generate dbType according to the query argument params encapsulation in the inquiry request The query statement of corresponding database;
Return step is inquired in the corresponding database of dbType using the query statement and returns to inquiry knot Fruit.
It further, further include rights parameters in the inquiry request, after receiving the inquiry request, to described Rights parameters are judged, are continued operation when user has search access right, when user does not have search access right, are interrupted Inquiry operation simultaneously sends prompting message to user.
Further, the configuration information include data resource catalogue and database table corresponding relationship and database with The corresponding relationship of database table.
Further, the corresponding relationship of the data resource catalogue and database table include data resource directory information and It include database information and database table information, number in the corresponding relationship of database table information, the database and database table It include data resource catalogue mark resourceId, data resource code resourceCode and data money according to Resource TOC information Source source dataSource;The database information includes database link information, type of database dbType and database mark Know bigdataResourceId;The database table information includes table name tableName, Database Identification BigdataResourceId, table satellite information tableJson and database table identify tableId, pass through Database Identification BigdataResourceId establishes the corresponding relationship of database and database table, is identified by data resource catalogue ResourceId and database table mark tableId establishes the corresponding relationship of data resource catalogue and database table.
Further, the data resource catalogue includes multiple data resource catalogue data items, the data resource mesh Recording data item includes data item standard code itemCode, data item title itemName, tables of data actual storage field Name storeCloumn and affiliated data resource catalogue identify resourceId, are identified by the data resource catalogue ResourceId establishes the incidence relation of data resource catalogue Yu multiple data resource catalogue data items.
Further, data resource catalogue mark is first passed through when generating the query statement of the corresponding database of dbType ResourceId and data item standard code itemCode determines tables of data actual storage field name storeCloumn, then base TableId, tables of data actual storage field name storeCloumn and the query argument are identified in the database table Params generates the query statement of the corresponding database of dbType.
The invention also provides a kind of data query device unrelated with type of database, which includes:
Receiving unit, inquiry request for receiving input, the inquiry request are identified including at least data resource catalogue resourceId;
Resolution unit is parsed to obtain for identifying resourceId according to the data resource catalogue to configuration information Database table identifies tableId and type of database dbType;
Dispatching Unit, for the inquiry request to be distributed to corresponding data base querying according to type of database dbType Service;
Generation unit is encapsulated according to the query argument params in the inquiry request for the query service and is generated The query statement of the corresponding database of dbType;
Return unit, for being inquired in the corresponding database of dbType using the query statement and returning to inquiry As a result.
It further, further include rights parameters in the inquiry request, after receiving the inquiry request, to described Rights parameters are judged, are continued operation when user has search access right, when user does not have search access right, are interrupted Inquiry operation simultaneously sends prompting message to user.
Further, the configuration information include data resource catalogue and database table corresponding relationship and database with The corresponding relationship of database table.
Further, the corresponding relationship of the data resource catalogue and database table include data resource directory information and It include database information and database table information, number in the corresponding relationship of database table information, the database and database table It include data resource catalogue mark resourceId, data resource code resourceCode and data money according to Resource TOC information Source source dataSource;The database information includes database link information, type of database dbType and database mark Know bigdataResourceId;The database table information includes table name tableName, Database Identification BigdataResourceId, table satellite information tableJson and database table identify tableId, pass through Database Identification BigdataResourceId establishes the corresponding relationship of database and database table, is identified by data resource catalogue ResourceId and database table mark tableId establishes the corresponding relationship of data resource catalogue and database table.
Further, the data resource catalogue includes multiple data resource catalogue data items, the data resource mesh Recording data item includes data item standard code itemCode, data item title itemName, tables of data actual storage field Name storeCloumn and affiliated data resource catalogue identify resourceId, are identified by the data resource catalogue ResourceId establishes the incidence relation of data resource catalogue Yu multiple data resource catalogue data items.
Further, data resource catalogue mark is first passed through when generating the query statement of the corresponding database of dbType ResourceId and data item standard code itemCode determines tables of data actual storage field name storeCloumn, then base TableId, tables of data actual storage field name storeCloumn and the query argument are identified in the database table Params generates the query statement of the corresponding database of dbType.
The invention also provides a kind of computer readable storage medium, computer program generation is stored on the storage medium Code, above-mentioned any method is executed when the computer program code is computer-executed.
Technical effect of the invention are as follows: the present invention is by defining data resource catalogue, data resource catalogue data item, number According to the relationship between library, tables of data, to provide the unified query interface of multitype database, pass through the unified query interface Inquiry request, and it is based on to be distributed to corresponding database enquiry services after configuration information is parsed, query service according to The query statement of the corresponding database such as the query argument in inquiry request, which is inquired and returned in corresponding database, to be looked into Ask result.So as to shield the difference between disparate databases realization, data are retrieved.So that the switching of Database Systems is not necessarily to Code is modified, i.e., arbitrarily switching underlying database system can be achieved by the modification of configuration information, use data with better function Library system, and joined permission control in inquiry request, the safety of data base querying is improved, user experience is improved.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon.
Fig. 1 is a kind of flow chart of the unrelated data query method of the and type of database of embodiment according to the present invention.
Fig. 2 is a kind of structure chart of the unrelated data query device of the and type of database of embodiment according to the present invention.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows a kind of unrelated data query method of and type of database of the invention, this method comprises:
Receiving step S101, receives the inquiry request of input, and the inquiry request is identified including at least data resource catalogue resourceId。
Analyzing step S102 identifies resourceId according to the data resource catalogue and is parsed to obtain to configuration information Database table identifies tableId and type of database dbType.
The inquiry request is distributed to corresponding data base querying according to type of database dbType by distributing step S103 Service.
Generation step S104, the query service are encapsulated according to the query argument params in the inquiry request and are generated The query statement of the corresponding database of dbType.
Return step S105 is inquired in the corresponding database of dbType using the query statement and is returned to inquiry As a result.
In one embodiment, receiving step S101 receives inquiry request, at least one query argument of inquiry request, inquiry Parameter in request is as shown in table 1.
Table 1
As the format of an inquiry request indicates to be identified as resourceId's in resource object for (resourceId, M) It is inquired in data resource catalogue, permission M, indicates that whole permissions, query argument field are that empty expression returns to preceding 10 records.
Params in inquiry request comes from table 2.
Table 2
Each parameter in table 2 can be used for customizing various querying conditions, facilitate the operation of user.Where's in table 2 is optional Parameter is as shown in table 3, can be used for customizing increasingly complex querying condition.
Table 3
The optional parameters of order in table 2 is as shown in table 4, for defining sortord, is also used for customizing increasingly complex Querying condition.
Table 4
The optional parameters of page in table 2 is as shown in table 5, for defining display pattern, is also used for customizing increasingly complex Querying condition.
Table 5
In one embodiment, a variety of inquiry requests can be defined by the parameter in table 1-5, met the needs of users, Further include rights parameters in the inquiry request, after receiving the inquiry request, the rights parameters are judged, when User continues operation when having search access right, and when user does not have search access right, interrupt inquiry operation is simultaneously sent out to user Prompting message is sent, prompting message can be warning or text prompt, and user is prompted not have the search access right of database.
The configuration information used in analyzing step S102 includes the corresponding relationship of data resource catalogue and database table With the corresponding relationship of database and database table.The corresponding relationship of the data resource catalogue and database table includes data resource It include database information and database in the corresponding relationship of directory information and database table information, the database and database table Table information, data resource directory information include data resource catalogue mark resourceId, data resource code ResourceCode and data source resource dataSource;The database information includes database link information, database Type dbType and Database Identification bigdataResourceId;The database table information includes table name tableName, number TableId is identified according to library mark bigdataResourceId, table satellite information tableJson and database table, passes through database Mark bigdataResourceId establishes the corresponding relationship of database and database table, is identified by data resource catalogue ResourceId and database table mark tableId establishes the corresponding relationship of data resource catalogue and database table.
In one embodiment, database information is defined, specifically includes that database link information (connSetting, ground Location, port, database, mode, user name, password, database connection pool size etc.), database generic (dbType, example Such as: 01:mongo, 02:mysql, 03:solr etc.), database configuration unique encodings (bigdataResourceId) is generated. Database table information is defined, is specifically included that table name (tableName), database encodes (in step 1 BigdataResourceId), table satellite information (tableJson, configurable to divide table information), it is unique to generate database table configuration It encodes (tableId), such database table can associate with database.
In one embodiment, the data resource catalogue includes multiple data resource catalogue data items, the data money Source directory data item includes data item standard code itemCode, data item title itemName, tables of data actual storage Field name storeCloumn and affiliated data resource catalogue identify resourceId, are identified by the data resource catalogue ResourceId establishes the incidence relation of data resource catalogue Yu multiple data resource catalogue data items.For example, defining data money Source directory data item information specifically includes that data item standard code (itemCode), data item title (itemName), Tables of data actual storage field name (storeCloumn), affiliated data resource catalog code (resourceId).Such as: identity Externally unified exposure standard code itemCode is A000001 to card, and title itemName is idCard, and actual database The practical field of A table may be idCard when storage, and the practical field of B table is id_card, can externally provide system by configuring in this way One coding, shields the difference of disparate databases literary name section name.
By above-mentioned relation, just construct data resource catalogue, data resource catalogue data item, database, tables of data it Between relationship, thus may be used the inquiry operation that unified data-interface carries out multitype database, this is the application One of important inventive point.
In one embodiment, generation step S104 is first passed through when generating the query statement of the corresponding database of dbType Data resource catalogue mark resourceId and data item standard code itemCode determines tables of data actual storage field name StoreCloumn, be then based on database table mark tableId, tables of data actual storage field name storeCloumn with And the query argument params generates the query statement of the corresponding database of dbType.
In one embodiment, return step S105, using the query statement in the corresponding database of dbType into Row is inquired and returns to query result.The parameter and meaning that query result returns are as shown in table 6.
Table 6
Parameter of the result parameter in table 7 in table 6.
Table 7
Parameter of the data parameter in table 8 in table 6.
Table 8
This method is by defining data resource catalogue, data resource catalogue data item, database, the pass between tables of data System, to provide the unified query interface (for example, can be encapsulated as Rest interface) of multitype database, is connect by the unified query Mouth receives inquiry request, and it is based on to be distributed to corresponding database enquiry services after configuration information is parsed, inquiry clothes Business is inquired simultaneously in corresponding database according to the query statement of the corresponding databases such as query argument in inquiry request Return to query result.So as to shield the difference between disparate databases realization, data are retrieved.So that Database Systems are cut Change that it is not necessary to modify codes, i.e., it is with better function arbitrarily switching underlying database system, use to can be achieved by the modification of configuration information Database Systems, and joined permission control in inquiry request, improve the safety of data base querying, improve user Experience.Method of the invention can be used for cloud platform, large-scale database system, enterprise database system, distributed data base system System etc., provides the data query service of integration across database system.
With further reference to Fig. 2, as the realization to method shown in above-mentioned Fig. 1, this application provides a kind of and class databases One embodiment of the unrelated data query device of type, the Installation practice is corresponding with embodiment of the method shown in FIG. 1, the dress Setting specifically may include in various electronic equipments.
Fig. 2 shows a kind of unrelated data query device of and type of database of the invention, which includes:
Receiving unit 201, inquiry request for receiving input, the inquiry request include at least data resource catalogue mark Know resourceId.
Resolution unit 202 parses configuration information for identifying resourceId according to the data resource catalogue Obtain database table mark tableId and type of database dbType.
Dispatching Unit 203, for the inquiry request to be distributed to corresponding database according to type of database dbType Query service.
Generation unit 204 encapsulates life according to the query argument params in the inquiry request for the query service At the query statement of the corresponding database of dbType.
Return unit 205, for being inquired and being returned in the corresponding database of dbType using the query statement Query result.
In one embodiment, receiving unit 201 is for receiving inquiry request, at least one query argument of inquiry request, Parameter in inquiry request is as shown in Table 1 above.
As the format of an inquiry request indicates to be identified as resourceId's in resource object for (resourceId, M) It is inquired in data resource catalogue, permission M, indicates that whole permissions, query argument field are that empty expression returns to preceding 10 records.
Params in inquiry request comes from above-mentioned table 2.Each parameter in above-mentioned table 2 can be used for customizing various inquiry items Part facilitates the operation of user.The optional parameters of where in above-mentioned table 2 is as shown in Table 3 above, can be used for customizing increasingly complex Querying condition.The optional parameters of order in above-mentioned table 2 is as shown in Table 4 above, and for defining sortord, it is fixed to be also used for Make increasingly complex querying condition.The optional parameters of page in above-mentioned table 2 is as shown in Table 5 above, for defining display Mode is also used for customizing increasingly complex querying condition.
In one embodiment, a variety of inquiry requests can be defined by the parameter in above-mentioned table 1-5, meets the need of user It asks, further includes rights parameters in the inquiry request, after receiving the inquiry request, the rights parameters are sentenced It is disconnected, continued operation when user has search access right, when user does not have search access right, interrupt inquiry operation and to Family sends prompting message, and prompting message can be warning or text prompt, and user is prompted not have the search access right of database.
The configuration information used in resolution unit 202 include data resource catalogue and database table corresponding relationship and The corresponding relationship of database and database table.The corresponding relationship of the data resource catalogue and database table includes data resource mesh It include database information and database table in the corresponding relationship of record information and database table information, the database and database table Information, data resource directory information include data resource catalogue mark resourceId, data resource code resourceCode With data source resource dataSource;The database information include database link information, type of database dbType and Database Identification bigdataResourceId;The database table information includes table name tableName, Database Identification BigdataResourceId, table satellite information tableJson and database table identify tableId, pass through Database Identification BigdataResourceId establishes the corresponding relationship of database and database table, is identified by data resource catalogue ResourceId and database table mark tableId establishes the corresponding relationship of data resource catalogue and database table.
In one embodiment, database information is defined, specifically includes that database link information (connSetting, ground Location, port, database, mode, user name, password, database connection pool size etc.), database generic (dbType, example Such as: 01:mongo, 02:mysql, 03:solr etc.), database configuration unique encodings (bigdataResourceId) is generated. Database table information is defined, is specifically included that table name (tableName), database encodes (in step 1 BigdataResourceId), table satellite information (tableJson, configurable to divide table information), it is unique to generate database table configuration It encodes (tableId), such database table can associate with database.
In one embodiment, the data resource catalogue includes multiple data resource catalogue data items, the data money Source directory data item includes data item standard code itemCode, data item title itemName, tables of data actual storage Field name storeCloumn and affiliated data resource catalogue identify resourceId, are identified by the data resource catalogue ResourceId establishes the incidence relation of data resource catalogue Yu multiple data resource catalogue data items.For example, defining data money Source directory data item information specifically includes that data item standard code (itemCode), data item title (itemName), Tables of data actual storage field name (storeCloumn), affiliated data resource catalog code (resourceId).Such as: identity Externally unified exposure standard code itemCode is A000001 to card, and title itemName is idCard, and actual database The practical field of A table may be idCard when storage, and the practical field of B table is id_card, can externally provide system by configuring in this way One coding, shields the difference of disparate databases literary name section name.
By above-mentioned relation, just construct data resource catalogue, data resource catalogue data item, database, tables of data it Between relationship, thus may be used the inquiry operation that unified data-interface carries out multitype database, this is the application One of important inventive point.
In one embodiment, generation unit 204 is first passed through when generating the query statement of the corresponding database of dbType Data resource catalogue mark resourceId and data item standard code itemCode determines tables of data actual storage field name StoreCloumn, be then based on database table mark tableId, tables of data actual storage field name storeCloumn with And the query argument params generates the query statement of the corresponding database of dbType.
In one embodiment, return unit 205 are carried out in the corresponding database of dbType using the query statement It inquires and returns to query result.The parameter and meaning that query result returns are as shown in Table 6 above.Result ginseng in above-mentioned table 6 Parameter of the number in above-mentioned table 7.Parameter of the data parameter in above-mentioned table 8 in above-mentioned table 6.
The present apparatus is by defining data resource catalogue, data resource catalogue data item, database, the pass between tables of data System, to provide the unified query interface (for example, can be encapsulated as Rest interface) of multitype database, is connect by the unified query Mouth receives inquiry request, and it is based on to be distributed to corresponding database enquiry services after configuration information is parsed, inquiry clothes Business is inquired simultaneously in corresponding database according to the query statement of the corresponding databases such as query argument in inquiry request Return to query result.So as to shield the difference between disparate databases realization, data are retrieved.So that Database Systems are cut Change that it is not necessary to modify codes, i.e., it is with better function arbitrarily switching underlying database system, use to can be achieved by the modification of configuration information Database Systems, and joined permission control in inquiry request, improve the safety of data base querying, improve user Experience.The device of the invention can be used for cloud platform, large-scale database system, enterprise database system, distributed data base system System etc., provides the data query service of integration across database system.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this The function of each unit can be realized in the same or multiple software and or hardware when application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can It realizes by means of software and necessary general hardware platform.Based on this understanding, the technical solution essence of the application On in other words the part that contributes to existing technology can be embodied in the form of software products, the computer software product It can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes the certain of each embodiment of the application or embodiment Method described in part.
It should be noted last that: above embodiments only illustrate and not to limitation technical solution of the present invention, although reference Above-described embodiment describes the invention in detail, those skilled in the art should understand that: it still can be to this hair It is bright to be modified or replaced equivalently, it without departing from the spirit or scope of the invention, or any substitutions, should all It is included within the scope of the claims of the present invention.

Claims (13)

1. a kind of data query method unrelated with type of database, which is characterized in that this method comprises:
Receiving step, receives the inquiry request of input, and the inquiry request is identified including at least data resource catalogue resourceId;
Analyzing step identifies resourceId according to the data resource catalogue and is parsed to obtain database table to configuration information Identify tableId and type of database dbType;
The inquiry request is distributed to corresponding database enquiry services according to type of database dbType by distributing step;
Generation step, the query service generate dbType according to the query argument params encapsulation in the inquiry request and correspond to Database query statement;
Return step is inquired in the corresponding database of dbType using the query statement and returns to query result.
2. being received the method according to claim 1, wherein further including rights parameters in the inquiry request To after the inquiry request, the rights parameters are judged, when user have search access right when continue operation, when with When family does not have search access right, interrupt inquiry operation simultaneously sends prompting message to user.
3. according to the method described in claim 2, it is characterized in that, the configuration information includes data resource catalogue and database The corresponding relationship and database of table and the corresponding relationship of database table.
4. according to the method described in claim 3, it is characterized in that, the corresponding relationship of the data resource catalogue and database table It include database in the corresponding relationship of the database and database table including data resource directory information and database table information Information and database table information, data resource directory information include data resource catalogue mark resourceId, data resource generation Code resourceCode and data source resource dataSource;The database information includes database link information, data Library type dbType and Database Identification bigdataResourceId;The database table information include table name tableName, Database Identification bigdataResourceId, table satellite information tableJson and database table identify tableId, pass through data Library mark bigdataResourceId establishes the corresponding relationship of database and database table, is identified by data resource catalogue ResourceId and database table mark tableId establishes the corresponding relationship of data resource catalogue and database table.
5. according to the method described in claim 4, it is characterized in that, the data resource catalogue includes multiple data resource catalogues Data item, the data resource catalogue data item include data item standard code itemCode, data item title ItemName, tables of data actual storage field name storeCloumn and affiliated data resource catalogue identify resourceId, pass through Data resource catalogue mark resourceId establishes being associated with for data resource catalogue and multiple data resource catalogue data items Relationship.
6. according to the method described in claim 5, it is characterized in that, when generating the query statement of the corresponding database of dbType It first passes through data resource catalogue mark resourceId and data item standard code itemCode and determines tables of data actual storage word Section name storeCloumn is then based on database table the mark tableId, tables of data actual storage field name The storeCloumn and query argument params generates the query statement of the corresponding database of dbType.
7. a kind of data query device unrelated with type of database, which is characterized in that the device includes:
Receiving unit, inquiry request for receiving input, the inquiry request are identified including at least data resource catalogue resourceId;
Resolution unit parses configuration information to obtain data for identifying resourceId according to the data resource catalogue Library table identifies tableId and type of database dbType;
Dispatching Unit takes for the inquiry request to be distributed to corresponding data base querying according to type of database dbType Business;
Generation unit generates dbType according to the query argument params encapsulation in the inquiry request for the query service The query statement of corresponding database;
Return unit, for being inquired and being returned inquiry knot in the corresponding database of dbType using the query statement Fruit.
8. device according to claim 7, which is characterized in that further include rights parameters in the inquiry request, receiving To after the inquiry request, the rights parameters are judged, when user have search access right when continue operation, when with When family does not have search access right, interrupt inquiry operation simultaneously sends prompting message to user.
9. device according to claim 8, which is characterized in that the configuration information includes data resource catalogue and database The corresponding relationship and database of table and the corresponding relationship of database table.
10. device according to claim 9, which is characterized in that the data resource catalogue is corresponding with database table to close System includes data resource directory information and database table information, includes data in the corresponding relationship of the database and database table Library information and database table information, data resource directory information include data resource catalogue mark resourceId, data resource Code resourceCode and data source resource dataSource;The database information includes database link information, number According to library type dbType and Database Identification bigdataResourceId;The database table information includes table name TableName, Database Identification bigdataResourceId, table satellite information tableJson and database table mark TableId is established the corresponding relationship of database and database table by Database Identification bigdataResourceId, passes through number TableId, which is identified, according to Resource TOC mark resourceId and database table establishes the corresponding of data resource catalogue and database table Relationship.
11. device according to claim 10, which is characterized in that the data resource catalogue includes multiple data resource mesh Data item is recorded, the data resource catalogue data item includes data item standard code itemCode, data item title ItemName, tables of data actual storage field name storeCloumn and affiliated data resource catalogue identify resourceId, pass through Data resource catalogue mark resourceId establishes being associated with for data resource catalogue and multiple data resource catalogue data items Relationship.
12. device according to claim 11, which is characterized in that in the query statement for generating the corresponding database of dbType When first pass through data resource catalogue mark resourceId and data item standard code itemCode determine tables of data actual storage Field name storeCloumn is then based on database table the mark tableId, tables of data actual storage field name The storeCloumn and query argument params generates the query statement of the corresponding database of dbType.
13. a kind of computer readable storage medium, which is characterized in that it is stored with computer program code on the storage medium, When the computer program code is computer-executed, perform claim requires any method of 1-6.
CN201910209044.8A 2019-03-19 2019-03-19 A kind of the data query method, apparatus and storage medium unrelated with type of database Pending CN110046287A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910209044.8A CN110046287A (en) 2019-03-19 2019-03-19 A kind of the data query method, apparatus and storage medium unrelated with type of database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910209044.8A CN110046287A (en) 2019-03-19 2019-03-19 A kind of the data query method, apparatus and storage medium unrelated with type of database

Publications (1)

Publication Number Publication Date
CN110046287A true CN110046287A (en) 2019-07-23

Family

ID=67273975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910209044.8A Pending CN110046287A (en) 2019-03-19 2019-03-19 A kind of the data query method, apparatus and storage medium unrelated with type of database

Country Status (1)

Country Link
CN (1) CN110046287A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125159A (en) * 2019-12-24 2020-05-08 亚信科技(中国)有限公司 Data statistics method and device
CN111339177A (en) * 2020-03-11 2020-06-26 南京金信通信息服务有限公司 SAP platform-based data export method and system
CN111767311A (en) * 2020-06-05 2020-10-13 浙江大搜车软件技术有限公司 Variable request method, system, computer device and computer readable storage medium
CN112527836A (en) * 2020-12-08 2021-03-19 航天科技控股集团股份有限公司 Big data query method based on T-BOX platform
CN113094387A (en) * 2021-04-08 2021-07-09 杭州数梦工场科技有限公司 Data query method and device, electronic equipment and machine-readable storage medium
CN113761016A (en) * 2021-01-15 2021-12-07 北京沃东天骏信息技术有限公司 Data query method, device, equipment and storage medium
CN113779071A (en) * 2021-09-24 2021-12-10 北京锐安科技有限公司 Database query method, device, equipment and storage medium
CN113986963A (en) * 2020-07-27 2022-01-28 阿里巴巴集团控股有限公司 Data query method, system and storage medium
CN114416836A (en) * 2021-12-22 2022-04-29 山东同圆数字科技有限公司 A multi-source heterogeneous CIM database fusion access system and method
CN115617795A (en) * 2022-10-11 2023-01-17 厦门市美亚柏科信息股份有限公司 A general query method, device and storage medium for a database table
CN117473547A (en) * 2023-10-30 2024-01-30 京东科技信息技术有限公司 A method and device for database permission management

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187937A (en) * 2007-10-30 2008-05-28 北京航空航天大学 Heterogeneous Database Access and Integration Method for Schema Reuse in Grid Environment
CN101685449A (en) * 2008-09-26 2010-03-31 国际商业机器公司 Method and system for connecting tables in a plurality of heterogeneous distributed databases
CN102521254A (en) * 2011-11-17 2012-06-27 广东电网公司电力科学研究院 Uniform access method of isomeric database
CN103942234A (en) * 2013-01-21 2014-07-23 中国电信股份有限公司 Method for operating multiple heterogeneous databases, middleware device and system
CN104008135A (en) * 2014-05-07 2014-08-27 南京邮电大学 Multi-source heterogeneous database fusion system and data query method thereof
US20170116213A1 (en) * 2012-09-28 2017-04-27 Oracle International Corporation Migrating a pluggable database between database server instances with minimal impact to performance
US20180349458A1 (en) * 2017-05-31 2018-12-06 Oracle International Corporation Consistent query execution for big data analytics in a hybrid database

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187937A (en) * 2007-10-30 2008-05-28 北京航空航天大学 Heterogeneous Database Access and Integration Method for Schema Reuse in Grid Environment
CN101685449A (en) * 2008-09-26 2010-03-31 国际商业机器公司 Method and system for connecting tables in a plurality of heterogeneous distributed databases
CN102521254A (en) * 2011-11-17 2012-06-27 广东电网公司电力科学研究院 Uniform access method of isomeric database
US20170116213A1 (en) * 2012-09-28 2017-04-27 Oracle International Corporation Migrating a pluggable database between database server instances with minimal impact to performance
CN103942234A (en) * 2013-01-21 2014-07-23 中国电信股份有限公司 Method for operating multiple heterogeneous databases, middleware device and system
CN104008135A (en) * 2014-05-07 2014-08-27 南京邮电大学 Multi-source heterogeneous database fusion system and data query method thereof
US20180349458A1 (en) * 2017-05-31 2018-12-06 Oracle International Corporation Consistent query execution for big data analytics in a hybrid database

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125159A (en) * 2019-12-24 2020-05-08 亚信科技(中国)有限公司 Data statistics method and device
CN111339177A (en) * 2020-03-11 2020-06-26 南京金信通信息服务有限公司 SAP platform-based data export method and system
CN111767311A (en) * 2020-06-05 2020-10-13 浙江大搜车软件技术有限公司 Variable request method, system, computer device and computer readable storage medium
CN113986963A (en) * 2020-07-27 2022-01-28 阿里巴巴集团控股有限公司 Data query method, system and storage medium
CN112527836B (en) * 2020-12-08 2022-12-30 航天科技控股集团股份有限公司 Big data query method based on T-BOX platform
CN112527836A (en) * 2020-12-08 2021-03-19 航天科技控股集团股份有限公司 Big data query method based on T-BOX platform
CN113761016A (en) * 2021-01-15 2021-12-07 北京沃东天骏信息技术有限公司 Data query method, device, equipment and storage medium
CN113761016B (en) * 2021-01-15 2025-03-18 北京沃东天骏信息技术有限公司 Data query method, device, equipment and storage medium
CN113094387A (en) * 2021-04-08 2021-07-09 杭州数梦工场科技有限公司 Data query method and device, electronic equipment and machine-readable storage medium
CN113779071A (en) * 2021-09-24 2021-12-10 北京锐安科技有限公司 Database query method, device, equipment and storage medium
CN114416836A (en) * 2021-12-22 2022-04-29 山东同圆数字科技有限公司 A multi-source heterogeneous CIM database fusion access system and method
CN115617795A (en) * 2022-10-11 2023-01-17 厦门市美亚柏科信息股份有限公司 A general query method, device and storage medium for a database table
CN117473547A (en) * 2023-10-30 2024-01-30 京东科技信息技术有限公司 A method and device for database permission management

Similar Documents

Publication Publication Date Title
CN110046287A (en) A kind of the data query method, apparatus and storage medium unrelated with type of database
US8555248B2 (en) Business object change management using release status codes
CN103377336B (en) The control method of a kind of computer system user authority and system
EP2199904B1 (en) Flexible multi-tenant support of metadata extensions
US20140114822A1 (en) Method and system for creating tax configuration templates
US20070299704A1 (en) Extending data flows
CN102436473A (en) Menu management device and menu management method
US20110219046A1 (en) System, method and computer program product for managing data storage and rule-driven communications for a plurality of tenants
CN111538774B (en) Data storage and display method, system, equipment and storage medium
CN112860744A (en) Business process processing method and device
EP2917872A2 (en) Filtering views with predefined query
CA2800576A1 (en) Enhancing an inquiry for a search of a database
WO2019218460A1 (en) Service line processing method, device, terminal equipment and medium
CN112214505A (en) Data synchronization method and device, computer readable storage medium and electronic equipment
US20100161682A1 (en) Metadata model repository
CN111459907B (en) Method, system and storage medium for configuring main data through model
US20170193409A1 (en) Business resource modeling
US20110289041A1 (en) Systems and methods for managing assignment templates
US7657528B2 (en) Method, computer program product and article of manufacture for providing service-to-role assignment to launch application services in role-based computer system
CN114596044A (en) Tool and method for project process approval
CN117170624A (en) Application program construction method, device, equipment, storage medium and program product
US8832110B2 (en) Management of class of service
US10467077B2 (en) Configuration item integrity
CN104040537A (en) System and method for automatic generation and execution of database queries
CN113656025A (en) API processing method and device

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: 20190723

RJ01 Rejection of invention patent application after publication