CN112580065A - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN112580065A
CN112580065A CN201910937007.9A CN201910937007A CN112580065A CN 112580065 A CN112580065 A CN 112580065A CN 201910937007 A CN201910937007 A CN 201910937007A CN 112580065 A CN112580065 A CN 112580065A
Authority
CN
China
Prior art keywords
database
query
data
display
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910937007.9A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201910937007.9A priority Critical patent/CN112580065A/en
Publication of CN112580065A publication Critical patent/CN112580065A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • 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/245Query processing
    • G06F16/2455Query execution
    • 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/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data query method and a data query device, and relates to the technical field of computers. One embodiment of the method comprises: receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display; in response to the selection operation of one table, extracting form options in the selected table for displaying; and receiving input of query information in at least one form option, and performing query operation on data corresponding to at least one form option by using the query information to obtain and display the queried data. The embodiment is provided with one query system aiming at a plurality of databases, so that a user can access the plurality of databases in one query system without frequently clicking to enter a return operation when querying the data in the databases, and the query operation modes of the data in the databases are the same, thereby reducing the development cost of the system.

Description

Data query method and device
Technical Field
The invention relates to the technical field of computers, in particular to a data query method and a data query device.
Background
After receiving the service query requirement, research and development personnel need to compile a corresponding background query system according to the characteristics of the product database. And setting query items for the user in the system so as to generate query statements for querying according to the query conditions clicked by the user.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
1. a set of background query system needs to be developed separately for each database, so that the service development period is long, and human resources are wasted;
2. background query systems of the databases need to be individually customized, developed and maintained, and when different databases are queried, the databases need to be switched to different query systems for querying, so that the operation is complicated;
3. when the system query function cannot meet the actual requirements of the user, a developer needs to be relied on to modify the codes again to meet the requirements, such as data combination.
Disclosure of Invention
In view of this, embodiments of the present invention provide a data query method and apparatus, which can at least solve the problem in the prior art that a set of background query system needs to be separately developed for each database.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a data query method including:
accessing the database, and extracting the table in the accessed database for display;
in response to the selection operation of one table, extracting form options in the selected table for displaying;
and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
Optionally, the extracting the database list for displaying further includes:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
Optionally, the extracting, in response to the access operation on one of the databases, the table in the accessed database for display further includes:
and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
Optionally, the receiving an input of query information in at least one form option, so as to perform a query operation on data corresponding to the at least one form option by using the query information, to obtain and display queried data, further includes:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a data query apparatus including:
the database access module is used for receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
the form option display module is used for responding to the selection operation of one of the tables, and extracting the form options in the selected table for display;
and the data query module is used for receiving input of query information in at least one form option, so as to perform query operation on the data corresponding to the at least one form option by using the query information, obtain and display the queried data.
Optionally, the database access module is further configured to:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
Optionally, the database access module is further configured to: and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
Optionally, the data query module is further configured to:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a data query electronic device.
The electronic device of the embodiment of the invention comprises: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement any of the above data query methods.
To achieve the above object, according to a further aspect of the embodiments of the present invention, there is provided a computer readable medium having a computer program stored thereon, the computer program implementing any one of the above data query methods when executed by a processor.
According to the scheme provided by the invention, one embodiment of the invention has the following advantages or beneficial effects: only a database which a user has access right is obtained through access right setting; and automatically displaying all operable items in the next step by step according to the selection of the user on the database, the table in the database and the table list option in the table, and finally automatically generating a query statement according to the screening condition of the user for querying to generate a report and finish the data query operation.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a main flow of a data query method according to an embodiment of the present invention;
FIG. 2 is a flow chart diagram illustrating an alternative data query method according to an embodiment of the invention;
FIG. 3 is a flow diagram illustrating an alternative data query method according to an embodiment of the invention;
FIG. 4 is a schematic diagram of the main modules of a data query device according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 6 is a schematic block diagram of a computer system suitable for use with a mobile device or server implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Referring to fig. 1, a main flowchart of a data query method provided by an embodiment of the present invention is shown, including the following steps:
s101: receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
s102: in response to the selection operation of one table, extracting form options in the selected table for displaying;
s103: and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
In the above embodiment, the target group to which the present invention is directed is an operator or other data observer who does not know the technology in step S101. The built query system comprises a plurality of databases, such as a platform database, a service database and the like. Subsequent users can select the desired database within the system without having to repeat the enter and return operations.
After the user logs in the query system and clicks the data query operation, the system automatically displays all databases included in the system, for example, names of the databases, business types of the databases and the like are displayed in a list or graph form. The user may perform a click-through operation on the database that the user wants to access to view the tables in the database.
It should be noted that the user can only access one database at a time, and if the current database user finds that the database user does not look like the database user after clicking, the user needs to click the "return operation" to reselect the database for access.
Although the number of databases included in the system is large, in actual operation, there may not be a database that the user wants to view. For the situation, a database file uploading function is arranged in the system, so that when a database which is checked by a user is not available in the system, the user can independently upload and check the database file, and the universality and the content expansibility of the system are improved.
It should be noted that, for the uploaded database file, only local parsing is performed, that is, only the uploading user has the right to view the file, and no record is left when other users cannot see the database file. Furthermore, the uploaded database file is only temporarily stored in the system, and after the user browses/operates the database and closes the system or quits the account, the system automatically executes the cleaning operation on the database.
For step S102, data is stored in tables, each database containing a plurality of tables. After a user clicks and selects one table in the accessed database, the display interface extracts and displays the data contained in the table.
When the data in the table is queried/screened, only part of the data in the table may be displayed finally, so that in order to improve the data display efficiency, the display time of all the data in the table is taken out, and the form options in the table are only displayed before the data is queried. The database is provided with a comment function for marking the meaning of each form option, and when a user moves a mouse to one of the form options, the comment of the form option can be displayed so as to be convenient for the user to understand.
For example, assume that employee information is a database and age information is stored in a basic information table. When a user logs in the query system, a plurality of databases are displayed on the interface, wherein the databases comprise employee information databases. After the user clicks the employee information database, the basic information table is displayed on the interface, and after the user clicks the basic information table, form options such as age, gender and birth date in the table are displayed on the interface.
For step S103, an input box is provided after each form option for the user to input the query/filter condition. For example, "< 30" is entered in the input box of the age option (or field) of the basic information sheet, i.e., staff under the age of 30 is queried.
After the user inputs the Query information and clicks the Query button, the system generates a Query statement, such as Sql (Structured Query Language), based on the Query information and the corresponding form options to screen data in the form options, obtain and display a final Query result, and complete the data Query operation.
Multiple form options may be set in the same table, and a user can input query information to the multiple form options at one time to realize one-time query of data; or, query information can be input for one form option each time, and then a plurality of form options are operated one by one, so that the data is gradually screened.
For the data obtained by query, the user can directly click to view the data, and can also select export to download and view the data, for example, export the data into an Excel table.
The method provided by the embodiment is provided with the query system aiming at the databases, when a user queries the data in the databases, the user can access the databases in the query system without frequently clicking to enter the return operation, the operation mode of each database is universal, the system development cost is reduced, and meanwhile, the human resources are saved.
Referring to fig. 2, a schematic flow chart of an alternative data query method according to an embodiment of the present invention is shown, including the following steps:
s201: receiving a data query request, receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
s202: extracting the access authority information as a database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying;
s203: responding to the access operation of one database, acquiring the selection authority information of the roles to each table in the accessed database, and extracting the selection authority information as the table allowing selection for display;
s204: responding to the selection operation of one table, acquiring the viewing authority information of the role on each form option in the selected table, and extracting the viewing authority information as the form option allowed to be viewed;
s205: and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
In the above embodiment, for step S205, refer to the description of step S103 shown in fig. 1, and no further description is provided herein.
In the above embodiment, for step S201, the authority management generally refers to that, according to the security rule or security policy configured by the system, the user can access and can only access an authorized resource (e.g. a database). Rights management occurs in almost any system, especially systems that require a user to log in, such as employee information systems, point of burial systems, order systems, reporting systems, and the like.
In order to ensure the safety of database access in the system, different users have different access rights for the database with access right setting in the system. Some databases may allow access by all users, while some may allow access only by a particular user or users.
For the multi-user and multi-authority condition, a certain storage space is usually set in the query system to store access authority information of different users to different databases, and the access authority information is embodied by user login accounts. The account may be a user name and a password, or an account such as a mobile phone number, a mailbox account, a social account and the like which has been applied for registration or authorized login in the query system.
In order to facilitate the management of the access authority of the user account to each database in the system, the invention sets a role for each account. E.g., a group owner role, an administrator role, having access to all databases; and the assembly role, the test role, the maintenance role and the like only have access right to part of the database.
The system is preset with a role set, and when a user applies/registers an account, the user can perform role self-selection, and also can submit a role modification request in the subsequent use process so as to perform role adjustment according to the modified role. Therefore, after the user logs in the account and clicks the data query operation, the system determines the role pre-assigned to the account.
For step S202, the system presets access right information for each role for each database, including both permission access and prohibition access. The permission of access may be permission of browsing, selecting, viewing and the like on the table/data in the database, and the corresponding prohibition of access is permission of prohibition of browsing, selecting, viewing and the like on the table/data in the database.
Further, in order to save the occupation of the system storage space by the access right management information, different authority values may be set for the two types of access right information, for example, the authority value for prohibiting access is 0, and the authority value for allowing access is 1 or a value between 0 and 1.
Therefore, after the system determines the role of the current account, the system determines the database information which is allowed to be accessed according to the access authority information of the role to each database, and then the database information is combined and displayed in a list/icon form.
For step S203, the table is stored in the database, and when the user clicks the accessed database, the system automatically displays all tables in the database.
Considering the access rights information of a role to a database, the rights allowed to be selected are not necessarily exactly the same for each table in the same database. Therefore, the tables in the database are also screened based on the selection authority information of the role tables, so that only the tables with the selection authority are displayed.
It should be noted that, the selection authority information in the table in the database may be set in the same manner as or different from the access authority information in the database, but the operation principle is the same, and is specifically set by the operator.
For step S204, the data is stored in a table, and when the user clicks on the selected table, the system displays the form options in the table.
Like the access authority information and the selection authority information, the form options in the form are also provided with the viewing authority information so as to display different form options for different authority users, and the operation that the user needs to manually slide the screen due to excessive form options is reduced, so that the subsequent data query efficiency is improved. Therefore, the form options in the table need to be screened based on the viewing permission information, so that only the form options with viewing permission are displayed.
According to the method provided by the embodiment, the user can view different interfaces through setting the access authority of the user to the database, the table in the database and the menu option in the table. When the number of the options of the database, the table and the form in the system is large, the filtering can be performed in the mode, the time for searching the target by manually sliding the screen by a user is reduced, and meanwhile, the practicability and the data safety of the system are improved.
Referring to fig. 3, a schematic flow chart of another alternative data query method according to the embodiment of the present invention is shown, which includes the following steps:
s301: receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
s302: in response to the selection operation of one table, extracting form options in the selected table for displaying;
s303: receiving input of query information in at least one form option, and generating a query statement according to the identifier of the table, the form option and the query information;
s304: responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
s305: in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
s306: receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
s307: and querying the data in the table by using the query statement and the first query statement to obtain queried data and displaying the queried data.
In the above embodiment, for steps S301 and S302, reference may be made to the descriptions shown in fig. 1 and fig. 2, and details are not repeated here.
In the above embodiment, in steps S303 to S306, in the present invention, the user can access only one database and select one table in the database per operation.
In order to improve the comprehensiveness of the queried data, the invention responds to the selection operation of a user on one table in the database, displays the form options in the table, and simultaneously displays the association table with the table for the user to select, for example, displays the name of the association table in a list form.
The determination of the association table is made dependent on the identity of the accessed table. The identifier here may be a foreign key of the table. A table has only one primary key, but may have multiple foreign keys. The external key of the table is a main key of another table, and the external key can be repeated or null value and is used for establishing association relation with other tables. In addition, the foreign key is mainly used for controlling the integrity of data in the database, and when the data in one table is operated, the data in the table or a plurality of tables related to the foreign key can be changed simultaneously.
For example, the employee information is a database, the employee age information is stored in a basic information table, the social security information is separately stored in a social security information table, the public deposit information is separately stored in a public deposit information table, and the basic information table is associated with the social security information table and the public deposit information table. After the user selects the basic information table in the employee information database, if the operation of 'associated query' is clicked, the system displays the names of the social security information table and the public accumulation fund information table in a list or chart form.
Multiple association tables may be associated with the same table, but some users may not. The user can click on a part of the selected association table, and then input specific query information (namely, first query information) in the form option (namely, the first form option) of the selected association table. For example, the social security information table related to the basic information table inputs "> 5" in the input box after the age option/field of the social security information table, which means that employee information of the social security payment age of more than 5 years is extracted.
For step S307, after all the conditions are input, the query button is clicked to generate a query statement according to the query information input in each table (including the association table) selected by the user for data query, thereby completing the query operation.
For example, "< 30" is entered in the input box after the age option of the basic information table, then the associated social security information table is clicked, and "> 5" is entered in the input box after the age option of the social security information table; then clicking the associated accumulation fund information table, and inputting '3' in an input box behind the age options of the accumulation fund information table. The staff information under 30 years which meets the requirements that all social insurance is paid for more than 5 years and the public accumulation fund is paid for more than 3 years in the basic information table can be obtained by clicking the query button.
According to the method provided by the embodiment, all operable items in the next step are automatically displayed step by step according to the selection of the user on the database, the table in the database and the table menu option in the table; increasing associated query options to realize the function of data screening on multiple tables at one time; and finally, automatically generating query statements according to the screening conditions of the user for query, generating reports of the obtained data, and finishing the data query operation.
Referring to fig. 4, a schematic diagram of main modules of a data query apparatus 400 according to an embodiment of the present invention is shown, including:
the database access module 401 is configured to receive a data query request, extract a database list for display, and extract a table in an accessed database for display in response to an access operation on one of the databases;
a form option display module 402, configured to, in response to a selection operation on one of the tables, extract and display a form option in the selected table;
the data query module 403 is configured to receive an input of query information in at least one form option, perform a query operation on data corresponding to the at least one form option by using the query information, obtain queried data, and display the queried data.
In the apparatus for implementing the present invention, the database access module 401 is further configured to:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
In the apparatus for implementing the present invention, the database access module 401 is further configured to: and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
In the implementation apparatus of the present invention, the data query module 403 is further configured to:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
In addition, the detailed implementation of the device in the embodiment of the present invention has been described in detail in the above method, so that the repeated description is not repeated here.
Fig. 5 illustrates an exemplary system architecture 500 to which embodiments of the invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505 (by way of example only). The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 501, 502, 503.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 501, 502, 503.
It should be noted that the method provided by the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises a database access module, a form option display module and a data query module. The names of these modules do not form a limitation to the module itself in some cases, for example, the data query module may also be described as a "module that queries data corresponding to a menu option".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
in response to the selection operation of one table, extracting form options in the selected table for displaying;
and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
According to the technical scheme of the embodiment of the invention, only the database which the user has the authority to access is obtained through the access authority setting; and automatically displaying all operable items in the next step by step according to the selection of the user on the database, the table in the database and the table list option in the table, and finally automatically generating a query statement according to the screening condition of the user for query, generating the obtained data into the table list and finishing the data query operation.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for querying data, comprising:
receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
in response to the selection operation of one table, extracting form options in the selected table for displaying;
and receiving input of query information in at least one form option, and performing query operation on data corresponding to the at least one form option by using the query information to obtain and display the queried data.
2. The method of claim 1, wherein extracting the database listing for display further comprises:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
3. The method of claim 1, wherein extracting tables from the accessed database for display in response to the access operation to one of the databases further comprises:
and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
4. The method of claim 1, wherein the receiving an input of query information in at least one form option to perform a query operation on data corresponding to the at least one form option using the query information, and obtaining and displaying queried data, further comprises:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
5. A data query apparatus, comprising:
the database access module is used for receiving a data query request, extracting database lists for display, responding to an access operation on one database, and extracting tables in the accessed database for display;
the form option display module is used for responding to the selection operation of one of the tables, and extracting the form options in the selected table for display;
and the data query module is used for receiving input of query information in at least one form option, so as to perform query operation on the data corresponding to the at least one form option by using the query information, obtain and display the queried data.
6. The apparatus of claim 5, wherein the database access module is further configured to:
receiving account input, determining a role endowed to the account in advance, and acquiring access authority information of the role to each database in the database list;
and extracting the access authority information as the database which is allowed to be accessed, and combining the extracted database to generate a first database list for displaying.
7. The apparatus of claim 5, wherein the database access module is further configured to:
and receiving an uploading request of a database file, and analyzing the database file so as to display a table in the database file.
8. The apparatus of claim 5, wherein the data query module is further configured to:
responding to the association query operation of the table, and determining an association table list having association relation with the table according to the foreign key information of the table;
in response to the selection operation of at least one association table, extracting a first form option in the at least one association table for display;
receiving input of first query information in at least one first form option, and generating a first query statement according to the identification of the at least one association table, the at least one first form option and the first query information;
inquiring the data in the table by using the inquiry statement and the first inquiry statement to obtain and display the inquired data; wherein the query statement is generated according to the table identifier, the form option, and the query information.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201910937007.9A 2019-09-29 2019-09-29 Data query method and device Pending CN112580065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910937007.9A CN112580065A (en) 2019-09-29 2019-09-29 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910937007.9A CN112580065A (en) 2019-09-29 2019-09-29 Data query method and device

Publications (1)

Publication Number Publication Date
CN112580065A true CN112580065A (en) 2021-03-30

Family

ID=75111173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910937007.9A Pending CN112580065A (en) 2019-09-29 2019-09-29 Data query method and device

Country Status (1)

Country Link
CN (1) CN112580065A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051355A (en) * 2021-04-16 2021-06-29 湖南快乐阳光互动娱乐传媒有限公司 Receipt generation method and device, computer equipment and storage medium
CN113177070A (en) * 2021-05-17 2021-07-27 中移智行网络科技有限公司 Information query method, device and related equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113051355A (en) * 2021-04-16 2021-06-29 湖南快乐阳光互动娱乐传媒有限公司 Receipt generation method and device, computer equipment and storage medium
CN113177070A (en) * 2021-05-17 2021-07-27 中移智行网络科技有限公司 Information query method, device and related equipment
CN113177070B (en) * 2021-05-17 2022-08-12 中移智行网络科技有限公司 Information query method, device and related equipment

Similar Documents

Publication Publication Date Title
US10083488B2 (en) Purchasing contact information from an electronically displayed map
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
US9971803B2 (en) Method and system for embedding third party data into a SaaS business platform
US20200210612A1 (en) Policy based lifecycle management of personal information
US20220035773A1 (en) Form field creation systems and methods
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN111586177B (en) Cluster session loss prevention method and system
CN112580065A (en) Data query method and device
CN112947919A (en) Method and device for constructing service model and processing service request
CN113282591A (en) Authority filtering method and device, computer equipment and storage medium
CN117170784A (en) Menu and page rendering method and device thereof and electronic equipment
US20160124959A1 (en) System and method to recommend a bundle of items based on item/user tagging and co-install graph
US8832110B2 (en) Management of class of service
US20070271229A1 (en) System and method for data searching among multiple enterprise applications
US20220060470A1 (en) Expedited Authorization and Access Management
CN114493901A (en) Data access application processing method and device, computer equipment and storage medium
CN112182080A (en) Data integration system and data processing method based on data integration system
CN113495887A (en) Data form processing method, device and system
CN115904601B (en) Method, device and medium for generating user-specific application home page
JP6338909B2 (en) Content control system
US20220374258A1 (en) Collaboration across isolated virtual environments
CN115795508A (en) Method, device, equipment and computer readable medium for processing business data
CN112784247A (en) Authority verification method and device for application program
US10614090B1 (en) Indexing and archiving streaming sources for managed search
AU2022256046A1 (en) Enhancing user identification with privacy protection across web servers

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