CN106557586B - Database access processing method and device - Google Patents

Database access processing method and device Download PDF

Info

Publication number
CN106557586B
CN106557586B CN201611081180.6A CN201611081180A CN106557586B CN 106557586 B CN106557586 B CN 106557586B CN 201611081180 A CN201611081180 A CN 201611081180A CN 106557586 B CN106557586 B CN 106557586B
Authority
CN
China
Prior art keywords
annotation information
retrieval
information
retrieving
database
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.)
Active
Application number
CN201611081180.6A
Other languages
Chinese (zh)
Other versions
CN106557586A (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.)
Beijing Xingxuan Technology Co Ltd
Original Assignee
Beijing Xingxuan 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 Beijing Xingxuan Technology Co Ltd filed Critical Beijing Xingxuan Technology Co Ltd
Priority to CN201611081180.6A priority Critical patent/CN106557586B/en
Publication of CN106557586A publication Critical patent/CN106557586A/en
Application granted granted Critical
Publication of CN106557586B publication Critical patent/CN106557586B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages

Abstract

The embodiment of the application discloses a database access processing method and a device, wherein the method comprises the following steps: retrieving annotation information matched with the acquired retrieval keywords; displaying prompt information of the annotation information; and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface. The embodiment of the application realizes effective and accurate writing of the access statement and effective and accurate access to the database.

Description

Database access processing method and device
Technical Field
The present application belongs to the technical field of data processing, and in particular, to a database access processing method and apparatus.
Background
Structured Query Language (SQL) is a database Query and programming Language used to modify, store, delete, and Query data in a database, and a user can write SQL statements to access the database.
When a user writes an SQL statement to access a database, the user needs to write a table name and a field name, so that the user is required to be very familiar with a data table and a field in the accessed database, and if the user does not know the database, the user cannot write the SQL statement, and the user cannot access the database.
Disclosure of Invention
In the prior art, if a user needs to be familiar with database objects such as data tables and fields in a database to realize access to the database, the SQL statement can be written, but the inventor finds that many users do not know the database, especially under the condition that the database comprises data of various service types, and even if the database is well known, writing errors can be caused to cause incapability of accessing the database due to long and complex table names or field names, and the like. The inventor finds through a series of researches that if the object names such as the table names or the field names can be prompted to the user when the SQL statements are written, the writing workload and the error rate are greatly reduced, and in practical application, the user usually knows the service types of the data to be accessed and the like although the data tables or the fields and the like are not known.
A first aspect of the present application provides a database access processing method, including:
retrieving annotation information matched with the acquired retrieval keywords;
displaying prompt information of the annotation information;
and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface.
Optionally, the step of obtaining the search keyword includes:
displaying a retrieval control on the program editing interface;
and acquiring the retrieval key words input into the retrieval control.
Optionally, the step of displaying the retrieval control includes:
and displaying the retrieval control on the program editing interface according to the received control display request.
Optionally, the method further comprises:
acquiring an editing keyword input into the program editing interface;
retrieving an object name containing the editing keyword;
displaying the object name;
and in response to the selection operation for the object name, determining the selected object name to write into the program editing interface.
Optionally, the method further comprises:
and displaying the object name of the database object annotated by the annotation information corresponding to the prompt information.
Optionally, after displaying the prompt information of the annotation information, the method further includes:
monitoring display trigger operation aiming at the prompt information;
and displaying the detailed information of the annotation information.
Optionally, the search keyword includes a type keyword and a business keyword;
the retrieving annotation information matched with the obtained retrieval keyword comprises the following steps:
and retrieving annotation information which is matched with the service key words and corresponds to the object types according to the object types specified by the type key words.
Optionally, the retrieving annotation information matched with the obtained retrieval keyword includes:
identifying an access function in the access statement to determine a type of object accessed by the access function;
and retrieving annotation information which is matched with the retrieval key words and corresponds to the object types.
Optionally, the database object comprises a data table or field;
the retrieving annotation information matched with the obtained retrieval keyword comprises the following steps:
judging whether the table annotation information is searched;
if yes, searching field annotation information matched with the search keyword in a data table determined by searching;
if not, searching the table annotation information matched with the search keyword.
Optionally, the retrieving annotation information matched with the obtained retrieval keyword includes:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
A second aspect of the present application provides a database access processing apparatus including:
the first retrieval module is used for retrieving annotation information matched with the acquired retrieval key words;
the information display module is used for displaying the prompt information of the annotation information;
and the first determining module is used for responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write in a program editing interface.
Optionally, the method further comprises:
the control display module is used for displaying the retrieval control on the program editing interface;
and the first acquisition module is used for acquiring the retrieval key words input into the retrieval control.
Optionally, the control display module is specifically configured to:
and displaying the retrieval control on the program editing interface according to the received control display request.
Optionally, the method further comprises:
the second acquisition module is used for acquiring the editing keywords input into the program editing interface;
the second retrieval module is used for retrieving the object name containing the editing keyword;
the name display module is used for displaying the object name;
and the second determination module is used for responding to the selection operation aiming at the object name, and determining the selected object name to write into the program editing interface.
Optionally, the information display module is further configured to: and displaying the object name of the database object annotated by the annotation information corresponding to the prompt information.
Optionally, the search keyword includes a type keyword and a business keyword;
the first retrieval module is specifically used for retrieving annotation information which is matched with the service keyword and corresponds to the object type according to the object type specified by the type keyword.
Optionally, the first retrieving module includes:
the identification unit is used for identifying an access function in the access statement so as to determine the type of an object accessed by the access function;
and the first retrieval unit is used for retrieving the annotation information which is matched with the retrieval key word and corresponds to the object type.
Optionally, the database object comprises a data table or field;
the first retrieval module includes:
a judging unit operable to judge whether the table annotation information has been retrieved;
the second retrieval unit is used for retrieving the field annotation information matched with the retrieval key word in the data table determined by retrieval when the judgment result of the judgment unit is yes;
and a third retrieval unit configured to retrieve the table annotation information that matches the retrieval keyword, when the determination result of the determination unit is negative.
Optionally, the first retrieving module is specifically configured to:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
Compared with the prior art, the application can obtain the following technical effects:
in the embodiment of the application, by retrieving the annotation information matched with the acquired retrieval key words, displaying the prompt information of the annotation information for the user to check and select, when the selection operation aiming at the prompt information is monitored, determining the database object corresponding to the selected prompt information, writing the object name of the corresponding database object into a program editing interface, and enabling the user to know the database object which the user wants to write in conveniently through the prompt information of the annotation information, the access sentence is written effectively and accurately under the condition that the user does not know the database object, and the database is accessed effectively and accurately.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of one embodiment of a database access processing method according to an embodiment of the present application;
FIG. 2 is a flow chart of yet another embodiment of a database access processing method according to an embodiment of the present application;
FIGS. 3a to 3e are schematic views respectively illustrating part of a program editing interface according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a database access processing apparatus according to another embodiment of the present application;
fig. 5 is a still another similar structural diagram of a database access processing apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail with reference to the drawings and examples, so that how to implement technical means to solve technical problems and achieve technical effects of the present application can be fully understood and implemented.
The technical scheme of the embodiment of the application is mainly suitable for application scenarios in which database access is realized through access statements, such as SQL statements. And writing the access statement by the user on a program editing interface, and submitting the written access statement to a query system, namely, realizing access operations such as query or update of data from the database.
In order to realize effective and accurate access to the database under the condition that a user does not know the database object, in the embodiment of the application, the retrieval keyword is firstly obtained, and annotation information matched with the retrieval keyword is retrieved. The retrieval keywords can be provided by a user when writing an access statement, and the annotation information is used for annotating the database object and is correspondingly written into the database when creating the database object. And then displaying the prompt information of the annotation information for the user to check and select, when the selection operation aiming at the prompt information is monitored, determining the database object corresponding to the selected prompt information, and writing the object name of the corresponding database object into a program editing interface, so that the user does not need to write, the user can conveniently know the database object which is desired to be written through the prompt information of the annotation information, the writing of access data can be realized under the condition that the user does not know the database, and the effective and accurate access to the database is realized.
Fig. 1 is a flowchart of an embodiment of a database access processing method provided in an embodiment of the present application, where the method may include the following steps:
101: and retrieving annotation information matched with the acquired retrieval key words.
The annotation information is used for annotating the database object, and is correspondingly written into the database when the database object is created, so as to explain the database object. The database objects can be conveniently known by annotating the information.
In this embodiment, the database object may refer to a data table, a field, an index, or the like.
In order to further improve the access efficiency and accuracy, optionally, when creating the database object, the annotation information pre-configured for the database object may be written correspondingly to explain the database object in more detail.
The annotation information may include, for example, an object type of the database object, a service type and a data type to which the corresponding data belongs, a data table in which the corresponding data belongs, and other information.
In practical applications, the user may not know the table name of the data table where the user is located in the database and the field name of the corresponding field for the data to be accessed, but the user usually knows the service type of the data to be accessed, for example, when a large amount of online transaction data is stored in the database, the service type may include an order type, an inventory type, and the like. Therefore, the retrieval keyword may be provided according to the service type or the data type to which the data to be accessed belongs, for example, data related to the order is desired to be accessed, and the retrieval keyword may be "order", and since the annotation information may annotate the service type, the data type, and the like described by the data object, the annotation information may be matched in the annotation information, the annotation information matched with the "order" is searched, and which data table or field describes the related information of the "order" is determined.
In order to improve the retrieval accuracy, optionally, the annotation information matching the acquired retrieval keyword may be retrieved by using a fuzzy retrieval technology. The fuzzy retrieval technology is used for searching synonymy or homophonic related words or contents related to a given keyword in a matching way according to the keyword, so that more retrieval results can be obtained through the fuzzy retrieval technology, and the omission of the contents caused by over-accuracy is avoided.
Alternatively, the search keyword may be obtained when the access statement is written, or the search keyword may be obtained when a search request triggered by a user is received.
In practical application, the access statement may refer to an SQL statement, but the embodiments of the present application do not exclude other access statements that can implement a database query, and for convenience of description, the following description is made with the SQL statement.
102: and displaying prompt information of the annotation information.
103: and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface.
The prompt information of the annotation information can be part of content in the annotation information or key content or abstract content of the annotation information, and the like.
By displaying the prompt information of the annotation information, a user can conveniently know the database object annotated by the annotation information to determine whether the database object is the database object which the user wants to access, and after the database object which the user wants to access is determined, the corresponding prompt information can be selected. Therefore, the system monitors the selection operation aiming at the prompt information, and based on the selected prompt information, the system can determine the database object corresponding to the selected prompt information, so that the object name of the database object can be determined, namely, the program editing interface is written, and the SQL statement is normally written.
In some embodiments, the search keyword may be obtained as follows:
displaying a retrieval control on the program editing interface;
and acquiring the retrieval key words input into the retrieval control.
The program editing interface is a user interface for writing SQL statements, and in the embodiment of the application, a retrieval control can be displayed in the program editing interface.
The user can enter a search keyword in the search control. Therefore, the search keyword input into the search control can be obtained by responding to the input operation in the search control.
Optionally, the retrieval control may be fixedly presented in a preset area of the program editing interface. And the current operation position, namely the writing position of the current SQL statement, can also be displayed in a pop-up box form.
In some embodiments, a control display request may be received, and a retrieval control may be displayed on the program editing interface according to the received control display request.
The control display request is triggered by a user, for example, a specific virtual control in the program interface is operated, or a preset shortcut operation key, for example, a 'Ctrl + Q' key in a keyboard, is operated, so that when the user writes an SQL statement using the keyboard, the shortcut operation key is directly operated in the keyboard, that is, the retrieval control can be presented in the program editing interface.
In order to facilitate the situation that a user may know about a database object, reduce the writing workload, and improve the writing efficiency and accuracy, in some embodiments, during the SQL statement input process, the method may further include:
acquiring an editing keyword input into the program editing interface;
retrieving an object name containing the editing keyword;
displaying the object name
And in response to the selection operation aiming at the object name, writing the selected object name in the program editing interface.
Optionally, the object name may be displayed, and meanwhile, prompt information of the annotation information corresponding to the object name may also be displayed;
the editing keyword can be the first letter of a word or the first word of a word input by a user, so that an object name containing the editing keyword can be retrieved and presented to the user for selection according to the editing keyword, the input of the object name can be realized without inputting a complete object name, and when the user can not accurately memorize the object name, the SQL sentence can be quickly realized.
Fig. 2 is a flowchart of another embodiment of a database access processing method provided in an embodiment of the present application, where the method may include:
201: and displaying the retrieval control on the program editing interface according to the received control display request.
202: and acquiring the retrieval key words input into the retrieval control.
203: retrieving annotation information matched with the retrieval key words;
204: and displaying prompt information of the annotation information.
As shown in fig. 3a, a schematic diagram is displayed for a part of a program editing interface, and a retrieval control 301 is displayed in the program editing interface 300, and the retrieval control 301 is presented in the form of a pop-up box at the current writing position.
The search control may include an input box 302, and the user may enter the search keyword "order" in the input box 302 in the search control 301.
The retrieval control may also include a display box 303 to display a prompt to annotate the information.
In some embodiments, for the convenience of user understanding, the name of the object of the database annotated by the annotation information may also be displayed corresponding to the prompt information. As shown in fig. 3a, a hint 304 is included along with an object name 305.
Optionally, in order to facilitate the user to further understand the annotation information, in some embodiments, after displaying the prompt information of the annotation information, the method may further include:
monitoring display trigger operation aiming at the prompt information;
and displaying the detailed information of the annotation information.
Specifically, the detailed information of the comment information corresponding to the prompt information selected by the display trigger operation is displayed.
When the prompt message and the corresponding object name are displayed simultaneously, the prompt message and the corresponding object name are integrated, as shown in fig. 3b, the shaded portion 306 is the prompt message and the object name selected by the display trigger operation, so that the detailed information 307 of the comment information corresponding to the prompt message is correspondingly displayed.
205: and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface.
As shown in FIG. 3c, to display the object name 308 of the corresponding database object in the program editing interface based on the selected hint information, shaded portion 306 in FIG. 3 b.
Wherein, since the database object may be a data table or a field, the annotation information matching the search keyword may include table annotation information of the data table and/or field annotation information of the field.
As a possible implementation manner, in some embodiments, the search keyword may include a type keyword and a service keyword;
retrieving annotation information that matches the retrieved search keyword may include:
and retrieving annotation information which is matched with the service key words and corresponds to the object types according to the object types specified by the type key words.
The object type may include a data table or a field, and the type key may be "data table" or "field", so as to facilitate the system to know whether the data table or the field needs to be retrieved currently.
The service key is determined according to the service type of the data to be accessed, and can be 'order', for example.
Therefore, only the annotation information corresponding to the requested type keyword can be retrieved to optimize the retrieval effect and prompt the display accuracy.
As yet another possible implementation manner, in some embodiments, the retrieving annotation information that matches the retrieved keyword may include:
identifying an access function in the access statement to determine a type of object accessed by the access function;
and retrieving annotation information which is matched with the retrieval key words and corresponds to the object types.
In the SQL statement, database objects corresponding to different access functions are different.
For example, the processing object after the "SELECT" function is a field, and the processing object after the "FROM" function is a data table or the like. Like SQL statements:
SELECT LastName,FirstName FROM Persons
that is, the data corresponding to the "LastName" and "FirstName" fields are extracted from the "Persons" data table.
Thus, the type of object accessed by the access function can be determined by identifying the access function in the access statement. So that only annotation information corresponding to the object type can be retrieved.
As another possible implementation manner, the retrieving annotation information that matches the obtained retrieval keyword may include:
judging whether the table annotation information is searched;
if yes, searching field annotation information matched with the search keyword in a data table determined by searching;
if not, searching the table annotation information matched with the search keyword.
That is, it may be preset that the table annotation information is retrieved first, and if the table annotation information is retrieved, the field annotation information matching the search keyword may be retrieved from the data table determined by the retrieval.
As shown in fig. 3d, since fig. 3c has selected the table name "order _ db.order", i.e., in the data table "order _ db.order" determined by the search, the field comment information matching the search keyword "time" is searched. The displayed prompt information is also the field comment information.
The table name of the data table determined by the retrieval and the key word input by the user can be used as the retrieval key word for retrieval.
206: and acquiring an editing keyword input into the program editing interface.
Wherein step 206 may be performed in real time, or when a control display request is not received, or when an object name needs to be input by recognizing an access function.
207: and retrieving the object name containing the editing keyword.
208: and displaying the object name.
As shown in fig. 3e, an object name including "u" may be retrieved according to the input editing keyword "u", and displayed.
In addition, prompt information of the annotation information corresponding to the object name can be displayed for the convenience of the user to view.
As shown in fig. 3e, the current operation position may be displayed in the form of a pop-up box, and the pop-up box 309 includes the object name 310 and the prompt information 311 of the corresponding comment information.
209: and in response to the selection operation aiming at the object name, writing the selected object name in the program editing interface.
There may be various implementation manners for retrieving the object name including the editing keyword.
One possible implementation may be to identify an access function in the access statement to determine the type of object accessed by the access function;
and retrieving the object name which contains the editing key word and corresponds to the object type.
Yet another possible implementation may be:
judging whether the table name is searched;
if yes, searching the field name containing the editing keyword in the data table determined by searching;
if not, searching the table name containing the editing key words.
By the embodiment of the application, the compiling of the SQL statement can be quickly, accurately and effectively realized, and the access to the database is realized.
The technical scheme of the embodiment of the application can be suitable for the condition of accessing one database and the condition of accessing a plurality of databases, and due to the fact that the service types of data stored in the databases are possibly different, the SQL statement can be written and the database can be accessed only under the condition that a user does not know the data structure of each database by adopting the technical scheme of the embodiment of the application under the condition that the service types are known.
In a practical application, the technical solution of the embodiment of the present application may be applied to a data mart, which is a warehouse for collecting data from data and data sources, and is a theme-oriented data set. The storage structure of data tables and fields in each database is maintained in the data mart.
For convenience of retrieval, corresponding annotation information can be maintained in the data mart in advance corresponding to the database objects, and the database objects are pre-configured when the data mart is created.
Therefore, the retrieval of annotation information matching the acquired retrieval keyword may be:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
Fig. 4 is a schematic structural diagram of an embodiment of a database access processing apparatus according to an embodiment of the present application, where the apparatus may include:
and the first retrieval module 401 is configured to retrieve annotation information matching the acquired retrieval keyword.
An information display module 402, configured to display a prompt message of the annotation information;
a first determining module 403, configured to determine, in response to a selection operation for the prompt information, an object name of a corresponding database object to write in a program editing interface.
The prompt information of the annotation information can be part of content in the annotation information or key content or abstract content of the annotation information, and the like.
By displaying the prompt information of the annotation information, the user can know the database object annotated by the annotation information conveniently to determine whether the database object is the database object which the user wants to access. The database object which is desired to be accessed is determined, and the corresponding prompt information can be selected. Therefore, the selection operation aiming at the prompt information is monitored, the database object corresponding to the selected prompt information can be determined based on the selected prompt information, the object name of the database object can be determined, the object name is written into a program editing interface, and the SQL statement can be normally written, so that even if a user does not know the object name, the SQL statement can be written by adopting the technical scheme of the embodiment, the database can be accessed, the object name does not need to be manually written by the user, the problems of manual writing errors and the like can be avoided, and the database can be effectively and accurately accessed.
In some embodiments, the information display module may be further configured to display, in response to the prompt, an object name of a database object annotated by the annotation information.
Optionally, in order to facilitate the user to further understand the annotation information, in some embodiments, the apparatus may further include:
the monitoring module is used for monitoring display triggering operation aiming at the prompt information; and displaying the detailed information of the annotation information. Specifically, the detailed information of the comment information corresponding to the prompt information selected by the display trigger operation is displayed.
In order to facilitate the user's understanding of the database object, reduce the writing workload, and improve the writing efficiency and accuracy, as another embodiment, as shown in fig. 5, the apparatus may further include:
a second obtaining module 404, configured to obtain an editing keyword input to the program editing interface;
a second retrieving module 405, configured to retrieve an object name including the editing keyword;
a name display module 406, configured to display the object name;
a second determining module 407, configured to determine, in response to a selection operation for the object name, a selected object name to write into the program editing interface.
Optionally, the name display module may further display a prompt message corresponding to the annotation information corresponding to the object name.
In some embodiments, the apparatus may further comprise:
the control display module is used for displaying the retrieval control on the program editing interface;
and the first acquisition module is used for acquiring the retrieval key words input into the retrieval control.
In some embodiments, the control display module may display the retrieval control on the program editing interface according to the received control display request.
The control display request is triggered by a user, for example, a specific virtual control in the program interface is operated, or a preset shortcut operation key, for example, a 'Ctrl + Q' key in a keyboard, is operated, so that when the user writes an SQL statement using the keyboard, the shortcut operation key is directly operated in the keyboard, that is, the retrieval control can be presented in the program editing interface.
As a possible implementation manner, in some embodiments, the search keyword may include a type keyword and a service keyword;
the first retrieving module may be specifically configured to retrieve annotation information that matches the service keyword and corresponds to the object type according to the object type specified by the type keyword.
As yet another possible implementation, in some embodiments, the first retrieving module may include:
the identification unit is used for identifying an access function in the access statement so as to determine the type of an object accessed by the access function;
and the first retrieval unit is used for retrieving the annotation information which is matched with the retrieval key word and corresponds to the object type.
As yet another possible implementation, in some embodiments, the database object includes a data table or field;
the first retrieving module may include:
a judging unit operable to judge whether the table annotation information has been retrieved;
the second retrieval unit is used for retrieving the field annotation information matched with the retrieval key word in the data table determined by retrieval when the judgment result of the judgment unit is yes;
and a third retrieval unit configured to retrieve the table annotation information that matches the retrieval keyword, when the determination result of the determination unit is negative.
As a possible implementation manner, in some embodiments, the second retrieval module may be specifically configured to identify an access function in the access statement to determine a type of an object accessed by the access function; and retrieving the object name which contains the editing key word and corresponds to the object type.
As another possible implementation manner, in some embodiments, the second retrieving module may be specifically configured to: judging whether the table name is searched; if yes, searching the field name containing the editing keyword in the data table determined by searching; if not, searching the table name containing the editing key words.
The technical scheme of the embodiment of the application can be suitable for the condition of accessing one database and the condition of accessing a plurality of databases, and due to the fact that the service types of data stored in the databases are possibly different, the SQL statement can be written and the database can be accessed only under the condition that a user does not know the data structure of each database by adopting the technical scheme of the embodiment of the application under the condition that the service types are known.
In a practical application, the technical solution of the embodiment of the present application may be applied to a data mart.
For convenience of retrieval, corresponding annotation information can be maintained in the data mart in advance corresponding to the database objects, and the database objects are pre-configured when the data mart is created.
Thus, in some embodiments, the first retrieving module may be specifically configured to:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
By the technical scheme of the embodiment of the application, the compiling of the SQL sentences can be quickly, accurately and effectively realized, and even under the condition that a user does not know the data structure in the database, the access to the database can still be realized.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As used in the specification and in the claims, certain terms are used to refer to particular components. As one skilled in the art will appreciate, manufacturers may refer to a component by different names. This specification and claims do not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. "substantially" means within an acceptable error range, and a person skilled in the art can solve the technical problem within a certain error range to substantially achieve the technical effect. Furthermore, the term "coupled" is intended to encompass any direct or indirect electrical coupling. Thus, if a first device couples to a second device, that connection may be through a direct electrical coupling or through an indirect electrical coupling via other devices and couplings. The description which follows is a preferred embodiment of the present application, but is made for the purpose of illustrating the general principles of the application and not for the purpose of limiting the scope of the application. The protection scope of the present application shall be subject to the definitions of the appended claims.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
The foregoing description shows and describes several preferred embodiments of the present application, but as aforementioned, it is to be understood that the application is not limited to the forms disclosed herein, but is not to be construed as excluding other embodiments and is capable of use in various other combinations, modifications, and environments and is capable of changes within the scope of the application as described herein, commensurate with the above teachings, or the skill or knowledge of the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the application, which is to be protected by the claims appended hereto.

Claims (22)

1. A database access processing method, comprising:
retrieving annotation information matched with the acquired retrieval keywords;
determining prompt information of the annotation information according to the annotation information;
displaying prompt information of the annotation information; the prompt information is part of content, key content or abstract content in the annotation information;
displaying detailed information of the annotation information in response to a display trigger operation for the prompt information;
and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface.
2. The method of claim 1, wherein the step of obtaining the search keyword comprises:
displaying a retrieval control on the program editing interface;
and acquiring the retrieval key words input into the retrieval control.
3. The method of claim 2, wherein the step of displaying the retrieval control comprises:
and displaying the retrieval control on the program editing interface according to the received control display request.
4. The method of claim 2, further comprising:
acquiring an editing keyword input into the program editing interface;
retrieving an object name containing the editing keyword;
displaying the object name;
and in response to the selection operation for the object name, determining the selected object name to write into the program editing interface.
5. The method of claim 1, further comprising:
and displaying the object name of the database object annotated by the annotation information corresponding to the prompt information.
6. The method of claim 1, wherein after displaying the prompt message of the annotation message, further comprising:
and monitoring display trigger operation aiming at the prompt information.
7. The method of claim 1, wherein the search keywords comprise type keywords and business keywords;
the retrieving annotation information matched with the obtained retrieval keyword comprises the following steps:
and retrieving annotation information which is matched with the service key words and corresponds to the object types according to the object types specified by the type key words.
8. The method according to claim 1, wherein the retrieving annotation information matching the retrieved keyword comprises:
identifying an access function in an access statement to determine a type of object accessed by the access function;
and retrieving annotation information which is matched with the retrieval key words and corresponds to the object types.
9. The method of claim 1, wherein the database object comprises a data table or field;
the retrieving annotation information matched with the obtained retrieval keyword comprises the following steps:
judging whether the table annotation information is searched;
if yes, searching field annotation information matched with the search keyword in a data table determined by searching;
if not, searching the table annotation information matched with the search keyword.
10. The method according to claim 1, wherein the retrieving annotation information matching the retrieved keyword comprises:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
11. A database access processing apparatus, comprising:
the first retrieval module is used for retrieving annotation information matched with the acquired retrieval key words;
the information display module is used for determining prompt information of the annotation information according to the annotation information and displaying the prompt information of the annotation information; the prompt information is part of content, key content or abstract content in the annotation information; the monitoring module is used for responding to the display triggering operation aiming at the prompt information and displaying the detailed information of the annotation information;
and the first determining module is used for responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write in a program editing interface.
12. The apparatus of claim 11, further comprising:
the control display module is used for displaying the retrieval control on the program editing interface;
and the first acquisition module is used for acquiring the retrieval key words input into the retrieval control.
13. The apparatus of claim 12, wherein the control display module is specifically configured to:
and displaying the retrieval control on the program editing interface according to the received control display request.
14. The apparatus of claim 12, further comprising:
the second acquisition module is used for acquiring the editing keywords input into the program editing interface;
the second retrieval module is used for retrieving the object name containing the editing keyword;
the name display module is used for displaying the object name;
and the second determination module is used for responding to the selection operation aiming at the object name, and determining the selected object name to write into the program editing interface.
15. The apparatus of claim 11, wherein the information display module is further configured to: and displaying the object name of the database object annotated by the annotation information corresponding to the prompt information.
16. The apparatus of claim 11, further comprising:
and the monitoring module is used for monitoring display triggering operation aiming at the prompt information.
17. The apparatus of claim 11, wherein the search keywords comprise type keywords and business keywords;
the first retrieval module is specifically used for retrieving annotation information which is matched with the service keyword and corresponds to the object type according to the object type specified by the type keyword.
18. The apparatus of claim 11, wherein the first retrieving module comprises:
the identification unit is used for identifying an access function in an access statement to determine the type of an object accessed by the access function;
and the first retrieval unit is used for retrieving the annotation information which is matched with the retrieval key word and corresponds to the object type.
19. The apparatus of claim 11, wherein the database object comprises a data table or field;
the first retrieval module includes:
a judging unit operable to judge whether the table annotation information has been retrieved;
the second retrieval unit is used for retrieving the field annotation information matched with the retrieval key word in the data table determined by retrieval when the judgment result of the judgment unit is yes;
and a third retrieval unit configured to retrieve the table annotation information that matches the retrieval keyword, when the determination result of the determination unit is negative.
20. The apparatus of claim 11, wherein the first retrieving module is specifically configured to:
retrieving annotation information matched with the acquired retrieval keywords from the data marts; wherein annotation information is preconfigured for database objects in the data marts.
21. A computer device, comprising: a memory, a processor and a display screen; wherein the memory is used for storing a computer program;
the processor is coupled to the memory for executing the computer program for: retrieving annotation information matched with the acquired retrieval keywords; determining prompt information of the annotation information according to the annotation information; the prompt information is part of content, key content or abstract content in the annotation information; displaying prompt information of the annotation information on the display screen; displaying detailed information of the annotation information in response to a display trigger operation for the prompt information; and responding to the selection operation aiming at the prompt information, and determining the object name of the corresponding database object to write into a program editing interface.
22. A computer-readable storage medium having stored thereon computer instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the method of any one of claims 1-10.
CN201611081180.6A 2016-11-30 2016-11-30 Database access processing method and device Active CN106557586B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611081180.6A CN106557586B (en) 2016-11-30 2016-11-30 Database access processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611081180.6A CN106557586B (en) 2016-11-30 2016-11-30 Database access processing method and device

Publications (2)

Publication Number Publication Date
CN106557586A CN106557586A (en) 2017-04-05
CN106557586B true CN106557586B (en) 2020-06-19

Family

ID=58445768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611081180.6A Active CN106557586B (en) 2016-11-30 2016-11-30 Database access processing method and device

Country Status (1)

Country Link
CN (1) CN106557586B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107463610B (en) * 2017-06-27 2021-01-26 北京星选科技有限公司 Data warehousing method and device
CN112163130A (en) * 2020-10-28 2021-01-01 河北时代电子有限公司 Access processing method for social security data query

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6999963B1 (en) * 2000-05-03 2006-02-14 Microsoft Corporation Methods, apparatus, and data structures for annotating a database design schema and/or indexing annotations
CN101646050A (en) * 2009-09-09 2010-02-10 中国电信股份有限公司 Text annotation method and system, playing method and system of video files
CN104156458A (en) * 2014-08-20 2014-11-19 百度在线网络技术(北京)有限公司 Information extraction method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6999963B1 (en) * 2000-05-03 2006-02-14 Microsoft Corporation Methods, apparatus, and data structures for annotating a database design schema and/or indexing annotations
CN101646050A (en) * 2009-09-09 2010-02-10 中国电信股份有限公司 Text annotation method and system, playing method and system of video files
CN104156458A (en) * 2014-08-20 2014-11-19 百度在线网络技术(北京)有限公司 Information extraction method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
dbForge Studio for SQL Server History;Devart;《https://www.devart.com/dbforge/sql/studio/revision_history.html》;20160922;第6页 *

Also Published As

Publication number Publication date
CN106557586A (en) 2017-04-05

Similar Documents

Publication Publication Date Title
US9569506B2 (en) Uniform search, navigation and combination of heterogeneous data
US7720856B2 (en) Cross-language searching
US7689578B2 (en) Dealing with annotation versioning through multiple versioning policies and management thereof
US8862566B2 (en) Systems and methods for intelligent parallel searching
US20140114942A1 (en) Dynamic Pruning of a Search Index Based on Search Results
US9378253B2 (en) Database interface creation system and method
US20110320458A1 (en) Identification of name entities via search, determination of alternative searches, and automatic integration of data across a computer network for dynamic portal generation
US20030004941A1 (en) Method, terminal and computer program for keyword searching
US9411803B2 (en) Responding to natural language queries
US9182947B2 (en) Program source code navigation
WO2018097846A1 (en) Edge store designs for graph databases
US20080133449A1 (en) Adaptive help system and user interface
US20110252298A1 (en) Managing bookmarks in applications
CN112765248A (en) SQL-based data extraction method and equipment
CN106557586B (en) Database access processing method and device
JP2016126788A (en) Cross column-searching relational database table
US8433729B2 (en) Method and system for automatically generating a communication interface
CN105069175A (en) Information retrieval method and server based on version control system
CN110489032B (en) Dictionary query method for electronic book and electronic equipment
CN112329409A (en) Cell color conversion method and device and electronic equipment
CN112463896B (en) Archive catalogue data processing method, archive catalogue data processing device, computing equipment and storage medium
US11868343B2 (en) Utilizing autocompletion as a data discovery scaffold for supporting visual analysis
US20050108205A1 (en) Data access and retrieval mechanism
US20130054585A1 (en) Geographic search with mixed-precision results
CN111125262B (en) Method and device for processing field information, storage medium and processor

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

Address after: Building N3, Jinyu Zhizao workshop, No. 27, Jiancai Chengzhong Road, Haidian District, Beijing 100096

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant