CN107330014A - The creation method and equipment of a kind of tables of data - Google Patents

The creation method and equipment of a kind of tables of data Download PDF

Info

Publication number
CN107330014A
CN107330014A CN201710453541.3A CN201710453541A CN107330014A CN 107330014 A CN107330014 A CN 107330014A CN 201710453541 A CN201710453541 A CN 201710453541A CN 107330014 A CN107330014 A CN 107330014A
Authority
CN
China
Prior art keywords
data
field
tables
class
keyword
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.)
Granted
Application number
CN201710453541.3A
Other languages
Chinese (zh)
Other versions
CN107330014B (en
Inventor
张磊
张文明
陈少杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Internet Service Co ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201710453541.3A priority Critical patent/CN107330014B/en
Publication of CN107330014A publication Critical patent/CN107330014A/en
Application granted granted Critical
Publication of CN107330014B publication Critical patent/CN107330014B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

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)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to technical field of data processing, there is provided a kind of creation method of tables of data and equipment.Methods described includes:Set up tables of data and create related data environment;Related data information based on the data environment and tables of data yet to be built, acquisition tables of data, which is automatically created, realizes logic;Automatically created based on the tables of data and realize logic, automatically create tables of data.The creation method and equipment for a kind of tables of data that the present invention is provided, automatically create internal logic by defining tables of data relevant field intersection and tables of data, realize automatically creating for tables of data, can effectively improve the efficiency of software development and the possibility of reduction error.

Description

The creation method and equipment of a kind of tables of data
Technical field
The present invention relates to technical field of data processing, more particularly, to the creation method and equipment of a kind of tables of data.
Background technology
It is often required to use database in software development process, usually requires to create data during using database Table.In Android development process, tables of data is created by using the creat sentences in sqlite.Tradition is used Sqlite sentences create the process of tables of data, are pure character string human-edited's processes, this crosses range request developer's energy Enough artificial memory all related command characters and type character, have certain requirement to the memory of developer;Simultaneously Using pure manual edit mode, editing speed is slow, and efficiency is low.
Furthermore, it desired to character string bracket and all align such as separator of editor, and can not occur the unnecessary of symbol and Missing, the problem of being otherwise likely to occur system crash in program operation process.Reality is needed when carrying out character string human-edited Want developer that bracket and separator etc. manually align, easily mistake occur during alignment, especially when creating Tables of data it is longer when, it is easy to there are many symbols or few one the problem of meet etc., and then system may be caused Collapse.
The content of the invention
In order to overcome above mentioned problem or solve the above problems at least in part, the present invention provides a kind of establishment of tables of data Method and apparatus, to improve the applicability of system and the efficiency of software development, and the possibility that reduction malfunctions.
On the one hand, the present invention provides a kind of creation method of tables of data, including:Set up tables of data and create related data ring Border;Related data information based on the data environment and tables of data yet to be built, acquisition tables of data, which is automatically created, realizes logic;It is based on The tables of data, which is automatically created, realizes logic, automatically creates tables of data.
Wherein, it is described to set up the step of tables of data creates related data environment and specifically include:Closed based on table handling correlation Key word, builds table handling keyword class;It is overall based on system data type, build data type keyword class;Based on table structure In data structure, build field class.
Wherein, the related data information based on the data environment and tables of data yet to be built, obtains tables of data and creates automatically The step of realizing logic is built to further comprise:Based on the related data information of the tables of data yet to be built, by described in recursive call Data type keyword class and field constructed fuction, build set of fields;By calling the table in the table handling keyword class Create keyword, log-on data table automatically generating program;Based on the set of fields, by iterative algorithm by the set of fields In field information write the tables of data yet to be built.
Wherein, the data structure in the structure based on table, the step of building field class further comprises:Create field Class, and field type variable and field name variable defined in the field class, and field type set function, field name Claim to set function, field type to obtain function and field name acquisition function.
Wherein, the related data information based on the tables of data yet to be built, is closed by data type described in recursive call Key word class and field constructed fuction, the step of building set of fields further comprise:From first phase of the tables of data yet to be built Close data message to start, by calling the field type of the field class to set function, corresponding field type is set, by adjusting Function is set with the field name of the field class, corresponding field name is set, and by the field type and the field The title correspondence write-in set of fields, until the corresponding field type of last described related data information and field name It is written into the set of fields.
Wherein, it is described to be based on the set of fields, the field information in the set of fields is write by iterative algorithm The step of tables of data yet to be built, further comprises:Since the first character section of the set of fields, the word is successively read Field information in Duan Jihe, until last field information reads completion in the set of fields;From first of reading The field information starts, and the field information of reading is write into the tables of data yet to be built successively, until described in last Field information is written into the tables of data yet to be built.
Wherein, it is described be successively read in the set of fields field information the step of further comprise:Pass sequentially through tune Function is obtained with the field type of the field class, the field type information of the field is obtained, passes sequentially through and call the word The field name of section class obtains function, obtains the field name information of the field.
Wherein, described overall based on system data type, the step of building data type keyword class further comprises:Wound Data type keyword class is built, and according to data type related keyword in system, it is fixed in the data type keyword class Adopted data type keyword strings constant.
Wherein, described to be based on table handling related keyword, the step of building table handling keyword class further comprises:Create Table handling keyword class, and according to table handling related keyword in system, the table handling defined in the table handling keyword class Keyword strings constant, the table handling keyword strings constant at least includes table and creates keyword strings.
On the other hand, the present invention provides a kind of establishment equipment of tables of data, including:At least one memory, at least one Processor, communication interface and bus;The memory, the processor and the communication interface complete mutual by the bus Between communication, the communication interface be used for it is described establishment equipment and external input device between information transfer;The memory In be stored with the computer program that can be run on the processor, realized during the computing device described program as described above Tables of data creation method.
The creation method and equipment for a kind of tables of data that the present invention is provided, by defining tables of data relevant field intersection sum Internal logic is automatically created according to table, automatically creating for tables of data is realized, enables developer's basis during establishment table Prompt message selects keyword, and developer only needs the data type and title of focused data to consider string format etc. Problem, can effectively improve the speed of tables of data establishment, improve software development efficiency, while reducing the possibility of error.
Brief description of the drawings
Fig. 1 is a kind of creation method flow chart of tables of data of the embodiment of the present invention;
Fig. 2 is that a kind of tables of data of the embodiment of the present invention automatically creates the obtaining step flow chart for realizing logic;
Fig. 3 is a kind of process chart that tables of data is generated by set of fields of the embodiment of the present invention;
Fig. 4 is a kind of structured flowchart of the establishment equipment of tables of data of the embodiment of the present invention.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached in the embodiment of the present invention Figure, the technical scheme in the present invention is clearly and completely described, it is clear that described embodiment is one of the present invention Divide embodiment, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not making The every other embodiment obtained on the premise of creative work, belongs to the scope of protection of the invention.
As the one side of the embodiment of the present invention, the present embodiment provides a kind of creation method of tables of data, with reference to Fig. 1, For a kind of creation method flow chart of tables of data of the embodiment of the present invention, including:
S1, sets up tables of data and creates related data environment;S2 is related to tables of data yet to be built based on the data environment Data message, acquisition tables of data, which is automatically created, realizes logic;S3, is automatically created based on the tables of data and realizes logic, automatic wound Build tables of data.
For step S1, specifically, before programming and data application is carried out, it is necessary first to which data are determined Justice, then data are called on the basis of data definition.The embodiment of the present invention will finally realize the establishment of tables of data, therefore First the data of correlation are created to tables of data and operation is defined, that is, built tables of data and create related data environment.
It is wherein optional, it is described to set up the step of tables of data creates related data environment and specifically include:Based on table handling Related keyword, builds table handling keyword class;It is overall based on system data type, build data type keyword class;It is based on Data structure in table structure, builds field class.
Wherein, system data type is overall:The total data type that system includes.By taking Android development systems as an example, All data types that as sqlite includes.
Specifically, what is deposited in database is that to deposit in multiple tables of data, each data list structure is multiple Field, each field again by a data type and data name group into.It is different due to there is numerous types of data in system Data type is to that should have different string representations, when carrying out manual compiling, it is desirable to which developer can remember all data Type character string, there are certain requirements to developer's memory, while being manually entered character string, take time and effort, efficiency is low.
Therefore, developer can be made when carrying out tables of data establishment, it is only necessary to adjust by building data type keyword class It is the optional corresponding character string of data type keyword needed with the data type keyword class.
When building data type keyword class, it is desirable at least tables of data is created in the data type keyword class The total data type used is defined.
In one embodiment, described overall based on system data type, the step of building data type keyword class is entered One step includes:Data type keyword class is created, and according to data type related keyword in system, is closed in the data type Data type keyword strings constant defined in key word class.
Specifically, by taking Android development systems as an example, the problem of in order to solve data type keyword, constant is built Class B.In constant class B, all data types included according to sqlite in system define the constant of multiple character string types (such as character string type text, integer type integer etc.), and all constants are defined as static constant (static Final) type.Such B is the data type set of keywords of structure, subsequently during use, can be directly invoked B, system will provide all constant promptings inside class B, and the data type keyword correspondence needed may be selected in developer Character string.
A kind of creation method of tables of data provided in an embodiment of the present invention, by building data type keyword class, makes out Hair personnel need to only call the keyword class when carrying out data type editor, and the data type according to needed for prompting selection is crucial The corresponding character string of word, can be the problem of effectively settlement procedure person needs to remember mass data storehouse data type, can be great Improve development efficiency.
In another embodiment, described to be based on table handling related keyword, the step of building table handling keyword class is entered One step includes:Table handling keyword class is created, and according to table handling related keyword in system, in the table handling keyword class Defined in table handling keyword strings constant, the table handling keyword strings constant at least include table create keyword word Symbol string.
Specifically, with above-described embodiment similarly, for table handling related keyword, in order that developer is entering line number When being created according to table, keyword can be created according to prompting selection table, keyword strings be created without being manually entered table, to keep away Exempt from developer and forget the keyword strings or due to a variety of causes input error, build constant class A.In constant class A, The constant of a character string type is at least defined, the constant value of the character string type is the table establishment keyword character in sqlite String, and all constants are all defined as static constant (static final) type.
Especially by sentence public static final String CREATE=" CREATE " (its in sqlite In create be table table create keyword) define table create keyword., can be by sqlite by this definition mode Table create keyword definition into constant class A, A is table handling keyword class.
Furthermore it is also possible to which the destruction for being related to table in sqlite, additions and deletions and changing are looked into etc. into operation related keyword all Definition is come in, and such A is table handling set of keywords, subsequently during use, can directly invoke class A, when calling A When system can provide all constants promptings inside class A, developer can create keyword strings according to prompting selection table. In this way, just solving the problem of table creates the prompting of keyword in database.
A kind of creation method of tables of data provided in an embodiment of the present invention, by building table handling keyword class, makes exploitation Personnel are carrying out only calling the table handling keyword class when tables of data creates editor, and create keyword according to prompting selection table Character string, can greatly improve the problem of effectively settlement procedure person needs to remember mass data storehouse data type Development efficiency.
In yet another embodiment, the data structure in the structure based on table, the step of building field class is further wrapped Include:Field class is created, and field type variable and field name variable defined in the field class, and field type are set Function, field name set function, field type to obtain function and field name acquisition function.
Specifically, what is deposited in database is that to deposit in multiple tables of data, each data list structure is multiple words Section, each field is made up of a data type parameters and a data name parameter.Based on above-mentioned analysis, the present embodiment Stress the design to the information description of a field in database.
Field type be need in the crucial type of a comparison for creating tables of data, tables of data foundation step by from this Corresponding field type and field name information are taken out in type.Therefore, field class DatabaseBean, wherein class are designed DatabaseBean is mainly used in depositing the relevant information of field, in order to deposit the type information of field, in DatabaseBean Defined in a String type variable dbType, i.e. field type variable;In order to deposit the name information of field, definition is another The variable dbName of an outer String type, i.e. field name variable.So just there are two variables in class DatabaseBean The type and title of difference corresponding field information.
Define after field type variable and field name variable, in addition it is also necessary to design field type in class DatabaseBean With the external storage and the interface of acquisition of title.It is outside for convenience to obtain the type and title in field information, respectively Design getDbType functions and getDbName functions, i.e. field type and obtain function and field name acquisition function, for obtaining Take relevant information.The type and title of external storage field, separately design setDbType functions and setDbName for convenience Function, i.e. field type set function and field name to set function, for setting the relevant information of field.GetXXX therein Function realizes the value information for returning to field, and setXXX functions are realized carries out assignment to the value in field.
A kind of creation method of tables of data provided in an embodiment of the present invention, by building field class, is realized in tables of data The encapsulation of field information, and acquisition and the storage function of field information are encapsulated, facility can be provided for the operation for field, Be conducive to improving development efficiency, reduction error probability.
Related data information based on the data environment and tables of data yet to be built, acquisition tables of data automatically creates realization and patrolled Volume;
For step S2 specifically, after above-mentioned steps obtain the data environment that tables of data is created, basis is also needed to treat Build tables of data relevant information, and automatically created through certain tables of data create-rule, i.e. tables of data and realize logic, could realize from It is dynamic to create tables of data.The related data information of tables of data yet to be built is the foundation for creating tables of data, according to these relevant informations, by this Development environment language and logic generation tables of data.
Wherein optional, the related data information based on the data environment and tables of data yet to be built obtains tables of data Automatically create and realize that the further step of logic refers to Fig. 2, be that a kind of tables of data of the embodiment of the present invention automatically creates and realizes logic Obtaining step flow chart, including:
S21, based on the related data information of the tables of data yet to be built, passes through data type keyword class described in recursive call With field constructed fuction, set of fields is built.
Specifically, comprising multiple fields in a usual tables of data, the corresponding related data information of each field, Each related data information can be represented by a field type information and a field name information in tables of data.Multiple correlations The corresponding multiple field informations of data message constitute a set of fields.
Before progress tables of data is automatically created, the corresponding field of each related data information need to be arranged, that is, needed Build set of fields.Therefore, by obtaining each related data information, corresponding field is constructed by field constructed fuction, , it is necessary to be configured to the field type information of field during construction field, it therefore, it can by calling above-mentioned steps to obtain The data type keyword class taken selects corresponding data type keyword strings.
That is, for any related data information, by calling field constructed fuction to construct corresponding field, and in field structure By calling data type keyword class to select corresponding data type keyword in making, data are set by obtaining user's input Type.After the field construction complete, using identical make, the word of response is constructed to next related data information Section, so circulation are carried out, until field all construction completes of all related data informations, the then collection of all fields composition constructed It is set of fields to close.
In one embodiment, the related data information based on the tables of data yet to be built, by described in recursive call Data type keyword class and field constructed fuction, the step of building set of fields further comprise:From the tables of data yet to be built First related data information start, by calling the field type of the field class to set function, corresponding field is set Type, by calling the field name of the field class to set function, sets corresponding field name, and by the field type Write-in corresponding with the field name set of fields, until the corresponding field type of last described related data information The set of fields is written into field name.
Specifically, the process of traditional establishment tables of data is pure hand-coding sqlite sentences to complete, and is so had Many defects, the method that the present embodiment creates tables of data has abandoned drawbacks described above.According to above-described embodiment, it is known that field is logical Cross what class DatabaseBean was described, a field information can be so represented by class DatabaseBean.
, can be by calling field constructed fuction to construct field after field class is constructed according to above-described embodiment.Examine Consider needs and field is constructed to all related data informations, therefore since first related data information, sequential configuration correspondence Field, to avoid errors and omissions.
Therefore, since first related data information of tables of data yet to be built, the corresponding number of the related data information is obtained According to type information and data name information, and according to the corresponding data type information of the related data information, constructed by field The field type of function call field class sets function, realizes to field type variation amplitude in respective field, that is, sets correspondence Field type;According to the corresponding data name information of the related data information, field class is called by field constructed fuction Field name sets function, realizes to field name variation amplitude in respective field, that is, sets corresponding field name, will construct The field write-in set of fields of completion.
After the corresponding field construction complete of first related data information, be transferred to second related data information, by with The corresponding field identical make of first related data information, the corresponding field of second related data information of construction, And the field of construction complete is write into set of fields.So circulate each related data information construction pair to tables of data yet to be built The field answered, and write set of fields successively, until the corresponding field of all related data informations all construction completes and writing word Duan Jihe.
The object X of a DatabaseBean type can be specifically created by DatabaseBean constructed fuction, Then call setDbType therein and setDbName to object X to store the type and title of the field.Wherein field Type carry out prompting acquisition by the B classes designed in above-described embodiment, the title of field needs to be write according to user's input The character string of one String type, can so obtain the object X of a field information.
It is exactly multiple field informations nothing but in one table, can so defines a set list and come in special stored table Field information.For devising a class DatabaseBean in description above-described embodiment of a field information, therefore can be with All field informations in one table are all stored in set list, all data in wherein list are all DatabaseBean types, all field informations in table yet to be built are just encapsulated in List.
S22, by calling the table in the table handling keyword class to create keyword, journey is automatically generated with log-on data table Sequence.
Specifically, when progress tables of data is automatically created, system need to first recognize table and create mark, i.e. table establishment is crucial Word, could log-on data table visioning procedure.Therefore automatically created in tables of data and realize and need in logic addition table to create keyword. Due to having been defined for table handling keyword class in above-mentioned steps, wherein just containing table creates keyword, therefore by adjusting With table handling keyword class, you can according to system suggestion, table therein is selected to create keyword.
S23, based on the set of fields, will be treated by iterative algorithm described in the field information write-in in the set of fields Build tables of data.
Specifically, the related data information pair of all tables of data yet to be built is stored in the set of fields that above-mentioned steps are obtained The field answered.After tables of data automatically creates program startup, only all fields in set of fields need to be write tables of data yet to be built Automatically creating for tables of data can be achieved.For all fields in data acquisition system, since first character section, it is successively read every One field information, and field information correspondence is write into tables of data yet to be built.
It is wherein optional, it is described to be based on the set of fields, the field in the set of fields is believed by iterative algorithm The further step of the breath write-in tables of data yet to be built refers to Fig. 3, is that one kind of the embodiment of the present invention generates data by set of fields The process chart of table, including:
S231, since the first character section of the set of fields, is successively read the field information in the set of fields, Until last field information reads completion in the set of fields.
In one embodiment, it is described be successively read in the set of fields field information the step of further comprise: Pass sequentially through and call the field type of the field class to obtain function, obtain the field type information of the field, pass sequentially through Call the field name of the field class to obtain function, obtain the field name information of the field.
Specifically, according to above-described embodiment, set of fields list can be obtained, there are all fields pair in list As, it is necessary to read all data in list during tables of data is automatically created.Therefore the side circulated first by for Formula obtains the DatabaseBean object E in list set successively, then obtains field type and field name in field E. Especially by calling the getDbType functions and getDbName functions of field class to complete field type and field name in field E The acquisition of title.
S232, since first field information of reading, successively writes the field information of reading described Tables of data yet to be built, until last described field information is written into the tables of data yet to be built.
Specifically, it is necessary to which all information correspondence is write after the field information during above-mentioned steps read set of fields Enter tables of data yet to be built.Specifically since the first character segment information of reading, the form that is circulated by for will be got successively Field type and field name are filled in into tables of data yet to be built, until all field type informations and field name information that obtain are complete Portion writes tables of data yet to be built, and completion table, which is created, realizes that logic is built.
For example, to create in a table name referred to as testable, table comprising four field elements, the field class of four fields Type and field name are respectively:Integer/aa, text/bb, integer/cc and integer/dd tables of data, can be by as follows Code is realized.
Create table testable(integer aa,text bb,integer cc,integer dd);
Wherein, the character string before the comma in bracket is described field type and field name.
The creation method of a kind of tables of data provided in an embodiment of the present invention, by defining tables of data relevant field intersection sum Internal logic is automatically created according to table, solving tradition establishment tables of data can not point out and need each field information of manual maintenance The defects such as position, can just complete the wound of whole tables of data only by list list of the transmission with Lax entropy Process is built, the probability for becoming efficiency He reducing error is greatly improved.
As the other side of the embodiment of the present invention, the present embodiment provides a kind of establishment equipment of tables of data, with reference to figure 4, it is a kind of structured flowchart of the establishment equipment of tables of data of the embodiment of the present invention, including:At least one memory 1, at least one Processor 2, communication interface 3 and bus 4.
Wherein, memory 1, processor 2 and communication interface 3 complete mutual communication by bus 4, and communication interface 3 is used Information transfer between the establishment equipment and external input device;It is stored with what can be run on processor 2 in memory 1 Computer program, processor 2 realizes the creation method of the tables of data as described in above-mentioned embodiment when performing described program.
There is provided a kind of non-transient computer readable storage medium storing program for executing in another embodiment of the present invention, the non-transient calculating Machine readable storage medium storing program for executing stores computer instruction, and the computer instruction makes the computer perform as described in above-mentioned embodiment The creation method of tables of data.
Specifically, it can be understood as, realizing all or part of step of above method embodiment can be referred to by program Related hardware is made to complete, foregoing program can be stored in a computer read/write memory medium, the program is being performed When, the step of execution includes above method embodiment;And foregoing storage medium includes:ROM, RAM, magnetic disc or CD etc. are each Planting can be with the medium of store program codes.
The embodiment of the establishment equipment of tables of data described above is only schematical, wherein being said as separating component Bright unit can be or may not be physically separate, can both be located at place, or can also be distributed to On heterogeneous networks unit.Some or all of module therein can be selected to realize this embodiment scheme according to actual needs Purpose.Those of ordinary skill in the art are not in the case where paying performing creative labour, you can to understand and implement.
By the description of embodiment of above, those skilled in the art it will be clearly understood that each embodiment can be borrowed Software is helped to add the mode of required general hardware platform to realize, naturally it is also possible to pass through hardware.Understood based on such, it is above-mentioned The part that technical scheme substantially contributes to prior art in other words can be embodied in the form of software product, the meter Calculation machine software product can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disc, CD, including some fingers Order, to cause a computer equipment (such as personal computer, server, or network equipment etc.) to perform each above-mentioned implementation Method described in some parts of example or embodiment.
A kind of establishment equipment of tables of data provided in an embodiment of the present invention and a kind of non-transient intelligent body readable storage medium storing program for executing, Tables of data relevant field intersection is defined by user and tables of data automatically creates internal logic, automatically creating for tables of data is realized, The speed of tables of data establishment and the efficiency of software development can be effectively improved, while reducing the possibility of error.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should be understood:It still can be right Technical scheme described in foregoing embodiments is modified, or carries out equivalent substitution to which part technical characteristic;And this A little modifications are replaced, and the essence of appropriate technical solution is departed from the spirit and model of various embodiments of the present invention technical scheme Enclose.

Claims (10)

1. a kind of creation method of tables of data, it is characterised in that including:
Set up tables of data and create related data environment;
Related data information based on the data environment and tables of data yet to be built, acquisition tables of data, which is automatically created, realizes logic;
Automatically created based on the tables of data and realize logic, automatically create tables of data.
2. according to the method described in claim 1, it is characterised in that described to set up the step that tables of data creates related data environment Suddenly specifically include:
Based on table handling related keyword, table handling keyword class is built;It is overall based on system data type, build data type Keyword class;Based on the data structure in table structure, field class is built.
3. method according to claim 2, it is characterised in that the phase based on the data environment and tables of data yet to be built Data message is closed, acquisition tables of data automatically creates the step of realizing logic and further comprised:
Based on the related data information of the tables of data yet to be built, pass through data type keyword class described in recursive call and field structure Function is made, set of fields is built;
By calling the table in the table handling keyword class to create keyword, log-on data table automatically generating program;
Based on the set of fields, the field information in the set of fields is write by the data yet to be built by iterative algorithm Table.
4. method according to claim 3, it is characterised in that the data structure in the structure based on table, builds field The step of class, further comprises:
Field class is created, and field type variable and field name variable defined in the field class, and field type are set Putting function, field name sets function, field type to obtain function and field name acquisition function.
5. method according to claim 4, it is characterised in that the dependency number based on the tables of data yet to be built it is believed that Breath, by data type keyword class described in recursive call and field constructed fuction, the step of building set of fields is further wrapped Include:
Since first related data information of the tables of data yet to be built, by calling the field type of the field class to set Function, sets corresponding field type, by calling the field name of the field class to set function, sets corresponding field name Claim, and by the field type write-in set of fields corresponding with the field name, until last described dependency number It is believed that ceasing corresponding field type and field name is written into the set of fields.
6. method according to claim 4, it is characterised in that described to be based on the set of fields, will by iterative algorithm The step of field information in the set of fields writes the tables of data yet to be built further comprises:
Since the first character section of the set of fields, the field information in the set of fields is successively read, until described The field information of last in set of fields, which is read, to be completed;
Since first field information of reading, the field information of reading is write into the data yet to be built successively Table, until last described field information is written into the tables of data yet to be built.
7. method according to claim 6, it is characterised in that the field information being successively read in the set of fields The step of further comprise:
Pass sequentially through and call the field type of the field class to obtain function, obtain the field type information of the field, successively By calling the field name of the field class to obtain function, the field name information of the field is obtained.
8. method according to claim 2, it is characterised in that described overall based on system data type, builds data class The step of type keyword class, further comprises:
Data type keyword class is created, and according to data type related keyword in system, in the data type keyword Data type keyword strings constant defined in class.
9. method according to claim 2, it is characterised in that described to be based on table handling related keyword, builds table handling The step of keyword class, further comprises:
Table handling keyword class is created, and according to table handling related keyword in system, it is fixed in the table handling keyword class Adopted table handling keyword strings constant, the table handling keyword strings constant at least includes table and creates keyword character String.
10. a kind of establishment equipment of tables of data, it is characterised in that including:It is at least one memory, at least one processor, logical Believe interface and bus;
The memory, the processor and the communication interface complete mutual communication, the communication by the bus The information transfer that interface is used between the establishment equipment and external input device;
Be stored with the computer program that can be run on the processor in the memory, the computing device described program In Shi Shixian such as claim 1 to 9 it is any as described in method.
CN201710453541.3A 2017-06-15 2017-06-15 Data table creating method and device Active CN107330014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710453541.3A CN107330014B (en) 2017-06-15 2017-06-15 Data table creating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710453541.3A CN107330014B (en) 2017-06-15 2017-06-15 Data table creating method and device

Publications (2)

Publication Number Publication Date
CN107330014A true CN107330014A (en) 2017-11-07
CN107330014B CN107330014B (en) 2021-04-09

Family

ID=60195458

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710453541.3A Active CN107330014B (en) 2017-06-15 2017-06-15 Data table creating method and device

Country Status (1)

Country Link
CN (1) CN107330014B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376152A (en) * 2018-09-13 2019-02-22 广州帷策智能科技有限公司 Big data system file data preparation method and system
CN109922131A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Date storage method, device, equipment and storage medium based on block chain
CN110109894A (en) * 2019-03-22 2019-08-09 新奥特(北京)视频技术有限公司 Implementation method, device, storage medium and the equipment of non-relational database
CN111198711A (en) * 2020-01-13 2020-05-26 陕西心像信息科技有限公司 Collection version control method and system based on MongoDB
CN111813777A (en) * 2020-07-02 2020-10-23 上海微亿智造科技有限公司 Method and system for OLAP to automatically create and write MQ data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291583A (en) * 1990-12-14 1994-03-01 Racal-Datacom, Inc. Automatic storage of persistent ASN.1 objects in a relational schema
CN104834551A (en) * 2015-04-30 2015-08-12 南京工业大学 .NET code automatic generating method based on four-layer framework
CN106649457A (en) * 2016-09-26 2017-05-10 天津海量信息技术股份有限公司 Data processing frame based on object relation mapping technology

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5291583A (en) * 1990-12-14 1994-03-01 Racal-Datacom, Inc. Automatic storage of persistent ASN.1 objects in a relational schema
CN104834551A (en) * 2015-04-30 2015-08-12 南京工业大学 .NET code automatic generating method based on four-layer framework
CN106649457A (en) * 2016-09-26 2017-05-10 天津海量信息技术股份有限公司 Data processing frame based on object relation mapping technology

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
百度经验: "使用Navicat创建表并录入数据", 《百度经验》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376152A (en) * 2018-09-13 2019-02-22 广州帷策智能科技有限公司 Big data system file data preparation method and system
CN109922131A (en) * 2019-01-17 2019-06-21 平安城市建设科技(深圳)有限公司 Date storage method, device, equipment and storage medium based on block chain
CN110109894A (en) * 2019-03-22 2019-08-09 新奥特(北京)视频技术有限公司 Implementation method, device, storage medium and the equipment of non-relational database
CN111198711A (en) * 2020-01-13 2020-05-26 陕西心像信息科技有限公司 Collection version control method and system based on MongoDB
CN111813777A (en) * 2020-07-02 2020-10-23 上海微亿智造科技有限公司 Method and system for OLAP to automatically create and write MQ data
CN111813777B (en) * 2020-07-02 2021-04-06 上海微亿智造科技有限公司 Method and system for OLAP to automatically create and write MQ data

Also Published As

Publication number Publication date
CN107330014B (en) 2021-04-09

Similar Documents

Publication Publication Date Title
CN107330014A (en) The creation method and equipment of a kind of tables of data
US20140156282A1 (en) Method and system for controlling target applications based upon a natural language command string
CN105335412A (en) Method and device for data conversion and data migration
US9378458B2 (en) Method and apparatus for operating a finite state machine
CN106293664A (en) Code generating method and device
CN108334609B (en) Method, device, equipment and storage medium for realizing JSON format data access in Oracle
CN111249736B (en) Code processing method and device
CN108345511A (en) A kind of application data verification method, device and electronic equipment
CN108363566A (en) File configuration method, intelligent terminal and storage medium in a kind of project development process
CN107924326A (en) The moving method of updated type is covered
CN108170435A (en) A kind of source code conversion method, device and equipment
CN112199477A (en) Dialogue management scheme and dialogue management corpus construction method
CN110147431A (en) Key word matching method, device, computer equipment and storage medium
CN110045956A (en) Configuration method, device, equipment and the readable storage medium storing program for executing of component
CN103049494B (en) Method and device for storing table of extensible markup language (XML) file
JPH06290086A (en) Structure data processor
CN113535977A (en) Knowledge graph fusion method, device and equipment
CN107678741A (en) Implementation method, device, readable storage medium storing program for executing and the equipment of List View
CN116521181B (en) Script data processing method, device, equipment and medium based on game system
CN109669678A (en) Template engine integration method, device, electronic equipment and storage medium
CN115904480B (en) Code reconstruction method, device, electronic equipment and storage medium
CN104317590B (en) The method of embedded configuration system and embedded configuration audit flow
CN107092474A (en) Program developing method, ETL processing method and processing devices
CN109408057A (en) Method, apparatus, medium and the calculating equipment of automatic code generating
CN115422928A (en) Message generation method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20231110

Address after: Room 606-609, Compound Office Complex Building, No. 757, Dongfeng East Road, Yuexiu District, Guangzhou, Guangdong Province, 510699

Patentee after: China Southern Power Grid Internet Service Co.,Ltd.

Address before: 430000 Wuhan Donghu Development Zone, Wuhan, Hubei Province, No. 1 Software Park East Road 4.1 Phase B1 Building 11 Building

Patentee before: WUHAN DOUYU NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right