CN111241053B - Data table creating method, device, equipment and storage medium - Google Patents

Data table creating method, device, equipment and storage medium Download PDF

Info

Publication number
CN111241053B
CN111241053B CN201811441569.6A CN201811441569A CN111241053B CN 111241053 B CN111241053 B CN 111241053B CN 201811441569 A CN201811441569 A CN 201811441569A CN 111241053 B CN111241053 B CN 111241053B
Authority
CN
China
Prior art keywords
definition
data
statement
data table
tables
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.)
Active
Application number
CN201811441569.6A
Other languages
Chinese (zh)
Other versions
CN111241053A (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 Mobile Communications Group Co Ltd
China Mobile Group Sichuan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Sichuan 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 China Mobile Communications Group Co Ltd, China Mobile Group Sichuan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201811441569.6A priority Critical patent/CN111241053B/en
Publication of CN111241053A publication Critical patent/CN111241053A/en
Application granted granted Critical
Publication of CN111241053B publication Critical patent/CN111241053B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data table creating method, a data table creating device, data table creating equipment and a storage medium. The method comprises the following steps: obtaining attribute fields of the same type in a plurality of data tables to be created; defining a statement by using a data type definition statement and a table template, and generating a first definition statement aiming at an attribute field; generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences and the data type definition sentences; the first definition statement and the second definition statement are executed to create a plurality of data tables. The data table creating method, the data table creating device, the data table creating equipment and the storage medium can simultaneously create a plurality of data tables and improve the data table creating efficiency.

Description

Data table creating method, device, equipment and storage medium
Technical Field
The present invention relates to the field of database technologies, and in particular, to a method, an apparatus, a device, and a storage medium for creating a data table.
Background
Data Definition Language (DDL) is a Language in which Structured Query Language (SQL) Language is a set of languages responsible for Data structure Definition and database object Definition. The database objects include: tables, indices, views, charts, default values, rules, triggers, users, functions, and the like.
At present, when generating the DDL statement corresponding to the created table when creating the table, the DDL statement needs to be completed by a commercial database modeling tool or written by hand. Generating DDL statements corresponding to the creation table by using a commercial database modeling tool requires purchasing an expensive modeling tool; writing DDL scripts by hand is both error-prone and inconvenient to maintain. In addition, the create table statement in the DDL statement needs to be written and executed every time one data table is created, and the efficiency of creating the data table is low.
Disclosure of Invention
The embodiment of the invention provides a data table creating method, a data table creating device, data table creating equipment and a storage medium, and can improve the data table creating efficiency.
In one aspect, an embodiment of the present invention provides a method for creating a data table, where the method includes:
obtaining attribute fields of the same type in a plurality of data tables to be created;
defining a statement by using a data type definition statement and a table template, and generating a first definition statement aiming at an attribute field;
generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences and the data type definition sentences;
the first definition statement and the second definition statement are executed to create a plurality of data tables.
In an embodiment of the present invention, the method for creating a data table provided in the embodiment of the present invention further includes:
obtaining an incidence relation among a plurality of data tables;
generating a second definitional statement for different types of attribute fields in the plurality of data tables using the data table definitional statement and the data type definitional statement, including:
and generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships.
In an embodiment of the present invention, the method for creating a data table provided in the embodiment of the present invention further includes:
define data type definition statements, table template definition statements, and data table definition statements.
In an embodiment of the present invention, the method for creating a data table provided in the embodiment of the present invention further includes:
defining the association relation between tables to define the statement.
In another aspect, an embodiment of the present invention provides a data table creating apparatus, where the apparatus includes:
the first obtaining module is used for obtaining attribute fields of the same type in a plurality of data tables to be created;
the first generation module is used for generating a first definition statement aiming at the attribute field by utilizing the data type definition statement and the table template definition statement;
the second generation module is used for generating second definition sentences aiming at different types of attribute fields in the data tables by using the data table definition sentences and the data type definition sentences;
and the execution module is used for executing the first definition statement and the second definition statement to create a plurality of data tables.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention further includes:
the second obtaining module is used for obtaining the incidence relation among the data tables;
a second generation module, specifically configured to:
and generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention further includes:
the first definition module is used for defining data type definition sentences, table template definition sentences and data table definition sentences.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention further includes:
and the second definition module is used for defining the association relation definition sentences among the tables.
In another aspect, an embodiment of the present invention provides a data table creating device, where the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor implements the data table creation method provided by the embodiment of the invention when executing the computer program.
In another aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the data table creating method provided in the embodiment of the present invention.
The data table creating method, the data table creating device, the data table creating equipment and the storage medium can simultaneously create a plurality of data tables and improve the data table creating efficiency.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart diagram illustrating a data table creation method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a data table creation apparatus according to an embodiment of the present invention;
FIG. 3 sets forth a block diagram of an exemplary hardware architecture of computing devices capable of implementing the data table creation method and apparatus according to embodiments of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Fig. 1 is a flowchart illustrating a data table creating method according to an embodiment of the present invention. The data table creation method may include:
s101: attribute fields of the same type in a plurality of data tables to be created are obtained.
S102: and generating a first definition statement aiming at the attribute field of the same type by using the data type definition statement and the table template definition statement.
S103: a second definitional statement for different types of attribute fields in the plurality of data tables is generated using the data table definition statement and the data type definition statement.
S104: the first definition statement and the second definition statement are executed to create a plurality of data tables.
The standard DDL statement defines the table in SQL to have four main elements: table name, user to which the table belongs, attribute field of the table, and constraint.
The attribute field of the same type in the embodiment of the present invention refers to an attribute field in which the data type, the default value (also called default value), and the constraint condition are the same.
It is understood that the data type definition statement, the table template definition statement and the data table definition statement are defined before the first definition statement for the attribute field is generated by the data type definition statement and the table template definition statement and the second definition statement for the attribute field of different types in the plurality of data tables is generated by the data table definition statement and the data type definition statement.
Based on this, the method for creating a data table provided in the embodiment of the present invention may further include: define data type definition statements, table template definition statements, and data table definition statements.
In one embodiment of the invention, the data type definition statement may be defined by the following syntax:
type named_type type_define
type_define:
data_type[length][default{default_value}][required|optional|unique][key|index]
wherein type is used to define data type, namejtype represents the name of the defined data type, and type define is the type definition.
data _ type is a basic data type, including: character type, number type, date type, other types.
length is the length of namejtype.
default { default _ value } is used to set a default value for namejtype.
required is a mandatory option, corresponding to the not null field level constraint in the DDL.
optional is optional, corresponding to no constraints in the DDL, allowed to be null.
unique represents that the value of namejtype is unique, corresponding to the unique field level uniqueness constraint in DDL.
keys are primary keys, corresponding to primary key field level constraints in the DDL.
index is an index, corresponding to the creation of an index on a field in the DDL.
In one embodiment of the invention, the table template definition statement may be defined by the following syntax:
template template_name[(parameter[,parameter…])]
{[${parameter}_field_name[,field_name…]{&named_type|type_define}{&&named_type}][…]}
where template is used to define the data type, template _ name represents the name of the defined table template, parameter is the parameter, $ { parameter } is used to assist in defining the table field name with the parameters that are entered when using the table template, $ field _ name is used to specify the field name, & name _ type is used to reference the type of the field directly as the defined data type, & name _ type is used to reference the defined data type and name.
In one embodiment of the invention, the data table definition statement may be defined by the following syntax:
table{table_name[,table_name…]}
[template{template_name[([parameter[,parameter…]])]}]{
[{&&named_type|field_name[,field_name…]{&named_type|type_define}}[…]]
}
wherein table is used to define the table, table _ name represents the name of the table, template is used to refer to the table template, template _ name is used to specify the name of the referred table template, & name _ type is used to directly refer to the type of the field as a defined data type, & name _ type is used to refer to the defined data type and name, and field _ name represents the field name of the table.
Illustratively, the following is to create two tables: the user table and the character table are explained as an example.
Wherein the user table comprises fields: user ID, user name, user full name, password, creation time, latest update time, expiration time, user status and status time.
The constraint conditions are as follows:
1. user ID, user name, password, creation time, last update time, user status and status time are not null.
2. The user ID is the primary key.
3. Default values for the creation time, the most recent update time, and the state time are the current time.
4. The default value for the expiration time is null.
5. The default value of the user state is "active", and the value can be any one of "active", "locked", "disabled", and "disabled".
The role table includes the fields: role ID, role name, creation time, and last update time.
The constraint conditions are as follows:
1. the role ID, role name, creation time, and last update time are not null.
2. The default values for the creation time and the most recent update time are the current time.
3. The role ID is a primary key.
The same type of attribute fields for obtaining the user table and role table have ID, name, creation time, and last update time.
Using the data type definition statement and the table template definition statement, generating a first definition statement for attribute fields of the same type as follows:
Figure BDA0001884778320000061
Figure BDA0001884778320000071
wherein varchar represents that the data type is a variable-length character type, CREATED is creation time, timestamp represents that the data type is a time type, LAST _ update is the latest update time, and default now () represents that the default value is the current time.
Using the data table definition statements and the data type definition statements, second definition statements are generated for different types of attribute fields in the plurality of data tables as follows:
Figure BDA0001884778320000072
wherein, Users represents a user table, user and role are respectively used as parameters to be transmitted into a table template ID _ NAME for auxiliary definition of field NAMEs, full _ NAME represents the full NAME of a user, password represents a password, expired represents expiration time, status represents user state, emum represents that the data type is enumeration type, ACTIVE represents activation, LOCKED represents locking, DEPRECATED represents disablement, EXPRIED represents expiration, default identification field has default value, status _ time represents state time, and Roles represents a role table.
By the method, a plurality of data tables can be created simultaneously, and the data table creation efficiency can be improved.
In one embodiment of the invention, there may be associations between data tables. It can be understood that the association relationship between the data tables mainly includes: a one-to-one incidence relation, a one-to-many incidence relation and a many-to-many incidence relation. Based on this, the embodiment of the present invention may also obtain the association relationship among a plurality of data tables; and generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships.
It is understood that the data table definition statement, the data type definition statement, and the inter-table association definition statement need to be defined before generating the second definition statement for the different types of attribute fields in the multiple data tables by using the data table definition statement, the data type definition statement, the inter-table association definition statement, and the association.
The above parts may be referred to for defining the data table definition statement and the data type definition statement, and are not described in detail herein in the embodiment of the present invention.
In one embodiment of the invention, the inter-table association definition statement may be defined by the following syntax:
one-to-one association relationship:
has_one table_name[as{field_name[,field_name...]}]{required|optional|unique}[exactly]
one-to-many association relationship:
has_many table_name[as{field_name[,field_name...]}]{required|optional|unique}[exactly]
many-to-many association relation:
cross table_name[with{field_name[,field_name...]}][by{field_name[,field_name...]}][through table_name]
the method comprises the steps of obtaining a table name, an as field, a with field and a by field, identifying whether the associated relation exists, requiring, identifying whether the associated field is allowed to be empty or not, identifying whether the associated field is unique or not, identifying whether the associated field is a main key or an outer key, and identifying whether the table exists.
Illustratively, the creation of the people table and the employee table is described below as an example.
Wherein, the people table includes the field: person ID and person name.
The constraint conditions are as follows:
1. the person ID and the person name are not null.
2. The person ID is the primary key.
The employee table includes fields: employee ID and employee name.
The constraint conditions are as follows:
1. employee ID and employee name are not null.
2. Employee ID is the primary key.
3. Employee ID is a foreign key that is associated with a person ID of the personality chart. That is, the person table and the employee table have an association relationship, and one employee can only come from one unique record in the person table, that is, the association relationship between the person table and the employee table is a one-to-one association relationship.
The same type of attribute field for the people table and the employee table is obtained with an ID and a name.
Using the data type definition statements and the table template definition statements, first definition statements for attribute fields of the same type are generated as follows:
Figure BDA0001884778320000091
and obtaining the association relationship between the character table and the employee table as a one-to-one association relationship.
Generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships as follows:
table Persons template ID_NAME(‘person’){
}
table Workers template ID_NAME(‘worker’){
has_one Persons as worker_id exactly
}
wherein, Persons represents a character table, person and worker are parameters, and Workers represents an employee table.
As another example, the following description will be made by taking the creation of a character table and a host table as an example.
Wherein, the people table includes the field: person ID and person name.
The constraint conditions are as follows:
1. the person ID and the person name are not null.
2. The person ID is the primary key.
The host table includes fields: host ID, operating system, and user ID.
The constraint conditions are as follows:
1. host ID, operating system, user ID is not null.
2. The host ID is the primary key.
3. The user ID is a foreign key, associated with a character ID of the character table. That is, the character table and the host table have an association relationship, and one user can use a plurality of hosts, that is, the association relationship between the character table and the host table is a one-to-many association relationship.
The same type of attribute field that obtains the people table and the host table has an ID.
Using the data type definition statement and the table template definition statement, generating a first definition statement for attribute fields of the same type as follows:
Figure BDA0001884778320000102
and obtaining the association relationship between the character table and the host table as a one-to-many association relationship.
Generating a second definition statement aiming at different types of attribute fields in a plurality of data tables by using the data table definition statement, the data type definition statement, the inter-table association relation definition statement and the association relation as follows:
Figure BDA0001884778320000101
Figure BDA0001884778320000112
wherein, Persons represents a character table, Computers and person are parameters, and Computers represent a host computer table.
As another example, the following description will be made by taking the creation of a character table, and a character-role table as an example.
Wherein, the people table includes the field: person ID and person name.
The constraint conditions are as follows:
1. the person ID and the person name are not null.
2. The character ID is the primary key.
The role table includes the fields: role ID and role name.
The constraint conditions are as follows:
1. the role ID and role name are not null.
2. The role ID is a primary key.
The character-role table includes fields: a persona ID and a persona ID.
The constraint conditions are as follows:
1. the persona ID and persona ID are not null.
2. The persona ID and persona ID are primary keys.
3. The persona ID and role ID are foreign keys. The persona ID is associated with a persona ID of a persona table, and the persona ID is associated with a persona ID in a persona table. That is, the character table and the character table are both related to the character-character table, and one character can play multiple roles, and one role can be played by multiple characters, that is, the relationship between the character table and the character table is a many-to-many relationship. The definition of the character-role table and the foreign key constraint conditions of the character table and the role table can be realized through cross by specifying many-to-many association from any one table to another table.
The same type of attribute field that obtains the people table and the role table has an ID and a name.
Using the data type definition statements and the table template definition statements, first definition statements for attribute fields of the same type are generated as follows:
Figure BDA0001884778320000111
Figure BDA0001884778320000121
and obtaining the incidence relation of the character table and the character table as a many-to-many incidence relation.
Generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships as follows:
table Roles template ID_NAME('role'){
}
table Persons template ID_NAME('person'){
cross Roles with person_id by role_id through Person_Roles
}
table Person_Roles{
person_id&ID
role_id&ID
}
wherein Roles represents a character table, Role and Person are parameters, Persons represents a host computer table, and Person-Role represents a character-Role table.
The data table creating method provided by the embodiment of the invention can be used for simultaneously creating a plurality of data tables and improving the data table creating efficiency.
It should be noted that, the above description is made by taking the creation of the user table, the character table, the employee table, the host table and the character-role table as examples, and is only a specific example of the present invention, and is not limited to the present invention.
The data table creating method provided by the embodiment of the invention can be used for simultaneously creating a plurality of data tables and improving the data table creating efficiency.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a data table creating apparatus. As shown in fig. 2, fig. 2 is a schematic structural diagram of a data table creation apparatus according to an embodiment of the present invention. The data table creation means may include:
a first obtaining module 201, configured to obtain attribute fields of the same type in multiple data tables to be created.
The first generating module 202 is configured to generate a first definition statement for an attribute field of the same type by using the data type definition statement and the table template definition statement.
And a second generating module 203, configured to generate a second definition statement for different types of attribute fields in the multiple data tables by using the data table definition statement and the data type definition statement.
An executing module 204, configured to execute the first definition statement and the second definition statement to create a plurality of data tables.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention may further include:
the second obtaining module is used for obtaining the incidence relation among the data tables;
the second generating module 203 of the embodiment of the present invention may be specifically configured to:
and generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationships.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention may further include:
the first definition module is used for defining data type definition sentences, table template definition sentences and data table definition sentences.
In an embodiment of the present invention, the data table creating apparatus provided in the embodiment of the present invention may further include:
and the second definition module is used for defining the association relation definition sentences among the tables.
The data table creating device provided by the embodiment of the invention can be used for simultaneously creating a plurality of data tables and improving the data table creating efficiency.
FIG. 3 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the data table creation method and apparatus according to embodiments of the present invention. As shown in fig. 3, computing device 300 includes an input device 301, an input interface 302, a central processor 303, a memory 304, an output interface 305, and an output device 306. The input interface 302, the central processing unit 303, the memory 25304 and the output interface 305 are connected to each other through a bus 310, and the input device 301 and the output device 306 are connected to the bus 310 through the input interface 302 and the output interface 305, respectively, and further connected to other components of the computing device 300.
Specifically, the input device 301 receives input information from the outside and transmits the input information to the central processor 303 through the input interface 302; central processor 303 processes the input information based on computer-executable instructions stored in memory 304 to generate output information, temporarily or permanently stores the output information in memory 304, and then transmits the output information to output device 306 through output interface 305; output device 306 outputs the output information external to computing device 300 for use by the user.
That is, the computing device shown in fig. 3 may also be implemented as a data table creation device that may include: a memory storing computer-executable instructions; and a processor which, when executing computer executable instructions, may implement the data table creation methods and apparatus described in connection with fig. 1 and 2.
An embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium has computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement the data table creation method provided by embodiments of the present invention.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A method of data table creation, the method comprising:
obtaining attribute fields of the same type in a plurality of data tables to be created;
generating a first definition statement aiming at the attribute field by using a data type definition statement and a table template definition statement;
generating a second definition statement for different types of attribute fields in the plurality of data tables using a data table definition statement and the data type definition statement;
executing the first definition statement and the second definition statement to create the plurality of data tables.
2. The method of claim 1, further comprising:
obtaining the incidence relation among the plurality of data tables;
the generating, using the data table definition statements and the data type definition statements, second definition statements for different types of attribute fields in the plurality of data tables, comprising:
and generating second definition sentences aiming at different types of attribute fields in the plurality of data tables by using the data table definition sentences, the data type definition sentences, the inter-table association relationship definition sentences and the association relationship.
3. The method of claim 1, further comprising:
defining the data type definition statement, the table template definition statement and the data table definition statement.
4. The method of claim 2, further comprising:
and defining an association relation definition statement among the tables.
5. An apparatus for creating a data table, the apparatus comprising:
the first obtaining module is used for obtaining attribute fields of the same type in a plurality of data tables to be created;
the first generation module is used for generating a first definition statement aiming at the attribute field by utilizing a data type definition statement and a table template definition statement;
a second generation module, configured to generate, by using a data table definition statement and the data type definition statement, a second definition statement for different types of attribute fields in the multiple data tables;
an execution module to execute the first and second definition statements to create the plurality of data tables.
6. The apparatus of claim 5, further comprising:
a second obtaining module, configured to obtain an association relationship between the multiple data tables;
the second generating module is specifically configured to:
and generating second definition statements aiming at different types of attribute fields in the plurality of data tables by using the data table definition statements, the data type definition statements, the inter-table association relationship definition statements and the association relationship.
7. The apparatus of claim 5, further comprising:
a first defining module for defining the data type defining statement, the table template defining statement and the data table defining statement.
8. The apparatus of claim 6, further comprising:
and the second definition module is used for defining the association relation definition statement among the tables.
9. A data table creation apparatus, characterized in that the apparatus comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor;
the processor, when executing the computer program, implements a data table creation method as claimed in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out a data table creation method according to any one of claims 1 to 4.
CN201811441569.6A 2018-11-29 2018-11-29 Data table creating method, device, equipment and storage medium Active CN111241053B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811441569.6A CN111241053B (en) 2018-11-29 2018-11-29 Data table creating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811441569.6A CN111241053B (en) 2018-11-29 2018-11-29 Data table creating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111241053A CN111241053A (en) 2020-06-05
CN111241053B true CN111241053B (en) 2022-08-23

Family

ID=70874209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811441569.6A Active CN111241053B (en) 2018-11-29 2018-11-29 Data table creating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111241053B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115138A (en) * 2020-08-19 2020-12-22 第四范式(北京)技术有限公司 Method, device and equipment for determining association relation between data tables

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101253494A (en) * 2005-08-30 2008-08-27 微软公司 Customizable spreadsheet table styles
CN101727436A (en) * 2008-10-29 2010-06-09 华为技术有限公司 Method for processing report data, reporting system and related device thereof
CN104361121A (en) * 2014-12-02 2015-02-18 福建工程学院 Batch analysis method for WEB report system formula
CN104462361A (en) * 2014-12-05 2015-03-25 广州普邦园林股份有限公司 Method and device for matching data in data table
CN104572032A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Report creation method and electronic equipment
CN106933837A (en) * 2015-12-29 2017-07-07 航天信息股份有限公司 A kind of database table model and creation method
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN108197091A (en) * 2016-12-08 2018-06-22 腾讯科技(深圳)有限公司 A kind of method, system and relevant device for creating tables of data
CN108572945A (en) * 2018-03-09 2018-09-25 吉贝克信息技术(北京)有限公司 Create method, system, storage medium and the electronic equipment of report

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060195460A1 (en) * 2005-02-28 2006-08-31 Microsoft Corporation Data model for object-relational data
CN104021145B (en) * 2014-05-16 2018-03-06 华为技术有限公司 The method and apparatus that a kind of mixed service concurrently accesses

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101253494A (en) * 2005-08-30 2008-08-27 微软公司 Customizable spreadsheet table styles
CN101727436A (en) * 2008-10-29 2010-06-09 华为技术有限公司 Method for processing report data, reporting system and related device thereof
CN104572032A (en) * 2013-10-09 2015-04-29 腾讯科技(深圳)有限公司 Report creation method and electronic equipment
CN104361121A (en) * 2014-12-02 2015-02-18 福建工程学院 Batch analysis method for WEB report system formula
CN104462361A (en) * 2014-12-05 2015-03-25 广州普邦园林股份有限公司 Method and device for matching data in data table
CN106933837A (en) * 2015-12-29 2017-07-07 航天信息股份有限公司 A kind of database table model and creation method
CN108197091A (en) * 2016-12-08 2018-06-22 腾讯科技(深圳)有限公司 A kind of method, system and relevant device for creating tables of data
CN107545044A (en) * 2017-08-15 2018-01-05 北京微影时代科技有限公司 A kind of tables of data method for building up, electronic equipment and storage medium
CN108572945A (en) * 2018-03-09 2018-09-25 吉贝克信息技术(北京)有限公司 Create method, system, storage medium and the electronic equipment of report

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DDL代码自动生成工具;王敏;《软件导刊》;20100730;第09卷(第07期);24-26 *
一种针对关系数据库记录的相似重复记录检测算法;马可,郑广海;《电脑知识与技术》;20180505;第14卷(第13期);25-28 *

Also Published As

Publication number Publication date
CN111241053A (en) 2020-06-05

Similar Documents

Publication Publication Date Title
CN110908997B (en) Data blood relationship construction method and device, server and readable storage medium
CN104967620B (en) A kind of access control method based on attribute access control strategy
CN100468396C (en) Mapping architecture for arbitrary data models
CN107729371B (en) Data indexing and querying method, device, equipment and storage medium of block chain
US20100042572A1 (en) Method for Dynamically Determining a Predetermined Previous Condition of a Rule-based System
CN115543402B (en) Software knowledge graph increment updating method based on code submission
CN113420026B (en) Database table structure changing method, device, equipment and storage medium
CN116502273B (en) Dynamic data desensitization method, device and equipment based on data blood edges
CN115220773B (en) System and method for low-code, visual generation of background data management code
CN112818048A (en) Hierarchical construction method and device of data warehouse, electronic equipment and storage medium
CN103678396B (en) A kind of data back up method and device based on data model
CN107102995B (en) Method and device for determining SQL execution plan
CN109086382A (en) A kind of method of data synchronization, device, equipment and storage medium
CN111241053B (en) Data table creating method, device, equipment and storage medium
CN113094370A (en) Data index construction method and device, storage medium and electronic equipment
CN112328275A (en) Data updating method and device for nuclear power plant, terminal equipment and storage medium
CN117194389A (en) SQL-based database compatibility method and device, electronic equipment and storage medium
CN110716913B (en) Mutual migration method of Kafka and Elasticissearch database data
Lano et al. Verified bidirectional transformations by construction.
US20200192938A1 (en) Graph creation from multiple databases
Trojahn et al. An extended value-based argumentation framework for ontology mapping with confidence degrees
CN113515866B (en) Modeling method and device for relay protection device
CN110781170B (en) Historical data protection method and device based on AOP
CN118277406A (en) SQL sentence generation method and device based on large language model
US11455437B1 (en) Techniques for generating and retrieving change summary data and aggregated model version data for an infrastructure model

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