CN111767299A - Database operation method, device and system, storage medium and electronic equipment - Google Patents

Database operation method, device and system, storage medium and electronic equipment Download PDF

Info

Publication number
CN111767299A
CN111767299A CN201911308245.XA CN201911308245A CN111767299A CN 111767299 A CN111767299 A CN 111767299A CN 201911308245 A CN201911308245 A CN 201911308245A CN 111767299 A CN111767299 A CN 111767299A
Authority
CN
China
Prior art keywords
database
statement
execution
operation request
database operation
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
CN201911308245.XA
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 Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun 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 Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201911308245.XA priority Critical patent/CN111767299A/en
Publication of CN111767299A publication Critical patent/CN111767299A/en
Pending legal-status Critical Current

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/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • 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
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Abstract

The invention provides a database operation method, a database operation device, a database operation system, a storage medium and electronic equipment. The database operation method provided by the embodiment of the invention comprises the following steps: the method comprises the steps of firstly obtaining a database operation request, wherein the database operation request is used for operating a first database, the first database is any one of databases in a database system, then converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, the first SQL statement belongs to an execution statement corresponding to the first database, and finally executing the first SQL statement to edit the first database. The invention provides a database operation method, which can convert a database operation request for operating a database into corresponding executable statements of each database, thereby realizing the editing operation of each database and achieving the purpose of carrying out unified operation on different types of databases.

Description

Database operation method, device and system, storage medium and electronic equipment
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a database operation method, apparatus, system, storage medium, and electronic device.
Background
With the continuous development of database technology, more and more fields need to use databases to perform data storage, editing and management operations.
In the prior art, a corresponding database is usually operated based on a respective preset data dictionary of the database, or performance of a related Structured Query Language (SQL) statement is monitored by reading performance data of the data dictionary and an operating system level.
However, due to the personalized difference of each data, the operation commands are not universal, and therefore, the unified operation cannot be directly realized for the databases of multiple types.
Disclosure of Invention
The embodiment of the invention provides a database operation method, a database operation device, a database operation system, a storage medium and electronic equipment, and aims to solve the technical problem that unified operation cannot be performed on different types of databases in the prior art.
In a first aspect, an embodiment of the present invention provides a database operation method, which is applied to a database system, where the database system includes multiple databases, and the method includes:
acquiring a database operation request, wherein the database operation request is used for operating a first database, and the first database is any one of the databases in the database system;
converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
and executing the first SQL statement to edit the first database.
In one possible design, after the executing the first SQL statement, further comprises:
and determining the execution state of the first SQL statement, wherein the execution state is successful or failed.
In a possible design, if it is determined that the execution state of the first SQL statement is successful, determining an execution time, where the execution time is a time difference between a first time and a second time, the first time is a time when the database operation request is acquired, and the second time is a time when the execution success identifier is acquired;
if the execution time is greater than a preset time threshold, sending prompt information; alternatively, the first and second electrodes may be,
and if the execution state of the first SQL statement is determined to be the execution failure, sending prompt information.
In one possible design, if the execution state of the first SQL statement is determined to be successful, the number of rows where data change occurs is obtained;
and if the line number is larger than a preset line number threshold value, sending prompt information.
In one possible design, before the executing the first SQL statement, the method further includes:
and determining that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
In one possible design, after the request for the database operation, the method further includes:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
In a second aspect, an embodiment of the present invention further provides a database operating apparatus, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a database operation request, the database operation request is used for operating a first database, and the first database is any database in a database system;
the conversion module is used for converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
and the execution module is used for executing the first SQL statement so as to edit the first database.
In one possible design, the database operating apparatus further includes:
and the determining module is used for determining the execution state of the first SQL statement, wherein the execution state is the execution success or the execution failure.
In one possible design, the database operating apparatus further includes:
and the sending module is used for sending the prompt message.
In a possible design, the determining module is further configured to determine that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
In one possible design, the determining module is further configured to:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
In a third aspect, an embodiment of the present invention provides a database system, including an application layer, a middle layer, and a database layer, where the database layer includes a plurality of databases;
the application layer is used for acquiring a database operation request, the database operation request is used for operating a first database, and the first database is any one of the databases in the database layer;
the middle layer is used for converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
the first database in the database layer is used for executing the first SQL statement so as to edit the first database.
In one possible design, the middle layer is further configured to determine an execution status of the first SQL statement, where the execution status is execution success or execution failure.
In one possible design, the intermediate layer is further configured to send a prompt message.
In one possible design, the middle layer is further configured to determine that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
In one possible design, the intermediate layer is further configured to:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
In a fourth aspect, an embodiment of the present invention further provides an electronic device, including:
a processor; and the number of the first and second groups,
a memory for storing executable instructions of the processor;
the display is connected with the processor and used for displaying a component selection page;
wherein the processor is configured to perform any one of the possible database operation methods of the first aspect via execution of the executable instructions.
In a fifth aspect, an embodiment of the present invention further provides a storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any one of the possible database operation methods in the first aspect.
According to the database operation method, the database operation device, the database operation system, the storage medium and the electronic equipment, the database operation request is obtained and converted into the first SQL statement according to the preset statement mapping rule, so that the database operation request for operating the database is converted into the corresponding executable statement of each database, the editing operation of each database is achieved, and the purpose of performing unified operation on different types of databases is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating an application scenario of a database operation method according to an example embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a method of database operation according to an example embodiment of the invention;
FIG. 3 is a flow diagram illustrating a method of database operation according to another example embodiment of the present invention;
FIG. 4 is a schematic flow diagram of a database manipulation device according to an exemplary embodiment of the present invention;
FIG. 5 is a schematic flow diagram of a database operating apparatus according to another example embodiment of the present invention;
FIG. 6 is a block diagram of a database system shown in accordance with an example embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the continuous development of database technology, more and more fields need to use databases to perform data storage, editing and management operations. In the prior art, a corresponding database is usually operated based on a respective preset data dictionary of the database, or performance of a related Structured Query Language (SQL) statement is monitored by reading performance data of the data dictionary and an operating system level.
However, due to personalized differences of the respective data, for example: currently, databases such as MYSQL, ORACAL, SQL Server and the like which are mainstream are configured with respective unique control modes, and operation commands between the databases are not universal, so that unified operation cannot be directly realized for various databases.
For example, in one scenario, company a belongs to company a1, company a2 and company A3, and company a1, company a2 and company A3 respectively manage different service modules, and now due to service requirements, company a needs to establish a database system, and needs to simultaneously access the first database of company a1, the second database of company a2 and the third database of company A3.
In many cases, when databases were initially established by the a1 subsidiary, the a2 subsidiary and the A3 subsidiary, different types of databases may be configured, for example, the first database of the a1 subsidiary is MYSQL database, the second database of the a2 subsidiary is ORACAL database and the third database of the A3 subsidiary is SQL Server database.
At this time, by means of the prior art, if the company a needs to establish the above-mentioned database system, the company a needs to configure the first database of the a1 sub-company, the second database of the a2 sub-company, and the third database of the A3 sub-company as the same type of database, and then establish the database system, which causes additional operations such as a lot of data migration and database change, and is not favorable for the work such as quick establishment, analysis, audit, and management of the database.
In view of the above problems, embodiments of the present invention provide a database operation method, which includes obtaining a database operation request, and converting the database operation request into a first SQL statement according to a preset statement mapping rule, so as to convert the database operation request for operating a database into an executable statement corresponding to each database, thereby implementing an editing operation on each database, and achieving a purpose of performing unified operation on different types of databases.
Fig. 1 is a schematic diagram illustrating an application scenario of a database operation method according to an example embodiment of the present invention. As shown in fig. 1, in the database operation method provided in this embodiment, a database operation request may be initiated in the terminal device 100, for example: query operation, update operation, delete operation, insert operation, and the like. After the server 200 acquires the database operation request initiated by the terminal device 100, the corresponding database in the database system may be operated, for example, when the database operation request is used to operate the first database 300, the first database may be operated.
It should be noted that the server 200 may be a separate server or may be a part of a terminal device, and the specific form of the server 200 is not particularly limited in this embodiment. However, the server 200 may act as a middle tier in a database system, between the application tier and the database tier. Specifically, the server 200 serves as an intermediate layer, and the database operation request can be converted into a first structured query language SQL statement through a preset statement mapping rule in the intermediate layer mapping, where the first SQL statement belongs to an execution statement corresponding to the first database 300. Therefore, the first database 300 executes the first SQL statement to perform corresponding editing operation on the first database 300, thereby implementing unified operation on different classes of databases.
FIG. 2 is a flow diagram illustrating a method of database operation according to an example embodiment of the invention. As shown in fig. 2, the database operation method provided in this embodiment includes:
step 101, obtaining a database operation request.
Specifically, the database operation request is obtained, for example: query operation, update operation, delete operation, insert operation, and the like. The database operation request is used to operate a first database, and the first database is any database in the database system.
Optionally, the request type may be determined according to the database operation request, for example, the request type is determined to be a query operation, an update operation, a delete operation, an insert operation, and the like. And then, determining a database operation request for operating the first database according to the request type and a preset type mapping rule. For example, the first database corresponds to the request type of the query operation, the second database corresponds to the request type of the update operation, and the third database corresponds to the request type of the update operation.
And 102, converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule.
After the database operation request is obtained, the database operation request may be intercepted, where all the database operation requests may be intercepted, or a specific type of database operation request may be intercepted.
And then, converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule. It should be noted that SQL is a special purpose programming language, a database query and programming language, and can be used to access data and query, update, and manage relational database systems.
In the enterprise, the same related database operation middle layer can be adopted for SQL operations of different databases, in the related operations, the related database operation statements are uniformly intercepted by subpackaging a layer of Filter, the application layer (or the business layer) is transparent, and the encoding of the related application layer cannot be influenced by the addition of the interception layer.
In addition, the database operation of the relevant application layer is converted into a complete specific SQL statement, wherein the following information can be analyzed through the analysis of the relevant SQL statement:
type of SQL execution: a Select operation (Select operation), an Update operation (Update operation), a Delete operation (Delete operation), and an Insert operation (Insert operation), etc.
The object of the operation of the SQL statement may be a database of the SQL operation or a table of the SQL operation.
And step 103, executing the first SQL statement.
After the database operation request is converted into the first structured query language SQL statement according to the preset statement mapping rule, the corresponding first database may execute the first SQL statement to perform an operation on the first database, such as a Select operation, an Update operation, a Delete operation, and an Insert operation on the first database.
On the basis of the above steps, in order to implement the operation security for the database, before the first SQL statement is executed, it may be determined whether the database operation corresponding to the first SQL statement is a restrictive operation of the first database. It is worth mentioning that the limiting operation may be preset, for example: the editing operation on the specified database can be limited, and the specified editing operation (for example, the editing operation can be a Select operation, an Update operation, a Delete operation, or an Insert operation) can also be limited. And the safe operation of the database is realized through the limitation on the operation object and the operation mode.
If the database operation corresponding to the first SQL statement is the restrictive operation of the first database, the first SQL statement is not executed, and if the database operation corresponding to the first SQL statement is the non-restrictive operation of the first database, the first SQL statement is executed.
In this embodiment, the database operation request is obtained and converted into the first SQL statement according to the preset statement mapping rule, so that the database operation request for operating the database is converted into the corresponding executable statements of each database, thereby implementing the editing operation on each database, and achieving the purpose of performing unified operation on different types of databases.
Fig. 3 is a flow chart diagram illustrating a database operation method according to another example embodiment of the present invention. As shown in fig. 3, the database operation method provided in this embodiment includes:
step 201, obtaining a database operation request.
Step 202, converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule.
And step 203, executing the first SQL statement.
It should be noted that, in this embodiment, specific implementation manners of step 201 to step 203 may refer to specific descriptions of step 101 to step 103 in the embodiment shown in fig. 2, and therefore, details thereof are not described here again.
And step 204, analyzing the execution result.
In this step, after the first SQL statement is executed, an execution status of the first SQL statement may be determined, where the execution status is successful or failed, so as to determine whether the first SQL statement is successfully executed.
And if the execution state of the first SQL statement is determined to be the execution failure, sending prompt information, wherein the prompt information can specifically be used for alarming in a related mail or short message mode and the like so as to remind a system administrator. In addition, the first SQL statement with execution failure is recorded for the operation execution statistics performed subsequently.
And if the execution state of the first SQL statement is determined to be successful, determining execution time, wherein the execution time is a time difference between a first time and a second time, the first time is a time for acquiring the database operation request, and the second time is a time for acquiring the successful execution identifier. It should be noted that when the database system obtains the database operation request, the first time is recorded, and when the execution state of the first SQL statement is that the execution is successful, the second time is determined by obtaining the execution success identifier. When the determined execution time is greater than the preset time threshold, the prompt message can be sent as well. In addition, the first SQL statement with the excessively long execution time is recorded for the operation execution statistics performed subsequently.
In addition, if the execution state of the first SQL statement is determined to be successful, the line number of the changed data is obtained, and when the line number is larger than a preset line number threshold, prompt information is sent. In addition, the first SQL statement that the execution affects the excessive number of data lines is recorded for the subsequent operation execution statistics. For each execution of SQL statement, in order to ensure the safety of data, when one operation affects too many data line numbers, the operation is most likely to be mistakenly deleted or updated, therefore, when the line number with data change is larger than the preset line number threshold, a system maintenance personnel is informed in time in the form of mail or short message to confirm whether there is mistaken deletion or mistaken update, so as to timely maintain or recover data and ensure the normal operation of the database system.
Fig. 4 is a schematic flow chart of a database operating apparatus according to an example embodiment of the present invention. As shown in fig. 4, the database operating apparatus 300 according to the present embodiment includes:
an obtaining module 301, configured to obtain a database operation request, where the database operation request is used to operate a first database, and the first database is any database in a database system;
the conversion module 302 is configured to convert the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, where the first SQL statement belongs to an execution statement corresponding to the first database;
the executing module 303 is configured to execute the first SQL statement to edit the first database.
On the basis of the embodiment shown in fig. 4, fig. 5 is a schematic flowchart of a database operating apparatus according to another exemplary embodiment of the present invention, and as shown in fig. 5, the database operating apparatus 300 further includes:
the determining module 304 is configured to determine an execution state of the first SQL statement, where the execution state is execution success or execution failure.
In one possible design, the database operating apparatus 300 further includes:
a sending module 305, configured to send a prompt message.
In a possible design, the determining module is further configured to determine that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
In one possible design, the determining module 304 is further configured to:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
It should be noted that the database operation apparatus provided in the embodiments shown in fig. 4 to 5 may be used to execute the database operation method provided in any of the above embodiments, and the specific implementation manner and the technical effect are similar and will not be described herein again.
FIG. 6 is a block diagram of a database system according to an example embodiment of the present invention. As shown in fig. 6, the database system 400 provided in this embodiment includes:
an application layer 401, a middle layer 402, and a database layer 403, the database layer 403 including a plurality of databases;
the application layer 401 is configured to obtain a database operation request, where the database operation request is used to operate a first database, and the first database is any one of the databases in the database layer 403;
the middle layer 402 is configured to convert the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, where the first SQL statement belongs to an execution statement corresponding to the first database;
the first database in the database layer is used for executing the first SQL statement so as to edit the first database.
In one possible design, the middle layer 402 is further configured to determine an execution status of the first SQL statement, where the execution status is execution success or execution failure.
In one possible design, the middle layer 402 is further configured to send a prompt.
In one possible design, the middle layer 402 is further configured to determine that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
In one possible design, the middle layer 402 is further configured to:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
It should be noted that the database system provided in the embodiment shown in fig. 6 can be used to execute the database operation method provided in any of the above embodiments, and the specific implementation manner and the technical effect are similar and will not be described herein again.
Fig. 7 is a schematic structural diagram of an electronic device shown in accordance with an example embodiment of the present invention. As shown in fig. 7, the present embodiment provides an electronic device 500, including:
a processor 501; and the number of the first and second groups,
a memory 502 for storing executable instructions of the processor, which may also be a flash (flash memory);
wherein the processor 501 is configured to perform the steps of the above-described method via execution of the executable instructions. Reference may be made in particular to the description relating to the preceding method embodiment.
Alternatively, the memory 502 may be separate or integrated with the processor 501.
When the memory 502 is a device independent from the processor 501, the electronic device 500 may further include:
a bus 503 for connecting the processor 501 and the memory 502.
The present embodiment also provides a readable storage medium, in which a computer program is stored, and when at least one processor of the electronic device executes the computer program, the electronic device executes the methods provided by the above various embodiments.
The present embodiment also provides a program product comprising a computer program stored in a readable storage medium. The computer program can be read from a readable storage medium by at least one processor of the electronic device, and the execution of the computer program by the at least one processor causes the electronic device to implement the methods provided by the various embodiments described above.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of operating a database, applied to a database system, the database system comprising a plurality of databases, the method comprising:
acquiring a database operation request, wherein the database operation request is used for operating a first database, and the first database is any one of the databases in the database system;
converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
and executing the first SQL statement to edit the first database.
2. The method of database operation according to claim 1, further comprising, after said executing the first SQL statement:
and determining the execution state of the first SQL statement, wherein the execution state is successful or failed.
3. The database operation method according to claim 2, wherein if it is determined that the execution state of the first SQL statement is successful, determining an execution time, where the execution time is a time difference between a first time and a second time, the first time is a time when the database operation request is obtained, and the second time is a time when the execution success flag is obtained;
if the execution time is greater than a preset time threshold, sending prompt information; alternatively, the first and second electrodes may be,
and if the execution state of the first SQL statement is determined to be the execution failure, sending prompt information.
4. The database operation method according to claim 2 or 3, wherein if the execution state of the first SQL statement is determined to be successful, the number of rows where data change occurs is obtained;
and if the line number is larger than a preset line number threshold value, sending prompt information.
5. The database operation method according to any one of claims 1 to 3, further comprising, before the executing the first SQL statement:
and determining that the database operation corresponding to the first SQL statement is a non-limiting operation in the first database.
6. The database operation method according to any one of claims 1 to 3, further comprising, after the database operation request:
determining a request type according to the database operation request;
and determining that the database operation request is used for operating the first database according to the request type and a preset type mapping rule.
7. A database operating apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a database operation request, the database operation request is used for operating a first database, and the first database is any database in a database system;
the conversion module is used for converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
and the execution module is used for executing the first SQL statement so as to edit the first database.
8. A database system comprising an application tier, a middle tier, and a database tier, the database tier comprising a plurality of databases;
the application layer is used for acquiring a database operation request, the database operation request is used for operating a first database, and the first database is any one of the databases in the database layer;
the middle layer is used for converting the database operation request into a first Structured Query Language (SQL) statement according to a preset statement mapping rule, wherein the first SQL statement belongs to an execution statement corresponding to the first database;
the first database in the database layer is used for executing the first SQL statement so as to edit the first database.
9. An electronic device, comprising:
a processor; and
a memory for storing a computer program for the processor;
wherein the processor is configured to implement the database operating method of any one of claims 1 to 6 by executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the database operating method of any one of claims 1 to 6.
CN201911308245.XA 2019-12-18 2019-12-18 Database operation method, device and system, storage medium and electronic equipment Pending CN111767299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911308245.XA CN111767299A (en) 2019-12-18 2019-12-18 Database operation method, device and system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911308245.XA CN111767299A (en) 2019-12-18 2019-12-18 Database operation method, device and system, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111767299A true CN111767299A (en) 2020-10-13

Family

ID=72718481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911308245.XA Pending CN111767299A (en) 2019-12-18 2019-12-18 Database operation method, device and system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111767299A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905567A (en) * 2021-03-23 2021-06-04 杭州沃趣科技股份有限公司 Database replacement method, device, system and medium based on network protocol conversion

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6236997B1 (en) * 1997-06-23 2001-05-22 Oracle Corporation Apparatus and method for accessing foreign databases in a heterogeneous database system
CN101645074A (en) * 2009-09-07 2010-02-10 浪潮集团山东通用软件有限公司 Method for accessing relational databases of different types
CN108415909A (en) * 2017-02-09 2018-08-17 北京京东尚科信息技术有限公司 A kind of system and method accessing disparate databases
CN110109893A (en) * 2018-02-02 2019-08-09 北京京东尚科信息技术有限公司 The method and apparatus of data modeling and operation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6236997B1 (en) * 1997-06-23 2001-05-22 Oracle Corporation Apparatus and method for accessing foreign databases in a heterogeneous database system
CN101645074A (en) * 2009-09-07 2010-02-10 浪潮集团山东通用软件有限公司 Method for accessing relational databases of different types
CN108415909A (en) * 2017-02-09 2018-08-17 北京京东尚科信息技术有限公司 A kind of system and method accessing disparate databases
CN110109893A (en) * 2018-02-02 2019-08-09 北京京东尚科信息技术有限公司 The method and apparatus of data modeling and operation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905567A (en) * 2021-03-23 2021-06-04 杭州沃趣科技股份有限公司 Database replacement method, device, system and medium based on network protocol conversion

Similar Documents

Publication Publication Date Title
CN107506451B (en) Abnormal information monitoring method and device for data interaction
CN107220142B (en) Method and device for executing data recovery operation
CN110661659A (en) Alarm method, device and system and electronic equipment
CN109815291B (en) Data synchronization method and device, electronic equipment and storage medium
CN109284251A (en) Blog management method, device, computer equipment and storage medium
CN110088744B (en) Database maintenance method and system
JP6633642B2 (en) Method and device for processing data blocks in a distributed database
CN103593257A (en) Data backup method and device
CN112199394A (en) Alarm information pushing method and system, intelligent terminal and storage medium
CN112416957A (en) Data increment updating method and device based on data model layer and computer equipment
CN103503388B (en) A kind of distributed queue's message read method and equipment, system
CN111767299A (en) Database operation method, device and system, storage medium and electronic equipment
CN106170013B (en) A kind of Kafka message uniqueness method based on Redis
CN109885431B (en) Method and apparatus for backing up data
CN111367934B (en) Data consistency checking method, device, server and medium
CN107422991B (en) Storage strategy management system
CN110221952B (en) Service data processing method and device and service data processing system
CN110196793B (en) Log analysis method and device for plug-in database
CN108197147B (en) Operation and maintenance method and device for number card database
CN106293897B (en) Automatic scheduling system of subassembly
CN113342861B (en) Data management method and device in service scene
CN109358803B (en) Abnormal idle storage analysis method, device and system
CN111307197B (en) Information recording method and management equipment
CN116886326A (en) System account management method and device
CN112597233A (en) Batch processing method, device and equipment of data indexes and storage medium

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