CN103995908A - Method and device for importing data - Google Patents

Method and device for importing data Download PDF

Info

Publication number
CN103995908A
CN103995908A CN201410271211.9A CN201410271211A CN103995908A CN 103995908 A CN103995908 A CN 103995908A CN 201410271211 A CN201410271211 A CN 201410271211A CN 103995908 A CN103995908 A CN 103995908A
Authority
CN
China
Prior art keywords
template
data
imported
target
field
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
CN201410271211.9A
Other languages
Chinese (zh)
Inventor
周光辉
黄亮
田明涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CVIC Software Engineering Co Ltd
Original Assignee
CVIC Software Engineering 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 CVIC Software Engineering Co Ltd filed Critical CVIC Software Engineering Co Ltd
Priority to CN201410271211.9A priority Critical patent/CN103995908A/en
Publication of CN103995908A publication Critical patent/CN103995908A/en
Pending legal-status Critical Current

Links

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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a method and device for importing data. A template table is built in advance, a plurality of templates are included in the template table, when target data need to be imported into a target data table in a database, a target template corresponding to the target data is determined in the template table, a to-be-imported table corresponding to the target template is generated, the to-be-imported table is filled with the target data, and then the to-be-imported table filled with the target data is imported into the target data table. Due to the fact that fields included in the target template are subsets of fields included in the target data table corresponding to the target template, column headers in the generated to-be-imported table are identical to the fields in the target template, that is, the column headers in the to-be-imported table are the subsets of the fields of the target data table, the to-be-imported table is imported into the target data table, and therefore the target data can be imported into the target database.

Description

A kind of data lead-in method and device
Technical field
The present invention relates to database technical field, more particularly, relate to a kind of data lead-in method and device.
Background technology
In computer application field, database, with certain data structure organization, storage and management data.Particularly, in database, set up and have a plurality of tables of data, in tables of data, include field and data two parts content.Wherein, field is mainly used in showing that the type of service of data is (certain, in tables of data, also may include the field that some Database Systems generates automatically, as identification field etc., but it is mainly for deal with data quickly and easily, do not include real business datum, not within the scope of discussion of the present invention).
Database includes a plurality of tables of data, and the field information of each tables of data is incomplete same.At present, need a kind of data lead-in method, in various tables of data, import business datum.
Summary of the invention
In view of this, the invention provides a kind of data lead-in method and device, to realize in various tables of data, import business datum.The technical scheme that the application provides is as follows:
A data lead-in method, comprising:
In the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determine the To Template corresponding with described target data; Wherein, comprise a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately;
Generate the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template;
According to the row head in described table to be imported, in described table to be imported, insert described target data;
The described table to be imported that is filled with target data is directed into described target matrix.
Said method, preferably, described in the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determine that the To Template corresponding with described target data comprises:
In the time target data need to being imported to the target matrix in database, obtain the template identification of user's input;
In the template table of setting up in advance, search the template corresponding with described template identification;
When finding, the template finding is defined as to To Template.
Said method, preferably, is describedly directed into described target matrix by the described table to be imported that is filled with target data and comprises:
Whether the row head being filled with described in judgement in the table to be imported of target data is identical with the field in described target matrix;
If so, the target data of filling in described table to be imported is directed into described target matrix.
Said method, preferably, also comprises:
When the row head in the described table to be imported that is filled with target data is not identical with the field in described target matrix, prompting error message.
Said method, preferably, is filled with row head in the table to be imported of target data and whether identical comprising of field in described target matrix described in described judgement:
By first-born one-tenth the first data acquisition of row in the described table to be imported that is filled with target data;
Field in described definite To Template is generated to the second data acquisition;
Judge that whether described the first data acquisition is identical with described the second data acquisition.
The application also provides a kind of data importing device, comprising:
Template determining unit, in the time target data need to being imported to the target matrix of database, in the template table of setting up in advance, determines the To Template corresponding with described target data; Wherein, include a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately;
Form generation unit, for generating the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template;
Form filler cells for the row head according to described table to be imported, is inserted described target data in described table to be imported;
Data importing unit, for being directed into described target matrix by the described table to be imported that is filled with target data.
Said apparatus, preferably, described template determining unit comprises:
Sign is obtained subelement, in the time target data need to being imported to the target matrix of database, obtains the template identification of user's input;
Template is searched subelement, for the template table setting up in advance, searches the template corresponding with described template identification; When finding, trigger template and determine subelement;
Template is determined subelement, for the template finding is defined as to To Template.
Said apparatus, preferably, described data importing unit comprises:
Whether a row judgment sub-unit is identical with the field in described target matrix for being filled with the row head of table to be imported of target data described in judging; If so, trigger data imports subelement;
Data importing subelement, is directed into described target matrix for the target data that described table to be imported is filled.
Said apparatus, preferably, described data importing unit also comprises:
Miscue subelement, for when described in be filled with the row head of table to be imported of target data when not identical with field in described target matrix, prompting error message.
Said apparatus, preferably, a described row judgment sub-unit comprises:
The first set generates subelement, for by described first-born one-tenth the first data acquisition of row that is filled with the table to be imported of target data;
The second set generates subelement, for the field of described definite To Template is generated to the second data acquisition;
Judgment sub-unit, for judging that whether described the first data acquisition is identical with described the second data acquisition.
From above-mentioned technical scheme, can find out, the present invention has following beneficial effect:
The application provides a kind of data lead-in method and device, in the method, set up and have template table in advance, in described template table, comprise a plurality of templates, in the time target data need to being imported to the target matrix in database, in template table, determine the To Template corresponding with target data, and generate the to be imported table corresponding with this To Template, in described table to be imported, insert described target data, and then the described table to be imported that is filled with target data is directed into described target matrix.Due to, each template in default template table has corresponding tables of data, and the subset that the field comprising in template comprises field for this template corresponding data table, therefore, the field that To Template comprises is the subset that target matrix that To Template is corresponding comprises field.In addition, because the row head in the table to be imported generating is identical with the field in To Template, that is to say, the row head in table to be imported is the subset of target matrix field, described table to be imported is imported to target matrix, thereby realized, target data is directed into target database.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, to the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow diagram of the disclosed data lead-in method of the embodiment of the present invention;
Fig. 2 is the process flow diagram of disclosed another data lead-in method of the embodiment of the present invention;
Fig. 3 is the process flow diagram of the disclosed another data lead-in method of the embodiment of the present invention;
Fig. 4 is the structural representation of the disclosed data importing device of the embodiment of the present invention;
Fig. 5 is the structural representation of disclosed another data importing device of the embodiment of the present invention;
Fig. 6 is the structural representation of the disclosed another data importing device of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
Referring to Fig. 1, it shows the flow process of a kind of data lead-in method embodiment that the application provides, and the method specifically comprises:
Step 101: in the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determine the To Template corresponding with described target data; Wherein, comprise a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately.
Wherein, target data is data to be imported.Tables of data in the equal correspondence database of each template, described correspondence can be each template corresponding different tables of data separately, can be also the corresponding same tables of data of a plurality of templates.It should be noted that, tables of data can have a plurality of templates corresponding, but each template corresponding tables of data only, and like this, the target data of inserting could unique being directed in a tables of data, and there will not be importing abnormal conditions.In addition, the corresponding of template and tables of data is default corresponding relation, and corresponding mode can be that template identification identifies identical with tables of data.
It should be noted that, in template, comprise at least one field, and the subset of the field that each template comprises for comprising field in each self-corresponding tables of data, therefore, the field that To Template comprises is the subset that comprises field in the target matrix that To Template is corresponding, that is to say, in To Template, do not include target matrix other fields in addition.
For example, the field comprising in target matrix is organization names, Institution Code, mechanism place, the pay taxes amount of money and the deduction and exemption amount of money, the field comprising in To Template can be for any one or more in organization names, Institution Code, mechanism place, the pay taxes amount of money and the deduction and exemption amount of money five fields, but can not include the field beyond described five fields.
Step 102: generate the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template.
Wherein, the table described to be imported of generation includes row head, and each row head is that each field in To Template generates, and that is to say, the row head in table to be imported is identical with the field in To Template, describedly identically comprises that number is identical, also comprises that content is identical.For example, the field comprising in To Template is organization names, Institution Code, mechanism place and the amount of money of paying taxes, and the field in table to be imported is similarly 4, is similarly organization names, Institution Code, mechanism place and the amount of money of paying taxes.
Wherein, described table to be imported can be Excel form.
Step 103: according to the row head in described table to be imported, insert described target data in described table to be imported.
Wherein, download the table described to be imported generating, in described table to be imported, only include row head, need in described table to be imported, insert the data corresponding with being listed as head.For example, row head, for organization names and the amount of money of paying taxes, needs to insert corresponding business datum in described To Template table.The mode of inserting can, by directly input of user, can be also the data acquisition from having generated, to obtain data to insert.
Step 104: the described table to be imported that is filled with target data is directed into described target matrix.
Wherein, include multiple tables of data in described database, certain tables of data that need to import data is target matrix.The data importing interface function in calling data storehouse, is directed into the target data of filling in described table to be imported in target matrix.It should be noted that, table sign to be imported is corresponding with the sign of To Template, and the sign of To Template is corresponding with the sign of target matrix, therefore, table to be imported correctly can be directed into corresponding target matrix.In addition, because the row head in described table to be imported is the subset of the field in described target matrix, the lower target data of filling of each row head directly can be directed under the respective field of target matrix, and there will not be the chaotic situation that imports.
From above technical scheme, the present embodiment provides a kind of data lead-in method, because each template in default template table has corresponding tables of data, and the subset that the field comprising in template comprises field for this template corresponding data table, therefore the field that, To Template comprises is the subset that target matrix comprises field.In addition, because the row head in the table to be imported generating is identical with the field in To Template, that is to say, row head in table to be imported is the subset of target matrix field, target data is filled out under the respective column head of table to be imported, and described table to be imported is imported to target matrix, thereby realized, target data is directed into target database.
It should be noted that, in database, the field of each tables of data is incomplete same, the target data that need to be directed in this tables of data is incomplete same, the method that the present embodiment provides is that target data is determined corresponding To Template, is embodied as the tables of data that field is different and imports the needed data of each tables of data.
Alternatively, said method embodiment can be applied in tax data business scope, now the application process of described business scope is illustrated:
The Local Tax Bureau of province districts and cities need to gather the tax data of this each department of districts and cities, and districts and cities are different, and the data that the Local Tax Bureau of these districts and cities gathers are also not quite similar, and the data that each districts and cities need to be gathered deposit the tables of data in database in.For example, the data that A city need to be gathered comprise organization names, Institution Code and the amount of money of paying the fees, and the data that B city gathers comprise organization names, the pay the fees amount of money and the deduction and exemption amount of tax to be paid.
Set up and have template in advance, each template data that corresponding each districts and cities need to gather respectively, particularly, the data that the field Wei Gai districts and cities in template need to gather, each template unification is stored in a template table, the field information of each template comprising in this template table.When certain districts and cities need to be gathered data importing tables of data time, first in this template table, search corresponding template.For example, the data importing that A city need to be gathered during to tables of data, is determined A To Template a corresponding to city in template table, and the field information in this To Template a is organization names, Institution Code and the amount of money of paying the fees.
According to this template, generate table to be imported, as Excel form, in described table to be imported, row head is identical with the field of To Template.For example, To Template is above-mentioned To Template a, and the table to be imported of generation is E_a, and the row head in table to be imported is organization names, Institution Code and the amount of money of paying the fees.In described table to be imported, insert the data that corresponding districts and cities gather, and this table to be imported is directed into target matrix, thereby the data importing that realizes the collection of Jiang Gai provinces and cities is to tables of data.
Referring to Fig. 2, it shows the flow process of a kind of another embodiment of data lead-in method that the application provides, and the method specifically comprises:
Step 201: in the time target data need to being imported to the target matrix in database, obtain the template identification of user's input.
Wherein, obtain template identification and can be, by user, inputted or user selects in generating in advance a plurality of template identification.It should be noted that, a plurality of template identification that generate are in advance signs of each template in template table, and each template identification is corresponding with a template.
Step 202: in the template table of setting up in advance, search the template corresponding with described template identification; When finding, execution step 203.
Step 203: the template finding is defined as to To Template.
Step 204: generate the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template.
Step 205: according to the row head in described table to be imported, insert described target data in described table to be imported.
Step 206: the described table to be imported that is filled with target data is directed into described target matrix.
Wherein, step 204 and step 206 are identical with step 102 and step 104 in said method embodiment, at this, do not repeat.
From above technical scheme, the present embodiment can find corresponding To Template by template identification.
It should be noted that, in said method embodiment, when not finding the template corresponding with described template identification, prompting error message.
Referring to Fig. 3, it shows the flow process of the another embodiment of a kind of data lead-in method that the application provides, and the method specifically comprises:
Step 301: in the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determine the To Template corresponding with described target data; Wherein, comprise a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately.
Step 302: generate the to be imported table corresponding with described To Template.
Step 303: according to the row head in described table to be imported, insert described target data in described table to be imported.
Step 304: whether the row head being filled with described in judgement in the table to be imported of target data is identical with the field in described target matrix; If so, perform step 305.
It should be noted that, in step 303 when inserting data in described table to be imported, if by the mode of user's hand input-data, may cause the row head in described table to be imported to change, while importing data to target matrix, row head in table to be imported is not corresponding with the field in target matrix, there is importing mistake, therefore, need to before importing data, to being filled with the table to be imported of data, judge, judge that whether whether the row head in this table to be imported identical with the field in target matrix, when identical, the importing process in execution step 305.
For example, the row head comprising in definite To Template from template table is: organization names and the amount of money of paying taxes, but described in be filled with the row head that comprises in the table to be imported of data except organization names and pay the fees the amount of money, also include organization names, can not normally carry out data importing process.
Step 305: by the data importing of filling in described To Template table to described target matrix.
Wherein, step 301 and step 303 are identical with step 101 and step 103 in said method embodiment respectively, at this, do not repeat.
Preferably, said method embodiment can also comprise: when the row head in the described table to be imported that is filled with target data is not identical with the field in described target matrix, and prompting error message.
It should be noted that, the field comprising in definite To Template from template table be with target matrix in field there is corresponding relation, be that field in To Template is the subset of target matrix field, therefore, whether the row head being filled with in the table to be imported of target data described in judgement in the step 304 in said method embodiment is identical with the field in described target matrix, can realize by being filled with the mode whether row head in the table to be imported of target data is identical with field in To Template definite in template table described in judging, specific implementation comprises:
By first-born one-tenth the first data acquisition of row in the described table to be imported that is filled with target data; Field in described definite To Template is generated to the second data acquisition;
Judge that whether described the first data acquisition is identical with described the second data acquisition.
Wherein, alternatively, described the first data acquisition and described the second data acquisition can be two chained lists, are respectively the first chained list and the second chained list.Row head in the described table to be imported that is filled with target data is kept in described the first chained list, the field in To Template definite in template table is kept in described the second chained list, the data in described two chained lists are compared.It should be noted that, describedly identically both comprised that number was identical, also comprise that the content of each data is also identical.
For example, the row head that in template table, definite To Template comprises is: organization names, Institution Code and mechanism place, being filled with the row head comprising in the To Template of target data is organization names, Institution Code, mechanism place and the amount of money of paying the fees, organization names, Institution Code and mechanism place three item numbers certificates are saved in the first chained list, and organization names, Institution Code, mechanism place and the amount of money four item numbers certificates of paying the fees are saved in the second chained list, judge that whether the data in described the first chained list and the second chained list are identical.
It should be noted that, in said method embodiment, the target data of filling in described table to be imported can also be kept in described the first chained list, when comparison result is identical, directly the target data of preserving in described the first chained list be directed in described target matrix.
Referring to Fig. 4, the structural representation of the embodiment of a kind of data importing device that it provides for the application, this device specifically comprises: template determining unit 401, form generation unit 402, form filler cells 403 and data importing unit 404.Wherein:
Described template determining unit 401, in the time target data need to being imported to the target matrix of database, in the template table of setting up in advance, determines the To Template corresponding with described target data; Wherein, comprise a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately.
Wherein, target data is data to be imported.Tables of data in the equal correspondence database of each template, described correspondence can be each template corresponding different tables of data separately, can be also the corresponding same tables of data of a plurality of templates.It should be noted that, tables of data can have a plurality of templates corresponding, but each template corresponding tables of data only, and like this, the target data of inserting could unique being directed in a tables of data, and there will not be importing abnormal conditions.In addition, the corresponding of template and tables of data is default corresponding relation, and corresponding mode can be that template identification identifies identical with tables of data.
It should be noted that, in template, comprise at least one field, and the subset of the field that each template comprises for comprising field in each self-corresponding tables of data, therefore, the field that To Template comprises is the subset that comprises field in the target matrix that To Template is corresponding, that is to say, in To Template, do not include target matrix other fields in addition.
For example, the field comprising in target matrix is organization names, Institution Code, mechanism place, the pay taxes amount of money and the deduction and exemption amount of money, the field comprising in To Template can be for any one or more in organization names, Institution Code, mechanism place, the pay taxes amount of money and the deduction and exemption amount of money five fields, but can not include the field beyond described five fields.
Described form generation unit 402, for generating the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template.
Wherein, the table described to be imported that described form generation unit 402 generates includes row head, and each row head is that each field in To Template generates, that is to say, row head in table to be imported is identical with the field in To Template, describedly identically comprises that number is identical, also comprises that content is identical.For example, the field comprising in To Template is organization names, Institution Code, mechanism place and the amount of money of paying taxes, and the field in table to be imported is similarly 4, is similarly organization names, Institution Code, mechanism place and the amount of money of paying taxes.
Wherein, described table to be imported can be Excel form.
Described form filler cells 403 for the row head according to described table to be imported, is inserted described target data in described table to be imported.
Wherein, download the table described to be imported generating, in described table to be imported, only include row head, described form filler cells 403 need to be inserted the data corresponding with being listed as head in described table to be imported.For example, row head, for organization names and the amount of money of paying taxes, needs to insert corresponding business datum in described To Template table.The mode of inserting can, by directly input of user, can be also the data acquisition from having generated, to obtain data to insert.
Described data importing unit 404, for being directed into described target matrix by the described table to be imported that is filled with target data.
Wherein, include multiple tables of data in described database, certain tables of data that need to import data is target matrix.The data importing interface function in 404 calling data storehouses, described data importing unit, is directed into the target data of filling in described table to be imported in target matrix.It should be noted that, table sign to be imported is corresponding with the sign of To Template, and the sign of To Template is corresponding with the sign of target matrix, therefore, table to be imported correctly can be directed into corresponding target matrix.In addition, because the row head in described table to be imported is the subset of the field in described target matrix, the lower target data of filling of each row head directly can be directed under the respective field of target matrix, and there will not be the chaotic situation that imports.
From above technical scheme, the present embodiment provides a kind of data importing device, because each template in default template table has corresponding tables of data, and the subset that the field comprising in template comprises field for this template corresponding data table, therefore the field that, To Template comprises is the subset that target matrix comprises field.In addition, because the row head in the table to be imported generating is identical with the field in To Template, that is to say, row head in table to be imported is the subset of target matrix field, target data is filled out under the respective column head of table to be imported, and described table to be imported is imported to target matrix, thereby realized, target data is directed into target database.
It should be noted that, in database, the field of each tables of data is incomplete same, the target data that need to be directed in this tables of data is incomplete same, the method that the present embodiment provides is that target data is determined corresponding To Template, is embodied as the tables of data that field is different and imports the needed data of each tables of data.
Referring to Fig. 5, the structural representation of a kind of data importing device embodiment bis-that it provides for the application, this device specifically comprises: sign obtains that subelement 4011, template are searched subelement 4012, template is determined subelement 4013, form generation unit 402, data stuffing unit 403 and data importing unit 404.Wherein, the template determining unit 401 in said apparatus embodiment can be by comprising following subelement, particularly:
Described sign is obtained subelement 4011, in the time target data need to being imported to the target matrix of database, obtains the template identification of user's input.
Described template is searched subelement 4012, for the template table setting up in advance, searches the template corresponding with described template identification; When finding, trigger template and determine subelement 4013.
Described template is determined subelement 4013, for the template finding is defined as to To Template.
It should be noted that, in the present embodiment, the explanation of unit 4011 to 4013, refers to said method embodiment bis-.In addition, 402Ji unit, unit 404 is identical with the 402Ji unit 404, unit in said apparatus embodiment, at this, does not repeat.
It should be noted that, said apparatus embodiment can also comprise and search miscue unit, for when not finding the template corresponding with described template identification, and prompting error message.
Referring to Fig. 6, it shows the structural representation of the another embodiment of a kind of data importing device that the application provides, and this device specifically comprises: template determining unit 401, form generation unit 402, form filler cells 403, a row judgment sub-unit 4041 and data importing subelement 4042.Wherein, the data importing unit 404 in said apparatus embodiment can be realized by following subelement, particularly:
Whether a described row judgment sub-unit 4041 is identical with the field in described target matrix for being filled with the row head of table to be imported of target data described in judging; If so, trigger data imports subelement;
Described data importing subelement 4042, is directed into described target matrix for the target data that described table to be imported is filled.
It should be noted that, in the present embodiment, the explanation of unit 4041 to 4042, refers to said method embodiment tri-.In addition, 401Ji unit, unit 403 is identical with the 401Ji unit 403, unit in said apparatus embodiment, at this, does not repeat.
Preferably, said apparatus embodiment can also comprise miscue unit, for when described in be filled with the row head of table to be imported of target data when not identical with field in described target matrix, prompting error message.
Alternatively, the row judgment sub-unit 4041 in said apparatus embodiment comprises:
The first set generates subelement, for by described first-born one-tenth the first data acquisition of row that is filled with the table to be imported of target data;
The second set generates subelement, for the field of described definite To Template is generated to the second data acquisition;
Judgment sub-unit, for judging that whether described the first data acquisition is identical with described the second data acquisition.
Wherein, alternatively, described the first data acquisition and described the second data acquisition can be two chained lists, are respectively the first chained list and the second chained list.The first set generates subelement the row head in the described table to be imported that is filled with target data is kept in described the first chained list, the second set generates subelement the field in To Template definite in template table is kept in described the second chained list, and judgment sub-unit is compared the data in described two chained lists.
It should be noted that, in said apparatus embodiment, the first set generates subelement and the target data in described table to be imported can also be kept in described the first chained list, when comparison result is identical, directly the target data in described the first chained list is directed in described target matrix.
Above-mentioned explanation to the disclosed embodiments, makes professional and technical personnel in the field can realize or use the present invention.To the multiple modification of these embodiment, will be apparent for those skilled in the art, General Principle as defined herein can be in the situation that do not depart from the spirit or scope of the embodiment of the present invention, realization in other embodiments.Therefore, the embodiment of the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (10)

1. a data lead-in method, is characterized in that, comprising:
In the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determine the To Template corresponding with described target data; Wherein, comprise a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately;
Generate the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template;
According to the row head in described table to be imported, in described table to be imported, insert described target data;
The described table to be imported that is filled with target data is directed into described target matrix.
2. method according to claim 1, is characterized in that, described in the time target data need to being imported to the target matrix in database, in the template table of setting up in advance, determines that the To Template corresponding with described target data comprises:
In the time target data need to being imported to the target matrix in database, obtain the template identification of user's input;
In the template table of setting up in advance, search the template corresponding with described template identification;
When finding, the template finding is defined as to To Template.
3. method according to claim 1, is characterized in that, describedly the described table to be imported that is filled with target data is directed into described target matrix comprises:
Whether the row head being filled with described in judgement in the table to be imported of target data is identical with the field in described target matrix;
If so, the target data of filling in described table to be imported is directed into described target matrix.
4. method according to claim 3, is characterized in that, also comprises:
When the row head in the described table to be imported that is filled with target data is not identical with the field in described target matrix, prompting error message.
5. method according to claim 3, is characterized in that, is filled with row head in the table to be imported of target data and whether identical comprising of field in described target matrix described in described judgement:
By first-born one-tenth the first data acquisition of row in the described table to be imported that is filled with target data;
Field in described definite To Template is generated to the second data acquisition;
Judge that whether described the first data acquisition is identical with described the second data acquisition.
6. a data importing device, is characterized in that, comprising:
Template determining unit, in the time target data need to being imported to the target matrix of database, in the template table of setting up in advance, determines the To Template corresponding with described target data; Wherein, include a plurality of templates in described template table, each template all has corresponding tables of data, and the field that each template comprises is the subset that corresponding data table comprises field separately;
Form generation unit, for generating the to be imported table corresponding with described To Template; Wherein, the row head in described table to be imported is identical with the field in described To Template;
Form filler cells for the row head according to described table to be imported, is inserted described target data in described table to be imported;
Data importing unit, for being directed into described target matrix by the described table to be imported that is filled with target data.
7. device according to claim 6, is characterized in that, described template determining unit comprises:
Sign is obtained subelement, in the time target data need to being imported to the target matrix of database, obtains the template identification of user's input;
Template is searched subelement, for the template table setting up in advance, searches the template corresponding with described template identification; When finding, trigger template and determine subelement;
Template is determined subelement, for the template finding is defined as to To Template.
8. device according to claim 6, is characterized in that, described data importing unit comprises:
Whether a row judgment sub-unit is identical with the field in described target matrix for being filled with the row head of table to be imported of target data described in judging; If so, trigger data imports subelement;
Data importing subelement, is directed into described target matrix for the target data that described table to be imported is filled.
9. device according to claim 8, is characterized in that, described data importing unit also comprises:
Miscue subelement, for when described in be filled with the row head of table to be imported of target data when not identical with field in described target matrix, prompting error message.
10. device according to claim 8, is characterized in that, a described row judgment sub-unit comprises:
The first set generates subelement, for by described first-born one-tenth the first data acquisition of row that is filled with the table to be imported of target data;
The second set generates subelement, for the field of described definite To Template is generated to the second data acquisition;
Judgment sub-unit, for judging that whether described the first data acquisition is identical with described the second data acquisition.
CN201410271211.9A 2014-06-17 2014-06-17 Method and device for importing data Pending CN103995908A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410271211.9A CN103995908A (en) 2014-06-17 2014-06-17 Method and device for importing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410271211.9A CN103995908A (en) 2014-06-17 2014-06-17 Method and device for importing data

Publications (1)

Publication Number Publication Date
CN103995908A true CN103995908A (en) 2014-08-20

Family

ID=51310073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410271211.9A Pending CN103995908A (en) 2014-06-17 2014-06-17 Method and device for importing data

Country Status (1)

Country Link
CN (1) CN103995908A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104317974A (en) * 2014-11-21 2015-01-28 武汉理工大学 Reconfigurable multi-source data importing method in ERP system
CN105653525A (en) * 2014-11-10 2016-06-08 金蝶软件(中国)有限公司 Data importing method and system between data set
CN105718453A (en) * 2014-12-01 2016-06-29 金蝶软件(中国)有限公司 Data importing method and system
CN105824940A (en) * 2016-03-17 2016-08-03 深圳市永兴元科技有限公司 Method and device for importing data
CN106874484A (en) * 2017-02-20 2017-06-20 济南浪潮高新科技投资发展有限公司 The method and device that a kind of data are imported
CN106897434A (en) * 2017-02-27 2017-06-27 济南浪潮高新科技投资发展有限公司 A kind of data lead-in method, apparatus and system
CN107247767A (en) * 2017-06-05 2017-10-13 山东浪潮通软信息科技有限公司 A kind of method and device that database is imported by formatted data files
CN107870979A (en) * 2017-09-30 2018-04-03 平安科技(深圳)有限公司 Electronic installation, extract tables of data data method and storage medium
CN108763341A (en) * 2018-05-14 2018-11-06 中国平安人寿保险股份有限公司 Electronic device, automatic Building table method and storage medium
CN109241074A (en) * 2018-09-28 2019-01-18 中国平安财产保险股份有限公司 Check data automatic processing method, device, computer equipment and storage medium
CN109726244A (en) * 2019-01-29 2019-05-07 北京中电普华信息技术有限公司 Data lead-in method and device
WO2019109518A1 (en) * 2017-12-08 2019-06-13 平安科技(深圳)有限公司 Data list uploading method and terminal thereof
CN109886623A (en) * 2019-01-30 2019-06-14 美林数据技术股份有限公司 The group packet processing method and device of product data
CN110019226A (en) * 2017-12-22 2019-07-16 杭州海康威视数字技术股份有限公司 A kind of introduction method and device of database file
CN112836478A (en) * 2020-11-09 2021-05-25 上海德拓信息技术股份有限公司 Scattered data acquisition and application method
CN117349359A (en) * 2023-12-06 2024-01-05 成都数据集团股份有限公司 Multi-source heterogeneous database import and export method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849108B1 (en) * 2007-03-13 2010-12-07 Fundriver, Inc. Methods and systems for establishing a database
CN102841784A (en) * 2011-06-24 2012-12-26 镇江华扬信息科技有限公司 Method for dynamically importing Excel data into database
CN103020089A (en) * 2011-09-27 2013-04-03 深圳市金蝶友商电子商务服务有限公司 Method and device for importing data in EXCEL file to database
CN103246651A (en) * 2012-02-02 2013-08-14 金蝶软件(中国)有限公司 Method and system for data inputting
CN103744982A (en) * 2014-01-15 2014-04-23 北京神州普惠科技股份有限公司 Method for importing Excel data into database

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7849108B1 (en) * 2007-03-13 2010-12-07 Fundriver, Inc. Methods and systems for establishing a database
CN102841784A (en) * 2011-06-24 2012-12-26 镇江华扬信息科技有限公司 Method for dynamically importing Excel data into database
CN103020089A (en) * 2011-09-27 2013-04-03 深圳市金蝶友商电子商务服务有限公司 Method and device for importing data in EXCEL file to database
CN103246651A (en) * 2012-02-02 2013-08-14 金蝶软件(中国)有限公司 Method and system for data inputting
CN103744982A (en) * 2014-01-15 2014-04-23 北京神州普惠科技股份有限公司 Method for importing Excel data into database

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HAPPY664618843: ""将Excel中多个sheet的数据导入到SQLSERVER中"", 《HTTP://BLOG.CSDN.NET/HAPPY664618843/ARTICLE/DETAILS/5689478》 *
吴名月: "《文魁系列图书 Access 2002数据库管理实务》", 28 February 2002 *
朴春慧 等: ""高校教师管理系统开发中的若干关键技术研究"", 《计算机工程与设计》 *
贾振华: "《SQL Server数据库及应用 第2版》", 30 November 2012 *

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105653525A (en) * 2014-11-10 2016-06-08 金蝶软件(中国)有限公司 Data importing method and system between data set
CN105653525B (en) * 2014-11-10 2020-04-10 金蝶软件(中国)有限公司 Method and system for importing data between account sets
CN104317974B (en) * 2014-11-21 2017-07-11 武汉理工大学 Multi-source data introduction method in a kind of ERP system of restructural
CN104317974A (en) * 2014-11-21 2015-01-28 武汉理工大学 Reconfigurable multi-source data importing method in ERP system
CN105718453A (en) * 2014-12-01 2016-06-29 金蝶软件(中国)有限公司 Data importing method and system
CN105718453B (en) * 2014-12-01 2019-07-09 金蝶软件(中国)有限公司 The method and system that data import
CN105824940A (en) * 2016-03-17 2016-08-03 深圳市永兴元科技有限公司 Method and device for importing data
CN106874484A (en) * 2017-02-20 2017-06-20 济南浪潮高新科技投资发展有限公司 The method and device that a kind of data are imported
CN106897434A (en) * 2017-02-27 2017-06-27 济南浪潮高新科技投资发展有限公司 A kind of data lead-in method, apparatus and system
CN107247767A (en) * 2017-06-05 2017-10-13 山东浪潮通软信息科技有限公司 A kind of method and device that database is imported by formatted data files
CN107870979A (en) * 2017-09-30 2018-04-03 平安科技(深圳)有限公司 Electronic installation, extract tables of data data method and storage medium
WO2019109518A1 (en) * 2017-12-08 2019-06-13 平安科技(深圳)有限公司 Data list uploading method and terminal thereof
CN110019226A (en) * 2017-12-22 2019-07-16 杭州海康威视数字技术股份有限公司 A kind of introduction method and device of database file
CN108763341A (en) * 2018-05-14 2018-11-06 中国平安人寿保险股份有限公司 Electronic device, automatic Building table method and storage medium
CN109241074A (en) * 2018-09-28 2019-01-18 中国平安财产保险股份有限公司 Check data automatic processing method, device, computer equipment and storage medium
CN109241074B (en) * 2018-09-28 2023-09-26 中国平安财产保险股份有限公司 Automatic auditing data processing method and device, computer equipment and storage medium
CN109726244A (en) * 2019-01-29 2019-05-07 北京中电普华信息技术有限公司 Data lead-in method and device
CN109886623A (en) * 2019-01-30 2019-06-14 美林数据技术股份有限公司 The group packet processing method and device of product data
CN112836478A (en) * 2020-11-09 2021-05-25 上海德拓信息技术股份有限公司 Scattered data acquisition and application method
CN117349359A (en) * 2023-12-06 2024-01-05 成都数据集团股份有限公司 Multi-source heterogeneous database import and export method and system
CN117349359B (en) * 2023-12-06 2024-02-20 成都数据集团股份有限公司 Multi-source heterogeneous database import and export method and system

Similar Documents

Publication Publication Date Title
CN103995908A (en) Method and device for importing data
CN109034809B (en) Block chain generation method and device, block chain node and storage medium
CN103984735B (en) Method and device for generating recommended delivery place name
CN107203424A (en) A kind of method and apparatus that deep learning operation is dispatched in distributed type assemblies
AU2015347304B2 (en) Testing insecure computing environments using random data sets generated from characterizations of real data sets
TW201741906A (en) Page resource delivery method and apparatus
CN107748752B (en) Data processing method and device
CN107730196A (en) Project scheduling management method and terminal device
CN104021219B (en) The generation method and device of a kind of data template
CN103902702A (en) Data storage system and data storage method
CN105989059A (en) Data record checking method and device
US20200074509A1 (en) Business data promotion method, device, terminal and computer-readable storage medium
CN104767761B (en) A kind of cloud storage platform access control method and device
CN103793349A (en) Data processing method and data processing device
CN106599291B (en) Data grouping method and device
CN107766519B (en) Method for visually configuring data structure
CN110275938A (en) Knowledge extraction method and system based on non-structured document
CN110019234A (en) Method and system for fragment storing data
WO2020201830A1 (en) Systems and methods for generating, monitoring, and analyzing event networks from event data
CN110597789A (en) Automatic generation method, device and equipment of architecture diagram and computer readable storage medium
CN106777276A (en) The method and apparatus of index storage and the displaying of primary information of user profile
CN104808896A (en) Data processing method and system
CN102663045B (en) Method and system for processing data information
CN112667696A (en) Data processing method, device and storage medium
CN111191057A (en) User-defined retrieval method and device, electronic equipment and storage medium thereof

Legal Events

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

Application publication date: 20140820