CN112835886A - Data table field adding method and device - Google Patents

Data table field adding method and device Download PDF

Info

Publication number
CN112835886A
CN112835886A CN201911164282.8A CN201911164282A CN112835886A CN 112835886 A CN112835886 A CN 112835886A CN 201911164282 A CN201911164282 A CN 201911164282A CN 112835886 A CN112835886 A CN 112835886A
Authority
CN
China
Prior art keywords
field
data
newly added
data table
added
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911164282.8A
Other languages
Chinese (zh)
Inventor
余伟华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software 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 Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201911164282.8A priority Critical patent/CN112835886A/en
Publication of CN112835886A publication Critical patent/CN112835886A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • 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/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Abstract

The application relates to a data table field adding method and device. The method comprises the following steps: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added field into the data table through the field custom table. By adopting the method, the newly added fields can be recorded by utilizing the pre-established field self-defining table, and the newly added data is recorded in the data column corresponding to a certain preset field in the data table, so that the number of the newly added fields is not limited, more newly added fields can be added, and the requirements of customers are met.

Description

Data table field adding method and device
Technical Field
The present application relates to the field of database technologies, and in particular, to a method and an apparatus for adding a data table field.
Background
With the development of database technology, databases are generally created, managed, and operated using a database schema Definition Language (DDL) and a Data Manipulation Language (DML).
Under the continuous promotion of user requirements, a plurality of requirements for online modification can be generated, for example, fields are added, and fields can be added for a data table online through the DDL and the DML.
In the prior art, when a table field is added to a MySQL data table, some redundant fields can be reserved in the database table to serve as user-defined fields of a user, when the user sets a user-defined field, the user-defined field content of the user is stored in a certain redundant field, and the scheme has the defect that the number of the user-defined fields is limited, and when all the redundant fields are used, the user-defined field is not defined.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method and an apparatus for adding fields to a data table in a database online.
A method of data table field addition, the method comprising: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added field into the data table through the field custom table.
In one embodiment, the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In one embodiment, the customizing the table through the field includes, after the adding the newly added field to the data table: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the data table in a first preset data format, wherein the first preset data format is an identifiable format of the newly added data adding operation, and the newly added data comprises original field data and newly added field data in the data table.
In one embodiment, the customizing the table by the field, after adding the newly added field to the data table, includes: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the newly added field of the data table in a second preset data format, wherein the second preset data format is an identifiable format of the newly added field adding operation, and the newly added data comprises newly added field data.
In one embodiment, the method further comprises: and responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the data table.
In one embodiment, the customizing the table through the field includes, after the adding the newly added field to the data table: acquiring a query field input by a user and query data corresponding to the query field; and retrieving data by utilizing an ng-search engine according to the query field and the query data.
In one embodiment, the ng-search engine is developed based on an elastic search open source search engine.
A data table field adding apparatus, the apparatus comprising: the table name acquisition module is used for responding to the field adding triggering operation and acquiring the table name and the newly added field of the data table of the field to be added; the field query module is used for adding the table name and the newly-added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and the field adding module is used for adding the newly added fields into the data table through the field self-defining table.
In one embodiment, the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In one embodiment, the field adding device further includes: the first display module is used for displaying the data table added with the newly added fields so that a user can write in newly added data according to the data table; the first adding module is used for adding the newly added data into the data table in a first preset data format, the first preset data format is a recognizable format of the adding operation of the newly added data, and the newly added data comprises original field data and newly added field data in the data table.
In one embodiment, the field adding device further includes: the second display module is used for displaying the data table added with the newly added fields so that a user can write in newly added data according to the data table; and the second adding module is used for adding the newly added data into the newly added field of the data table in a second preset data format, the second preset data format is an identifiable format of newly added field adding operation, and the newly added data comprises newly added field data.
In one embodiment, the field adding device further includes: and the data operation module is used for responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the data table.
In one embodiment, the field adding device further includes: the query data acquisition module is used for acquiring a query field input by a user and query data corresponding to the query field;
and the query module is used for retrieving data by utilizing an ng-search engine according to the query field and the query data.
In one embodiment, the ng-search engine is developed based on an elastic search open source search engine.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added field into the data table through the field custom table.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added field into the data table through the field custom table.
According to the data table field adding method and device, the table name and the newly added field of the data table of the field to be added are obtained by responding to the field adding triggering operation; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added fields into a data table through a field self-defining table. The newly added fields are recorded by utilizing the pre-created field self-defining table, and the newly added data is recorded in the data column corresponding to a certain preset field in the data table, so that the number of the newly added fields is not limited, more newly added fields can be added, and the requirements of customers are met.
Drawings
FIG. 1 is a diagram of an application environment for a field addition method in one embodiment;
FIG. 2 is a flow diagram that illustrates a method for field addition, according to one embodiment;
FIG. 3 is a block diagram of a field adding apparatus in one embodiment;
FIG. 4 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further 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 present application and are not intended to limit the present application.
The data table field adding method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The user issues an add field trigger operation through the terminal 102 and sends it to the server 104 through the network to cause the server 104 to respond. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for adding fields in a data table is provided, which is described by taking the method as an example for being applied to the terminal in fig. 1, and includes the following steps:
step 202, in response to the field adding triggering operation, obtaining the table name and the added field of the data table of the field to be added.
In this implementation, the field adding method may be applied to a process of adding a new field to the data table. Specifically, in the process of developing a project, when a database design and development stage is completed but some newly added fields need to be additionally added to a data table, a software developer can add the newly added fields through a field addition method; the field to be added comprises the newly added field.
The data table may include a plurality of fields, such as an original field and a newly added field, where the original field may be a field determined in the database design phase, and the newly added field may be a field added after the database design phase is completed. In some implementations, a database may generally include a plurality of data tables, each configured with a different table name, where the table name is used to identify a data table, and then a data table corresponding to the table name is obtained according to the table name, and each table may include a plurality of data fields. As an example, as shown in table 1, the data table may include original fields such as name, sex, age, address, phone, etc., and a common _ data addition field.
Name of field Type (B) Description of the invention
name VARchar(30) Name (I)
sex VARchar(2) Sex
age INT(4) Age (age)
address VARchar(200) Address
phone VARchar(12) Contact telephone
common_data TEXT Custom data content
TABLE 1
Step 204, adding the table name and the newly added field to a field self-defining table; and the field self-defining table is used for recording the newly added fields.
Wherein, the newly added field comprises: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In this implementation manner, the data type of the newly added field is used to identify the data type of the newly added field, and the data type may be an official defined data type such as Binary, Varbinary, Image, Char, Varchar, and Text, or may be a user-defined data type according to a requirement of the user. The name of the newly added field may be a column name corresponding to the newly added field in the data table, and the data of the newly added field may be data of a column corresponding to the newly added field. This implementation may be used to add new fields to the data table. This process may be implemented by a developer or a user.
By way of example, the field custom table structure may be as shown in Table 2.
Name of field Type (B) Description of the invention
table_name VARchar(30) Table name to which custom field belongs
field_code VARchar(30) Custom field code
field_name VARchar(30) Custom field names
field_type VARchar(30) Custom field types
TABLE 2
And step 206, adding the newly added field into the data table through the field custom table.
The field self-defining table is used for recording the newly added fields of the data tables, can be preset by a database developer and is used for recording the newly added fields of each data table, and the data format of the newly added fields, the number of the newly added fields and the data of the newly added fields can be unlimited.
In some implementations, the field customization table may be used to record a table name of a data table to which the newly added field belongs, a data type of the newly added field, and a name of the newly added field; when the newly added fields of the data table are inquired, one or more newly added fields can be inquired according to the table names of the data table to which the newly added fields belong.
As an example, an added field, for example, "height" for representing a USER attribute, may be added to the USER table, specifically, the table name to which the custom field corresponding to the added field "height" belongs (i.e., the table name of the data table to which the added field belongs) is the USER (USER) table, the corresponding custom field code (i.e., the added field identifier) is "sta", the corresponding custom field name (i.e., the added field name) is "status", and the custom field type (the data format of the added field) is "VARCHAR (30)", i.e., "" USER ', "sta'," status ', "VARCHAR (30)'" is added to the data table.
In the data processing method, the newly added fields can be recorded by utilizing the pre-established field self-defining table, and the newly added data is recorded in the data column corresponding to a certain preset field in the data table, so that the number of the newly added fields is not limited, more newly added fields can be added, and the requirements of customers are met.
In a possible implementation manner, the adding, by the field customization table, the newly added field to the data table includes: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the data table in a first preset data format, wherein the first preset data format is an identifiable format of the newly added data adding operation, and the newly added data comprises original field data and newly added field data in the data table.
In the implementation mode, when a user performs data adding operation, the table name of a data table to which the data adding operation is performed can be obtained first, then the added field and the original field of the data table are inquired in the field self-defining table according to the table name, the added field and the added field are carried, and the added data skip from the current page to the data adding page or the corresponding added data prompt box is popped up, so that the user can add the added data into the data table according to the original field and the added field. The add data operation may be triggered by a user through a terminal.
The first preset data format may be any type of data including a matching relationship between the newly added field data and the newly added field, and a matching relationship between the original field data and the original field.
In this implementation manner, the data adding operation may be initiated by the user actively after the user completes the filling of the new added data, or may be triggered automatically when the system detects that the display duration of the data adding page or the data adding prompt box reaches a preset duration.
In the data processing method, the table name of the data table to which the data is to be added can be acquired by responding to the data adding triggering operation; according to the table name, new fields of the data table are inquired from a preset field self-defining table; the field self-defining table is used for recording the newly added fields of the data table; displaying the newly added field so that a user can write in newly added data according to the newly added field; and responding to the operation of adding data, and adding the newly added data into the data table in a first preset data format. The newly added fields are recorded by utilizing the pre-created field self-defining table, and the newly added data is recorded in the data column corresponding to a certain preset field in the data table, so that the number of the newly added fields is not limited, more newly added fields can be added, and the requirements of customers are met.
In a possible implementation manner, the adding, by the field customization table, the newly added field to the data table includes: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the newly added field of the data table in a second preset data format, wherein the second preset data format is an identifiable format of the newly added field adding operation, and the newly added data comprises newly added field data.
As an example, as shown in table 1, common _ data may be a custom data field. The second recognizable format may be a common _ data format, which is used to organize a plurality of new data belonging to the same data table, and in reading the new data, the new data may be obtained by reading data in a data column of the custom data field and analyzing the data to obtain a plurality of new fields and new data respectively corresponding to each new field.
Specifically, when the operation of adding data is completed, the implementation may organize one or more data to be added and the newly added fields corresponding to the data to be added into data in a second recognizable format, and add the data to the data columns of the custom data fields of the data table.
The second preset data format can be any type of data with a matching relationship between the newly added data and the newly added field; for example, the data of the first preset data format may be { "01": [ "BMW" ] }. The "BMW" may be newly added data, and the "01" may be automatically generated by the system and used for identifying a newly added field having a corresponding relationship with the newly added data. In one possible implementation, the method further includes: and responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the custom data field in the data table.
In this implementation manner, when the query/modification/deletion operation needs to be performed on the data of the newly added field in the data table, the operation can be performed on the data column corresponding to the custom data field.
For example, when the new field data needs to be modified, the new field to be modified and the new field data are analyzed, the new field data replaces the original new field data, the new field data is organized into data in a second recognizable format, and the original data in the second recognizable format in the custom data field is replaced.
In a possible implementation manner, the adding, by the field customization table, the newly added field to the data table includes: acquiring a query field input by a user and query data corresponding to the query field; and retrieving data by utilizing an ng-search engine according to the query field and the query data.
By way of example, the data in the second recognizable format may be { "A": [ "BMW" ], "B": [ "Red" ] }. Wherein, the "BMW" and the "Red" can be newly added field data, and the "A" and the "B" can be newly added fields with corresponding relationship in the newly added field data. Correspondingly, when newly-added field data is searched from the data in the second identifiable format, the database query can be replaced by the ng-search engine, and the query efficiency is ensured. For example, when a record with a custom field label value of bmw is queried, the search can be quickly performed only according to the ng-search rule common _ data.
In one possible implementation, the ng-search engine is developed based on an elastic search open source search engine.
In one possible implementation manner, while the newly added field is displayed, the method further includes: and displaying the original field of the data table so that the user writes the data of the newly added field according to the newly added field and the original field.
The method in the implementation manner can meet other use requirements of the user, for example, when the user is adding data and cannot ensure whether the data to be added includes all fields, the original fields of the data table can be displayed while the newly added fields are displayed; correspondingly, in this implementation, the newly added data includes both the original field and the newly added field of the data table.
In one usage scenario, such as a database table client table, there are the following fields: name, sex, age, address, phone. Now, our users want to add some custom fields to the clients themselves, so that the clients can be conveniently followed up, such as label, interest, weChat.
To solve the above problem, the following operations may be made:
1) first, a database table client table (i.e. data table, the same applies below) is created, and the table structure is shown in table 1.
2) In order to realize online addition of table fields, an additional auxiliary table (i.e., a field custom table, the same applies below) needs to be added, where the auxiliary table can be defined as a custom field record table custom _ field _ table, and the core table structure is shown in table 2.
3) When a label field needs to be added in the custom _ table, a custom record can be added to the custom _ field _ table by: insert _ field _ table ("table _ name", field _ code "," field _ name "," field _ type ") value ('customer _ table', 'label', 'TEXT'); at this time, the DDL operation becomes an operation of adding a record to the custom _ field _ table, where the record stores fields to be customized and a table of the customized fields.
4) When a customer _ table record with a custom field is newly added, if a customer record with a name of "test" is added, the gender is "male", the age is 25, the address is "Hangzhou City in Zhejiang province", the mobile phone number is "15700000000", and the label is "BMW", the customer record is stored in the customer table according to the following format: insert intero customer _ table ("ame", "sex", "age", "address", "phone", "common _ data") value (' test ', ' male ', '25', ' Hangzhou city of Zhejiang province ', '15700000000', ' { "label": [ "Baoma" ] }); at this time, the information of the custom field may be already added to the customer _ table together with the field information defined by the customer _ table itself.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 3, there is provided a field adding apparatus, including: a table name obtaining module 301, a field query module 302 and a field adding module 303, wherein:
the table name acquisition module 301 is configured to respond to a field adding triggering operation, and acquire a table name and a newly added field of a data table of a field to be added;
a field query module 302, configured to add the table name and the newly added field to a field custom table; the field self-defining table is used for recording the newly added fields;
and a field adding module 303, configured to add the newly added field to the data table through the field customization table.
In one embodiment, the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In one embodiment, the field adding device further includes: the first display module is used for displaying the data table added with the newly added fields so that a user can write in newly added data according to the data table; the first adding module is used for adding the newly added data into the data table in a first preset data format, the first preset data format is a recognizable format of the adding operation of the newly added data, and the newly added data comprises original field data and newly added field data in the data table.
In one embodiment, the field adding device further includes: the second display module is used for displaying the data table added with the newly added fields so that a user can write in newly added data according to the data table; and the second adding module is used for adding the newly added data into the newly added field of the data table in a second preset data format, the second preset data format is an identifiable format of newly added field adding operation, and the newly added data comprises newly added field data.
In one embodiment, the field adding device further includes: and the data operation module is used for responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the data table.
In one embodiment, the field adding device further includes: the query data acquisition module is used for acquiring a query field input by a user and query data corresponding to the query field;
and the query module is used for retrieving data by utilizing an ng-search engine according to the query field and the query data.
In one embodiment, the ng-search engine is developed based on an elastic search open source search engine.
The specific definition of the data table field adding device can be referred to the definition of the data table field adding method in the above, and is not described in detail here. The modules in the above-mentioned data table field adding device can be wholly or partially implemented by software, hardware and their combination. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of data table field addition. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added field into the data table through the field custom table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the data table in a first preset data format, wherein the first preset data format is an identifiable format of the newly added data adding operation, and the newly added data comprises original field data and newly added field data in the data table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the newly added field of the data table in a second preset data format, wherein the second preset data format is an identifiable format of the newly added field adding operation, and the newly added data comprises newly added field data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the custom data field in the data table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: acquiring a query field input by a user and query data corresponding to the query field; and retrieving data by utilizing an ng-search engine according to the query field and the query data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the ng-search engine is developed based on an elastic search open source search engine.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added; adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields; and adding the newly added fields into a data table through a field self-defining table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the data table in a first preset data format, wherein the first preset data format is an identifiable format of the newly added data adding operation, and the newly added data comprises original field data and newly added field data in the data table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: displaying the data table added with the newly added field so that a user writes newly added data according to the data table; and adding the newly added data into the newly added field of the data table in a second preset data format, wherein the second preset data format is an identifiable format of the newly added field adding operation, and the newly added data comprises newly added field data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the custom data field in the data table.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the adding the newly added field into the data table through the field self-defining table comprises the following steps: acquiring a query field input by a user and query data corresponding to the query field; and retrieving data by utilizing an ng-search engine according to the query field and the query data.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the ng-search engine is developed based on an elastic search open source search engine.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for data table field addition, the method comprising:
responding to the field adding triggering operation, and acquiring a table name and a newly added field of a data table of the field to be added;
adding the table name and the newly added field to a field self-defining table; the field self-defining table is used for recording the newly added fields;
and adding the newly added field into the data table through the field custom table.
2. The method of claim 1,
the newly added field includes: the type of the newly added field data, the name of the newly added field, and the newly added field data.
3. The method of claim 1, wherein the adding the new field to the data table via the field customization table comprises:
displaying the data table added with the newly added field so that a user writes newly added data according to the data table;
and adding the newly added data into the data table in a first preset data format, wherein the first preset data format is an identifiable format of the newly added data adding operation, and the newly added data comprises original field data and newly added field data in the data table.
4. The method of claim 1, wherein the adding the new field to the data table via the field customization table comprises:
displaying the data table added with the newly added field so that a user writes newly added data according to the data table;
and adding the newly added data into the newly added field of the data table in a second preset data format, wherein the second preset data format is an identifiable format of the newly added field adding operation, and the newly added data comprises newly added field data.
5. The method of claim 3, further comprising:
and responding to the data inquiring/modifying/deleting triggering operation, inquiring/modifying/deleting the newly added field data and/or the original field data stored in the data column corresponding to the data table.
6. The method of claim 3, wherein the adding the new field to the data table via the field customization table comprises:
acquiring a query field input by a user and query data corresponding to the query field;
and retrieving data by utilizing an ng-search engine according to the query field and the query data.
7. The method of claim 6,
the ng-search engine is developed based on an elastic search open source search engine.
8. A data table field adding apparatus, the apparatus comprising:
the table name acquisition module is used for responding to the field adding triggering operation and acquiring the table name and the newly added field of the data table of the field to be added;
the field query module is used for adding the table name and the newly-added field to a field self-defining table; the field self-defining table is used for recording the newly added fields;
and the field adding module is used for adding the newly added fields into the data table through the field self-defining table.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN201911164282.8A 2019-11-25 2019-11-25 Data table field adding method and device Pending CN112835886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911164282.8A CN112835886A (en) 2019-11-25 2019-11-25 Data table field adding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911164282.8A CN112835886A (en) 2019-11-25 2019-11-25 Data table field adding method and device

Publications (1)

Publication Number Publication Date
CN112835886A true CN112835886A (en) 2021-05-25

Family

ID=75922059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911164282.8A Pending CN112835886A (en) 2019-11-25 2019-11-25 Data table field adding method and device

Country Status (1)

Country Link
CN (1) CN112835886A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672618A (en) * 2021-08-12 2021-11-19 广州有信科技有限公司 Metadata table-based multi-tenant data processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7801886B1 (en) * 2006-10-10 2010-09-21 Intuit Inc. Method and apparatus for performing database operations involving custom fields
CN104063409A (en) * 2013-04-11 2014-09-24 腾讯科技(深圳)有限公司 Field adding method and system of database
CN105302814A (en) * 2014-06-20 2016-02-03 苏州精易会信息技术有限公司 Method and system for storing multiple custom fields
CN108073709A (en) * 2017-12-20 2018-05-25 上海达梦数据库有限公司 A kind of operating method of data record, device, equipment and storage medium
CN108984620A (en) * 2018-06-14 2018-12-11 中国科学院重庆绿色智能技术研究院 A kind of relevant database and its design method of dynamic scalable

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7801886B1 (en) * 2006-10-10 2010-09-21 Intuit Inc. Method and apparatus for performing database operations involving custom fields
CN104063409A (en) * 2013-04-11 2014-09-24 腾讯科技(深圳)有限公司 Field adding method and system of database
CN105302814A (en) * 2014-06-20 2016-02-03 苏州精易会信息技术有限公司 Method and system for storing multiple custom fields
CN108073709A (en) * 2017-12-20 2018-05-25 上海达梦数据库有限公司 A kind of operating method of data record, device, equipment and storage medium
CN108984620A (en) * 2018-06-14 2018-12-11 中国科学院重庆绿色智能技术研究院 A kind of relevant database and its design method of dynamic scalable

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672618A (en) * 2021-08-12 2021-11-19 广州有信科技有限公司 Metadata table-based multi-tenant data processing method and device

Similar Documents

Publication Publication Date Title
WO2020186786A1 (en) File processing method and apparatus, computer device and storage medium
CN109558404B (en) Data storage method, device, computer equipment and storage medium
CN111061475B (en) Software code generating method, device, computer equipment and storage medium
CN111177302B (en) Service bill processing method, device, computer equipment and storage medium
CN109597979B (en) List table generation method and device, computer equipment and storage medium
WO2020155771A1 (en) Spreadsheet data processing method and apparatus, computer device, and storage medium
CN110727777A (en) Knowledge graph management method and device, computer equipment and storage medium
CN112835886A (en) Data table field adding method and device
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN109840250B (en) Method, device, equipment and storage medium for managing access authority of intermediate field
CN114924911B (en) Method, device, equipment and storage medium for backing up effective data of Windows operating system
CN115687350A (en) Index construction method and device, computer equipment and storage medium
CN115495452A (en) Data processing method, data processing device, computer equipment and storage medium
CN114329152A (en) Application program generation method, device, equipment and medium based on browser engine
CN109857759B (en) Concurrent data processing method and device, computer equipment and storage medium
CN111221817B (en) Service information data storage method, device, computer equipment and storage medium
CN117290302B (en) Directory separation method, apparatus, computer device and storage medium
CN114547066A (en) Nuclear power business data standardization method and device and computer equipment
CN114385630A (en) Blood relationship combing method, apparatus, device, storage medium, and program product
CN115935933A (en) List analysis method and device, computer equipment and storage medium
CN115408620A (en) Method and device for determining data tag object
CN117648336A (en) Data query method, device, computer equipment and storage medium
CN114327435A (en) Technical document generation method and device and computer readable storage medium
CN115878715A (en) Method and device for generating page display scheme and computer equipment
CN116775955A (en) Data tag solidifying method, device, computer equipment and storage medium

Legal Events

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

Application publication date: 20210525

RJ01 Rejection of invention patent application after publication