CN102456051A - Methods and devices for importing/exporting database data - Google Patents

Methods and devices for importing/exporting database data Download PDF

Info

Publication number
CN102456051A
CN102456051A CN2010105276787A CN201010527678A CN102456051A CN 102456051 A CN102456051 A CN 102456051A CN 2010105276787 A CN2010105276787 A CN 2010105276787A CN 201010527678 A CN201010527678 A CN 201010527678A CN 102456051 A CN102456051 A CN 102456051A
Authority
CN
China
Prior art keywords
query
data
configuration item
statement
query configuration
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
CN2010105276787A
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.)
Peking University
Founder International Beijing Co Ltd
Peking University Founder Group Co Ltd
Original Assignee
Peking University
Founder International Beijing Co Ltd
Peking University Founder Group 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 Peking University, Founder International Beijing Co Ltd, Peking University Founder Group Co Ltd filed Critical Peking University
Priority to CN2010105276787A priority Critical patent/CN102456051A/en
Publication of CN102456051A publication Critical patent/CN102456051A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses methods and devices for importing/exporting database data, wherein the method for importing the database data comprises the following steps of: obtaining an inquiry configuration item list in an inquiry configuration file, wherein the inquiry configuration item list comprises one or more inquiry configuration items; and each inquiry configuration item comprises the title of a data file for storing the imported data and an inquiry sentence; executing the inquiry sentence in each inquiry configuration item and generating an importing sentence matched with the inquiry sentence; and importing the data file into a database according to the importing sentence; and the method for exporting the database data comprises the following steps of: obtaining the inquiry configuration item list in the inquiry configuration file, and executing the inquiry sentences in the inquiry configuration items in the inquiry configuration item list, thereby obtaining the exported data file. With the methods and the devices provided in the invention, the work load of the research personnel can be reduced and the importing/exporting requirements of the database data can be quickly realized; therefore, the integrated development efficiency of software is improved; and mutual importing and exporting of data between heterogeneous databases is realized.

Description

The method and apparatus of database data importing/derivation
Technical field
The present invention relates to a kind of method and apparatus of database data importing/derivation.
Background technology
Database technology is the basis and the core of modern computer infosystem and computer application system, is the important component part of infosystem.When carrying out the database application system exploitation, need database data be derived to be used for the native system backup or to carry out data sharing and exchange with other system usually.Data base management system (DBMS) commonly used provides backup and recovery instrument, importing (Imp) is provided, has derived (Exp) utility routine like Oracle, but these instruments is thicker to derived data control granularity, is difficult to competent users ' individualized requirement; The instrument that data base management system (DBMS) itself provides is difficult between heterogeneous database system, import and export, and the data that the instrument that provides like Oracle is derived are difficult to import in the DB2 database; In addition, these instrument method of application are complicated, for the final user who is not engaged in data base administration, are difficult for grasping.Usually the user can require to meet in functions of application system the function of the data importing derivation of users ' individualized requirement, and seamless being incorporated in the application system.Existing development approach requires different the importing and exporting function, when the user need append or reduce export content, all need update routine of exploitation to the demand that imports and exports of different table, different field tabulation, and the development amount is big, programmer's duplication of labour, code are difficult to safeguard.
There is the problem that research staff's development amount is big, be difficult to adapt to the user's request variation in development approach to database data importing/derivation in the correlation technique, does not propose effective solution at present as yet.
Summary of the invention
To the development approach of database data importing/derivation in the correlation technique exist research staff's development amount big, be difficult to adapt to the problem that user's request changes and propose the present invention; For this reason; Fundamental purpose of the present invention is to provide a kind of method and apparatus of database data importing/derivation, to address the above problem.
To achieve these goals, according to an aspect of the present invention, the method that provides a kind of database data to import.
The method that imports according to database data of the present invention comprises: obtain the query configuration item tabulation in the query configuration file; The tabulation of query configuration item comprises that one or more query configuration items, each query configuration item comprise Data Filename and the query statement of preserving the importing data; Carry out the query statement in the query configuration item, and the import statement of generation and query statement coupling; According to import statement data file is imported database.
Further, carry out the query statement in the query configuration item, and the import statement of generation and query statement coupling comprises: in database, inquire about obtaining table name and field name tabulation according to query statement; According to table name and the corresponding import statement of field name tabulation generated query statement.
Further, before according to import statement data file being imported database, method also comprises: data file is kept in the compressed file, is kept in the compressed file after perhaps encrypting.
Further, the query configuration file is manual creation or passes through the program generation.
To achieve these goals, according to an aspect of the present invention, the method that provides a kind of database data to derive.
The method that derives according to database data of the present invention comprises: obtain the query configuration item tabulation in the query configuration file; The tabulation of query configuration item comprises one or more query configuration items, and each query configuration item comprises Data Filename and the query statement of preserving derived data; Carry out the query statement in the query configuration item, obtaining the result set in the database, and result set is kept in the data file.
Further, after being kept at result set in the data file, data file compressed or encrypt back compression being kept in the specified compression file.
Further; Obtain the query configuration item tabulation in the query configuration file; The tabulation of query configuration item comprises one or more query configuration items; Each query configuration item comprises Data Filename and the query statement of preserving derived data, comprising: all the query configuration items in the tabulation of query configuration item are obtained in repeating query; A query configuration item is obtained in repeating query each time, and each query configuration item comprises Data Filename and the query statement of preserving derived data, carries out query statement and result set is kept in the data file.
To achieve these goals, according to a further aspect in the invention, the device that provides a kind of database data to import.
The device that imports according to database data of the present invention comprises: acquisition module; Be used for obtaining the query configuration item tabulation of query configuration file; The tabulation of query configuration item comprises that one or more query configuration items, each query configuration item comprise Data Filename and the query statement of preserving the importing data; Processing module is used for carrying out the query statement of query configuration item, and the import statement of generation and query statement coupling;
The data importing module is used for according to import statement data file being imported database.
Further, processing module comprises: enquiry module is used for obtaining table name and field name tabulation according to query statement in the database inquiry; Generation module is used for according to table name and the corresponding import statement of field name tabulation generated query statement.
To achieve these goals, according to a further aspect in the invention, the device that provides a kind of database data to derive.
The device of deriving according to database data of the present invention comprises: acquisition module; Be used for obtaining the query configuration item tabulation of query configuration file; The tabulation of query configuration item comprises one or more query configuration items, and each query configuration item comprises Data Filename and the query statement of preserving derived data; Data derive module, are used for carrying out the query statement of query configuration item, obtaining the result set in the database, and result set are kept in the data file.
Further, device also comprises: preserve module, be used for data file is compressed or encrypted the back and compress and be kept at the specified compression file.
Further; Acquisition module comprises: the circular treatment module; Be used for repeating query and obtain all query configuration items of query configuration item tabulation; A query configuration item is obtained in repeating query each time, and each query configuration item comprises Data Filename and the query statement of preserving derived data, carries out query statement and result set is kept in the data file.
To achieve these goals, according to a further aspect in the invention, a kind of device of database data importing/derivation is provided.
Device according to database data importing/derivation of the present invention comprises: all technical characteristic and the technical scheme thereof of the device that above-mentioned database data imports, and, all technical characteristic and the technical scheme thereof of the device that above-mentioned database data is derived.
Through the present invention, adopt the query configuration item tabulation of obtaining in the query configuration file, the tabulation of query configuration item comprises one or more query configuration items; Carry out the query statement in the query configuration item, and the import statement that is complementary of generation and query statement; According to import statement data file is imported database; And through obtaining the query configuration tabulation in the query configuration file; Carry out the query statement in the query configuration item in the query configuration tabulation again; With the data file that obtains deriving; The development approach that has solved database data importing/derivation in the correlation technique exist research staff's development amount big, be difficult to adapt to the problem that user's request changes, and then reached minimizing research staff work load, the importing of Rapid Realization database data/derivation demand; Improve the whole development efficiency of software, and realize the effect that data import each other/derive between the heterogeneous database.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, and illustrative examples of the present invention and explanation thereof are used to explain the present invention, do not constitute improper qualification of the present invention.In the accompanying drawings:
Fig. 1 is the device synoptic diagram according to the database data importing of the embodiment of the invention;
Fig. 2 is the device synoptic diagram of deriving according to the database data of the embodiment of the invention;
Fig. 3 is the method flow diagram according to the database data importing of the embodiment of the invention;
Fig. 4 is the method for optimizing process flow diagram according to the database data importing of the embodiment of the invention;
Fig. 5 is the method flow diagram of deriving according to the database data of the embodiment of the invention;
Fig. 6 is the method for optimizing process flow diagram of deriving according to the database data of the embodiment of the invention.
Embodiment
Need to prove that under the situation of not conflicting, embodiment and the characteristic among the embodiment among the application can make up each other.Below with reference to accompanying drawing and combine embodiment to specify the present invention.
According to embodiments of the invention, the device that provides a kind of database data to import.
Fig. 1 is the device synoptic diagram according to the database data importing of the embodiment of the invention.As shown in Figure 1, the device that this database data imports comprises: acquisition module 11, and the query configuration item tabulation that is used for obtaining the query configuration file, the tabulation of query configuration item comprises one or more query configuration items; Processing module 13 is used for carrying out the query statement of query configuration item, and the import statement that is complementary of generation and query statement; Data importing module 15 is used for according to import statement data file being imported database.
The embodiment of the invention is come the importing of control data database data through the query configuration file; Developer or final user can be according to demand editor, modification query configuration files; One or more query configuration items are set in the query configuration file; Each query configuration item comprises Data Filename and query statement, and the user can dispose the database data that needs import according to increase in demand or the query configuration item of revising in the query configuration file, and these data comprise table and the field thereof that needs import.Thisly substituted original importing data through the method that the query configuration file content is set and needed that the programming personnel edits, the method for program compiler; Can satisfy different importing demands; And simplified import operation, and reduced programmer's work load, can the different importing demand of Rapid Realization; The reply user improves the whole development efficiency of software to the changes in demand of import feature fast.
Processing module 13 is shone upon the import statement that obtains with the query statement coupling automatically through the query configuration item of carrying out the query configuration file that sets in the acquisition module 11; Thereby realized only need in the query configuration file, writing the query configuration item; Each query configuration item comprises Data Filename and query statement; And need not add independent import statement, thus simplified the import operation of database data, improved work efficiency.
Processing module 13 in the embodiment of the invention can comprise: enquiry module 132 and generation module 134, and wherein, enquiry module 132 is used for obtaining table name and field name tabulation according to query statement in the database inquiry; Generation module 134 is used for according to table name and field name tabulation and generates import statement that should query statement.Obtain table name and field name tabulation obtaining the import statement corresponding through carrying out query statement in the enquiry module 132 among this embodiment with query statement, system according to import statement will data file importing database, the import operation of completion data file.
The embodiment of the invention can also comprise read module, is used for reading from compressed file importing data of database.Preferably, the filename of the data file of preserving in the compressed file is identical with the Data Filename of query configuration item in the tabulation of query configuration item, but is not must be identical, can be provided with flexibly according to demand.
Fig. 2 is the device synoptic diagram of deriving according to the database data of the embodiment of the invention.As shown in Figure 2; The device that this database data is derived comprises: acquisition module 11; Be used for obtaining the query configuration item tabulation of query configuration file; The tabulation of query configuration item comprises one or more query configuration items, and each query configuration item comprises Data Filename and the query statement of preserving derived data; Data derive module 21, are used for carrying out the query statement of query configuration item, obtaining the result set in the database, and result set are kept in the data file, and wherein, this data file can be named with Data Filename.Preferably, the device that database of the present invention is derived can also comprise the preservation module, is used for the data file compression or the compression of encryption back of saving result collection are kept at the specified compression file.
The embodiment of the invention is come the derivation of control data database data through the query configuration file; Because developer or final user can be according to demand editor, modification query configuration files; One or more query configuration items are set in the query configuration file, dispose the database data that needs are derived according to the query configuration item in increase in demand or the modification query configuration file.The function that this method through the configuration querying configuration file content has substituted original realization derived data database data needs the programming personnel to edit, compile the method for data derivation program; Can satisfy different derivation demands; And simplified and derived operation, reduced programmer's work load, can the different derivation demand of Rapid Realization; The changes in demand of reply derivation improves the whole development efficiency of software fast.
The embodiment of the invention can also comprise the preservation module, is used for the data file compression that database is derived or encrypts the compressed file that the back compression is saved to assigned address.Assigned address among this embodiment can be a pre-specified address, also can be the address that user real time is revised.
Preferably; Acquisition module 11 of the present invention can comprise: the circular treatment module is used for all query configuration items that the tabulation of query configuration item is obtained in repeating query; A query configuration item is obtained in repeating query each time; Each query configuration item comprises Data Filename and the query statement of preserving derived data, carries out query statement and result set is kept in the said data file.
In the foregoing description; Query configuration item tabulation of the present invention can comprise one or more query configuration items; Each query configuration item comprises Data Filename and the query statement that it is corresponding, and wherein, the staff can be according to the query configuration item in the increase in demand query configuration file; Also can revise the content in the original query configuration file, thus the database data that realization is derived or imported according to demand.In the process that the present invention implements, need traversal to carry out the database table data of each query configuration item in the tabulation of query configuration item needing to obtain deriving or importing, if when the query configuration file be sky, then do not derive or do not import any data.
Can obtain a kind of device of database data importing/derivation through embodiment of the present invention; This device can comprise: all technical characteristic and the technical scheme of the device that above-mentioned database data imports; And, all technical characteristic and the technical scheme of the device that above-mentioned database data is derived.In practical application; The query configuration file that imports and exports of database data can be identical file; When promptly derivation side sends to importing side with the compressed file of deriving; Compressed file of deriving and the query configuration file that in the derivation process, disposes are all sent to importings side, and importing root can be successfully with the data file importing according to the information of said two devices, and importing can come the data in the data file that flexible customization will import to revise existing query configuration file.
The foregoing description is through creating the query configuration file, and each query configuration item comprises Data Filename and the query statement of preserving derived data.The device that database data in the device of database data importing/derivation is derived all clauses and subclauses in can the traversal queries configuration items list; Clauses and subclauses are query configuration items; Can obtain the Data Filename and the query statement of each clauses and subclauses; Carry out query manipulation at database, leave Query Result in a data file, and this data files is put into compressed file with said Data Filename name.The device that database data in the device of database data importing/derivation imports all clauses and subclauses in can traversal queries statement memory storage; Clauses and subclauses are query configuration items; Can obtain the Data Filename and the query statement of each clauses and subclauses; From the compressed file that will import, read the data file that will import, with the content importing database of data file.Adopt the above embodiment of the present invention, can import and export function development and seamless being incorporated in the application system by the Rapid Realization database data.
Fig. 3 is the method flow diagram according to the database data importing of the embodiment of the invention; Fig. 4 is the method for optimizing process flow diagram according to the database data importing of the embodiment of the invention.
As shown in Figure 3, the method that database data of the present invention imports comprises the steps:
Step S302 obtains the query configuration item tabulation in the query configuration file through the acquisition module among Fig. 1 11, and the tabulation of query configuration item comprises one or more query configuration items.Query configuration item tabulation in the query configuration file in this step can be provided with and create according to demand, is used for flexibly the also operation of reduced data importing to satisfy.
Step S304, through the query statement in the 13 execution query configuration items of the processing module among Fig. 1, and the import statement of generation and query statement coupling.
Step S306 carries out import statement through the data importing module among Fig. 1 15 data file is imported database.
The foregoing description is through the query configuration item in configuration querying configuration file tabulation, solved the development amount that development approach that existing database data imports exists big, be difficult to adapt to the problem that user's request changes.Concrete can be configurable table and the field that needs importing through the query statement that changes in the query configuration file; This embodiment can satisfy different importing demands through configuration; Simplify import operation, reduced programmer's work load, can the different importing demand of Rapid Realization; The changes in demand of reply importing improves the whole development efficiency of software fast.The import tool that solving the available data base management system simultaneously provides is difficult to control the derived data granularity, can not between heterogeneous database system, imports and exports and unworkable problem.The query configuration file content of present embodiment is shown in preceding two row in the following table, and wherein, the row of the 3rd in the table are illustrative notes, and the actual queries configuration file is this row content not:
Data Filename Query statement Show all fields
table1.txt select*from?table1 feld1、field2、field3
table2.txt Select?field2,field3?from?table2 field1、field2、field3
The preferable methods that database data of the present invention as shown in Figure 4 imports comprises the steps that wherein, the data file that will import can be the file of manual creation, also can be the data file that other database is derived.
Step S401, obtain query configuration item tabulation from the query configuration file through the acquisition module among Fig. 1 11, this query configuration item tabulation as follows:
Data Filename Query statement
table1.txt select*from?table1
table2.txt select?field2,field3?from?table2
Whether the query configuration item tabulation among step S402, the determining step S401 of system is empty, when the tabulation of query configuration item is sky, finishes to import step, otherwise gets into step S403.Whether this step made a decision table before carrying out next step inquiry be the work efficiency that sky improves the user.
Step S403, system obtain first query configuration item in the tabulation of query configuration item, obtain Data Filename table1.txt and query statement select*from table1, and this query statement representes to import all fields of table1 table.
Step S404, system obtain table name, the field name tabulation of query statement.This step is to carry out select*from table1 at database, obtains table name table1, field name tabulation field1, field2, the field3 of query statement from database metadata.
Step S405, utilize above-mentioned table name table1 and field name tabulation field1, field2, field3 to generate to import data SQL statement insert into table1 (field1, field2, field3) values (?,?,?).
Step S406, import target database from the compressed file read data files and with its content; This step reads the data file of table1.txt by name from the compressed file test.zip that will import, utilize above-mentioned SQL statement to be inserted in the table1 table of target database each row content of data file.
Step S407, system judge whether to exist next query configuration item; Owing to can comprise one or more query configuration item in the tabulation of query configuration item; If first query configuration item as first statement, then can be judged whether to exist next bar statement, promptly whether have second query configuration item; Continue execution in step S408 if exist, otherwise the import operation of end data database data.
Step S408 obtains second query configuration item, and execution in step S403 is to step S406, until not existing next query configuration item to finish to accomplish the work that imports.
Second query configuration item can be handled after the step S408, Data Filename table2.txt and query statement select field2, field3 from table2 can be obtained according to present embodiment.Said query statement indicates to import the field2 of table2 table; The field3 field; Can carry out select field2 at database afterwards, field3 from table2 obtains table name table2, field name tabulation field2, the field3 of query statement from database metadata; SQL statement insert into table2 (field2, the field3) values that utilizes the tabulation of above-mentioned table name table2 and field name field2, field3 to generate again to import data (?,?).
Above-mentioned steps can read the data file of table2.txt by name from the compressed file test.zip that will import, utilize above-mentioned SQL statement to be inserted in the table2 table of target database each row content of data file.After accomplishing, data importing finishes import operation.
Carry out the query statement in the query configuration item in the query configuration file in the above-mentioned preferred embodiment, and the step of the import statement of the coupling of the query statement in generation and the said query configuration item can comprise: in database, inquire about obtaining table name and field name tabulation according to query statement; Tabulation generates import statement that should query statement according to table name and field name.
Present embodiment is before importing database according to import statement with data file, and method also comprises: obtain the data file of the Data Filename in the query configuration item by name, data file is kept in the compressed file, is kept in the compressed file after perhaps encrypting.The process of encrypting storing has improved the security that database data imports and exports.The query configuration file is manually to be provided with or the program generation in the foregoing description.
Fig. 5 is the method flow diagram of deriving according to the database data of the embodiment of the invention; Fig. 6 is the method for optimizing process flow diagram of deriving according to the database data of the embodiment of the invention.
As shown in Figure 5, the method that database data of the present invention is derived comprises the steps:
Step S502; Obtain the query configuration item tabulation in the query configuration file through the acquisition module among Fig. 2 11; The tabulation of query configuration item comprises one or more query configuration items; Query configuration file in this step can be provided with and create according to demand, is used for flexibly the also operation of reduced data derivation to satisfy.
Step S504 derives module 21 through the data among Fig. 2 and carries out the query statement in the said query configuration item, obtains result set from database, and result set is kept in the data file with the Data Filename name.
Wherein, after being kept at result set in the data file, can data file being compressed or encrypt back compression and be kept in the specified compression file in the present embodiment.Specified compression file among this embodiment has assigned address, and this address can be a pre-specified address, also can be the address that user real time is revised.
The foregoing description is through the query configuration item in configuration querying configuration file tabulation, and the development amount that the development approach that having solved existing database data derives exists is big, be difficult to adapt to the problem that user's request changes.Concrete can be configurable table and the field that needs derivation through the query configuration item that changes in the query configuration file; This embodiment can satisfy different derivation demands through configuration; Having simplified derives operation, has reduced programmer's work load, can the different derivation demand of Rapid Realization; The changes in demand of reply derivation improves the whole development efficiency of software fast.The derivation instrument that solving the available data base management system simultaneously provides is difficult to control derived data granularity, unworkable problem.The query configuration item of present embodiment thes contents are as follows shown in preceding two row of showing, and wherein, the row of the 3rd in the table are illustrative notes, and the actual queries configuration file is this row content not:
Data Filename Query statement Show all fields
Table1.txt ?select*from?table1 field1、field2、field3
Table2.txt ?Select?field2,field3?from?table2 field1、field2、field3
The preferable methods that database data of the present invention as shown in Figure 6 is derived comprises the steps:
Step S601, obtain query configuration item tabulation from the query configuration file through the acquisition module among Fig. 2 11, this query configuration item tabulation as follows:
Data Filename Query statement
table1.txt select*from?table1
table2.txt select?field2,field3?from?table2
Whether the query configuration item tabulation among step S602, the determining step S601 of system is empty, when the tabulation of query configuration item is sky, finishes to import step, otherwise gets into step S603.Whether this step made a decision table before carrying out next step inquiry be the work efficiency that sky improves the user.
Step S603, system obtain first query configuration item in the tabulation of query configuration item, promptly handle first statement, obtain Data Filename table1.txt and query statement select*from table1, and query statement representes to derive all fields of table1 table.
Step S604, the data that obtain deriving from source database execution inquiry SOL statement write data file; This concrete step is in database, to carry out select*fromtable1; Query results is left in the data file with data file table1.txt name by name, and each bar recorded and stored of result set is delegation's content of data file.
Step S605, the data file of obtaining is write compressed file, be about to the table1.txt data file and put into compressed file test.zip.
Step S606, system carry out and judge whether to exist next query configuration item; Owing to can comprise one or more query configuration item in the tabulation of query configuration item; If first query configuration item as first statement, then can be judged whether to exist next bar statement, promptly whether have second query configuration item; Continue execution in step S607 if exist, otherwise the derivation of end data database data operation.
Handle the second statement, obtain Data Filename table2.txt and query statement select field2, field3 from table2.Said query statement representes to derive the field2 of table2 table, field3 field.
Step S607 obtains second query configuration item, and execution in step S603 is to step S605, until there not being the work that next bar Statement Completion is accomplished derives.
Can handle second query configuration item after the step S607; Promptly carry out select field2 at database; Field3 from table2; Query Result is left in the data file with Data Filename table2.txt name, can the table2.txt data file be put into compressed file test.zip afterwards, system finishing is derived operation after successfully preserving.
Obtaining data file according to the query configuration item in the query configuration file in the above-mentioned preferred embodiment can comprise: obtain query configuration item in the query configuration file; Be used for obtaining result set from database according to the query statement of said query configuration item; Said result set is kept in the data file with said Data Filename name.
Preferably, the embodiment of the invention is obtained the query configuration item tabulation in the query configuration file, and the tabulation of query configuration item comprises that one or more query configuration items comprise: all the query configuration items in the tabulation of query configuration item are obtained in repeating query; The circular treatment module is used for a plurality of query terms that the query configuration file is obtained in repeating query; A query configuration item is obtained in repeating query each time, and each query configuration item comprises Data Filename and the query statement of preserving derived data, carries out query statement and result set is kept in the data file of said Data Filename by name.This method has improved the importing database data function development efficient of system.
From above description; Can find out; The present invention has realized following technique effect: the query configuration item through changing in the query configuration file can be set the data that need derivation and import, and can dispose needs the table of deriving or importing, the field that need derive or import; Can satisfy the different demands that imports and exports through configuration, simplify importing and exporting operation, reduce programmer's work load, can the different demand that imports and exports of Rapid Realization, the changes in demand that imports and exports of reply improves the whole development efficiency of software fast.
Need to prove; Can in computer system, carry out in the step shown in the process flow diagram of accompanying drawing such as a set of computer-executable instructions; And; Though logical order has been shown in process flow diagram, in some cases, can have carried out step shown or that describe with the order that is different from here.
Obviously, it is apparent to those skilled in the art that above-mentioned each module of the present invention or each step can realize with the general calculation device; They can concentrate on the single calculation element; Perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element; Thereby; Can they be stored in the memory storage and carry out, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize by calculation element.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is merely the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (13)

1. the method that database data imports is characterized in that, comprising:
Obtain the query configuration item tabulation in the query configuration file, said query configuration item tabulation comprises that one or more said query configuration items, each query configuration item comprise Data Filename and the query statement of preserving the importing data;
Carry out the query statement in the said query configuration item, and the import statement of generation and said query statement coupling;
According to said import statement data file is imported database.
2. the method that database data according to claim 1 imports is characterized in that, carries out the query statement in the said query configuration item, and the import statement of generation and said query statement coupling comprises:
Inquire about in said database according to said query statement and to obtain the tabulation of table name and field name;
Generate the corresponding said import statement of said query statement according to said table name and the tabulation of said field name.
3. the method that database data according to claim 2 imports; It is characterized in that; Before according to said import statement data file being imported database, said method also comprises: said data file is kept in the compressed file, is kept in the said compressed file after perhaps encrypting.
4. the method that imports according to each described database data among the claim 1-3 is characterized in that, said query configuration file is manual creation or passes through the program generation.
5. the method that database data is derived is characterized in that,
Obtain the query configuration item tabulation in the query configuration file, said query configuration item tabulation comprises one or more said query configuration items, and each query configuration item comprises Data Filename and the query statement of preserving derived data;
Carry out the said query statement in the said query configuration item, obtaining the result set in the database, and said result set is kept in the data file.
6. the method that database data according to claim 5 is derived is characterized in that, after being kept at said result set in the data file, data file is compressed or is encrypted the back and compress and be kept in the specified compression file.
7. the method that derives according to each described database data among the claim 5-6; It is characterized in that; Obtain the query configuration item tabulation in the said query configuration file; Said query configuration item tabulation comprises one or more said query configuration items, and each query configuration item comprises Data Filename and the query statement of preserving derived data, comprising:
All the said query configuration items in the said query configuration item tabulation are obtained in repeating query;
A said query configuration item is obtained in repeating query each time, and each query configuration item comprises said Data Filename and the said query statement of preserving derived data, carries out said query statement and said result set is kept in the said data file.
8. the device that database data imports is characterized in that, comprising:
Acquisition module, the query configuration item tabulation that is used for obtaining the query configuration file, said query configuration item tabulation comprises that one or more said query configuration items, each query configuration item comprise Data Filename and the query statement of preserving the importing data;
Processing module is used for carrying out the said query statement of said query configuration item, and the import statement of generation and said query statement coupling;
The data importing module is used for according to said import statement data file being imported database.
9. the device that database data according to claim 8 imports is characterized in that said processing module comprises:
Enquiry module is used for obtaining table name and field name tabulation according to said query statement in said database inquiry;
Generation module is used for generating the corresponding said import statement of said query statement according to said table name and the tabulation of said field name.
10. the device that database data is derived is characterized in that,
Acquisition module, the query configuration item tabulation that is used for obtaining the query configuration file, said query configuration item tabulation comprises one or more said query configuration items, each query configuration item comprises Data Filename and the query statement of preserving derived data;
Data derive module, are used for carrying out the said query statement of said query configuration item, obtaining the result set in the database, and said result set are kept in the data file.
11. the device that database data according to claim 10 is derived is characterized in that said device also comprises: preserve module, be used for data file is compressed or encrypted the back and compress and be kept at the specified compression file.
12. the device according to each described database data among the claim 10-11 is derived is characterized in that said acquisition module comprises:
The circular treatment module; Be used for repeating query and obtain all said query configuration items of said query configuration item tabulation; A query configuration item is obtained in repeating query each time; Each query configuration item comprises said Data Filename and the said query statement of preserving derived data, carries out said query statement and result set is kept in the said data file.
13. the device of a database data importing/derivation is characterized in that, comprising:
The device that each described database data imports among the claim 8-9, and,
The device that each described database data is derived among the claim 10-12.
CN2010105276787A 2010-10-27 2010-10-27 Methods and devices for importing/exporting database data Pending CN102456051A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105276787A CN102456051A (en) 2010-10-27 2010-10-27 Methods and devices for importing/exporting database data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105276787A CN102456051A (en) 2010-10-27 2010-10-27 Methods and devices for importing/exporting database data

Publications (1)

Publication Number Publication Date
CN102456051A true CN102456051A (en) 2012-05-16

Family

ID=46039248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105276787A Pending CN102456051A (en) 2010-10-27 2010-10-27 Methods and devices for importing/exporting database data

Country Status (1)

Country Link
CN (1) CN102456051A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750384A (en) * 2012-06-28 2012-10-24 用友软件股份有限公司 Device and method for acquiring data from multidatabase engine
CN102982096A (en) * 2012-11-02 2013-03-20 曙光云计算技术有限公司 Data processing method of cloud computing system
CN103092993A (en) * 2013-02-18 2013-05-08 五八同城信息技术有限公司 Data exporting method and data exporting device
CN103309945A (en) * 2013-05-15 2013-09-18 上海证券交易所 Device for importing data to database
CN105701251A (en) * 2016-03-04 2016-06-22 浪潮通用软件有限公司 Data export and import method based on object definition
CN105740443A (en) * 2016-02-01 2016-07-06 深圳市盛弘电气股份有限公司 Android database-based data management method and device
CN107247782A (en) * 2017-06-14 2017-10-13 广州智萃电子科技有限公司 A kind of intelligent guiding system based on user configuring
CN110597862A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Data entry method, equipment and system based on information system
CN110795387A (en) * 2019-09-26 2020-02-14 广州市玄武无线科技股份有限公司 Data import method, data export device and data processing system
CN111427849A (en) * 2020-02-27 2020-07-17 深圳壹账通智能科技有限公司 Data processing method, electronic device and storage medium
CN112380583A (en) * 2021-01-11 2021-02-19 北京拓课网络科技有限公司 Online education platform configuration item processing method and device and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101067814A (en) * 2007-05-10 2007-11-07 浪潮集团山东通用软件有限公司 Mapping conversion method between data access level Xml format data and relational data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邵秀丽 等: "《基于XML的异构数据源间数据交换的实现研究》", 《南开大学学报(自然科学版)》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750384A (en) * 2012-06-28 2012-10-24 用友软件股份有限公司 Device and method for acquiring data from multidatabase engine
CN102982096A (en) * 2012-11-02 2013-03-20 曙光云计算技术有限公司 Data processing method of cloud computing system
CN102982096B (en) * 2012-11-02 2016-07-06 曙光云计算技术有限公司 The data processing method of cloud computing system
CN103092993B (en) * 2013-02-18 2016-07-06 五八同城信息技术有限公司 Data export method and device
CN103092993A (en) * 2013-02-18 2013-05-08 五八同城信息技术有限公司 Data exporting method and data exporting device
CN103309945A (en) * 2013-05-15 2013-09-18 上海证券交易所 Device for importing data to database
CN105740443A (en) * 2016-02-01 2016-07-06 深圳市盛弘电气股份有限公司 Android database-based data management method and device
CN105701251A (en) * 2016-03-04 2016-06-22 浪潮通用软件有限公司 Data export and import method based on object definition
CN107247782A (en) * 2017-06-14 2017-10-13 广州智萃电子科技有限公司 A kind of intelligent guiding system based on user configuring
CN110597862A (en) * 2019-09-20 2019-12-20 中国银行股份有限公司 Data entry method, equipment and system based on information system
CN110795387A (en) * 2019-09-26 2020-02-14 广州市玄武无线科技股份有限公司 Data import method, data export device and data processing system
CN111427849A (en) * 2020-02-27 2020-07-17 深圳壹账通智能科技有限公司 Data processing method, electronic device and storage medium
CN112380583A (en) * 2021-01-11 2021-02-19 北京拓课网络科技有限公司 Online education platform configuration item processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN102456051A (en) Methods and devices for importing/exporting database data
US11475034B2 (en) Schemaless to relational representation conversion
US10521427B2 (en) Managing data queries
US10545981B2 (en) Virtual repository management
US6085189A (en) Database system and method for supporting current of cursor updates and deletes from a select query from one or more updatable tables in single node and MPP environments
CN102929878B (en) A kind of databases comparison management method and device
US7487174B2 (en) Method for storing text annotations with associated type information in a structured data store
US9298829B2 (en) Performing a function on rows of data determined from transitive relationships between columns
Polyzotis et al. Selectivity estimation for XML twigs
US8924373B2 (en) Query plans with parameter markers in place of object identifiers
CN104572122A (en) Software application data generating device and method
CN105144080A (en) System for metadata management
CN103714058A (en) Database query optimization
Choi et al. A database synchronization algorithm for mobile devices
WO2009120172A1 (en) Semantic relational database
US8200668B2 (en) Scalar representation for a logical group of columns in relational databases
CN107766396A (en) resource data management method and device
KR101801865B1 (en) Method for transporting relational data
CN110717073B (en) System and method for realizing flow query processing by combining business data in cloud flow platform
Niu et al. Interoperability for Provenance-aware Databases using {PROV} and {JSON}
KR20190005578A (en) Systemt and method of managing distributed database based on inmemory
Papastefanatos et al. Rule-based Management of Schema Changes at ETL sources
US20180329979A1 (en) Delegating resembling data of an organization to a linked device
CN108241624A (en) The generation method and device of a kind of query script
Shershakov Multi-perspective process mining with embedding configurations into DB-based event logs

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20120516