CN113297207B - Data processing method, device and equipment - Google Patents
Data processing method, device and equipment Download PDFInfo
- Publication number
- CN113297207B CN113297207B CN202010855874.0A CN202010855874A CN113297207B CN 113297207 B CN113297207 B CN 113297207B CN 202010855874 A CN202010855874 A CN 202010855874A CN 113297207 B CN113297207 B CN 113297207B
- Authority
- CN
- China
- Prior art keywords
- target
- attribute
- data
- record
- object attribute
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 33
- 238000000034 method Methods 0.000 claims abstract description 31
- 238000003780 insertion Methods 0.000 claims description 44
- 230000037431 insertion Effects 0.000 claims description 44
- 238000012545 processing Methods 0.000 claims description 13
- 238000011161 development Methods 0.000 abstract description 8
- 239000002699 waste material Substances 0.000 abstract description 3
- 238000007726 management method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 239000000969 carrier Substances 0.000 description 1
- 238000013523 data management Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application discloses a data processing method, which comprises the following steps: receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute; generating a target object record according to the target object name, and inserting the target object record into an object definition table; and generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table. By adopting the method, the problems of storage space waste and low development efficiency in the prior art are solved.
Description
Technical Field
The present application relates to the field of database technologies, and in particular, to a data processing method, apparatus, electronic device, and storage device.
Background
In the database field, users often add or modify attribute fields of objects after defining a data table. When adding or modifying the property fields of an object, the development efficiency of development is severely affected because users often need to maintain a large number of tables, and a large number of codes need to be modified.
The client relationship management system (CRMCustomer Relationship Management) provides a set of multi-tenant PaaS scheme based on metadata drive on the basis of a database, and a visual management interface is used for facilitating management of objects by a user, so that the system is convenient to use and development efficiency of development is improved.
The customer relation management system solves the problems of self definition and expandability in the development process by a mode based on a large wide table (500 columns of a data table), and a user can fall into one of the 500 columns every time one column is newly added, so that the problem is solved; but the general 500 column approach causes the following problems:
the general 500 columns are types of data that need to support various kinds, such as integer, time, text, etc., so the columns can only be of the varchar type and the length definition must be long, but often the model of the user is only tens of fields or less, which results in a lot of storage waste.
2. Because the varchar type is adopted, index management cannot be performed through the underlying database, and the scheme of the client relationship management system adopts the method of improving the index management to an application layer, including a common index, a unique index and the like, so that the whole index is very complex to use and manage, and the query and writing efficiency is reduced.
Disclosure of Invention
The application provides a data processing method, a data processing device, electronic equipment and storage equipment, and aims to solve the problems of storage space waste and low development efficiency in the prior art.
The application provides a data processing method, which comprises the following steps:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
And generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table.
Optionally, the creating request further includes: identification information of the user;
The generating a target object record according to the target object name, and inserting the target object record into an object definition table includes:
And generating a target object record according to the target object name and the identification information of the user, and inserting the target object record into an object definition table.
Optionally, the method further comprises:
And when the target object record is inserted into the object definition table, generating target object identification data corresponding to the target object name.
Optionally, the generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table includes:
generating a target object attribute record according to the target object attribute data and the target object identification data;
And inserting the target object attribute record into an object attribute table.
Optionally, the target object attribute data is a target object attribute list; the generating a target object attribute record according to the target object attribute data and the target object identification data includes:
traversing the target object attribute list to obtain each target object attribute data in the target object attribute list;
generating a target object attribute record according to the target object identification data and each target object attribute data;
Each entry is inserted into an object attribute table.
Optionally, the method further comprises:
Receiving a data insertion request for an object; the data insertion request includes target data and the target object identification data;
And generating a target data record according to the target data and the target object identification data, and inserting the target data record into a data table.
Optionally, the method further comprises:
receiving an index insertion request for an index table; the index insertion request comprises index data and target object identification data;
And generating an index record according to the index data and the target object identification data, and inserting the index record into an index table.
Optionally, the index data includes: index names; an index column; target object identification data; index attribute data; wherein the index attribute data is data for identifying whether it is a unique index.
Optionally, the method further comprises:
receiving a relationship insertion request for a relationship table; the relation insertion request comprises target object identification data, second object identification data and an associated field; the second object identification data is identification data of an object establishing a relation with the target object;
generating a relation record according to the relation insertion request and the object identification data, and inserting the relation record into a relation table.
Optionally, the method further comprises:
Receiving an object query request for querying a list of target objects of a user; the object query request comprises identification information of a user;
Inquiring a target object of a user from an object definition table according to the object inquiry request;
generating a list of target objects according to the inquired target objects;
Transmitting the list of the target objects to a client; the list of the target objects comprises target object identification data and target object names.
Optionally, the method further comprises:
Receiving an attribute adding request for adding the attribute of the target object; the attribute adding request comprises second target object attribute data and target object identification data;
generating a second target object attribute record according to the attribute adding request;
and inserting the second target object attribute record into an object attribute table.
Optionally, the method further comprises:
Receiving a data query request for querying data; the data query request comprises target object identification data;
Inquiring target data from a data table according to the data inquiry request;
And sending the target data to a client.
The application also provides a data processing device, comprising:
a creation request receiving unit for receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
A target object record inserting unit, configured to generate a target object record according to the target object name, and insert the target object record into an object definition table;
and the target object attribute record inserting unit is used for generating a target object attribute record according to the target object attribute data and inserting the target object attribute record into an object attribute table.
The present application also provides an electronic device including:
A processor; and
A memory for storing a program of a data processing method, the apparatus, after powering on and running the program of the data processing method by the processor, performing the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
And generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table.
The present application also provides a storage device storing a program of a data processing method, the program being executed by a processor to perform the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
And generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table.
The application also provides a data processing method, which comprises the following steps:
receiving a creation request for creating a producer object; the creation request includes: target producer object name, target producer object attribute data; the target producer object attribute data comprises a name of a target producer object attribute and a type of the target producer object attribute;
Generating a target producer object record according to the target producer object name, and inserting the target producer object record into an object definition table;
And generating a target producer object attribute record according to the target producer object attribute data, and inserting the target producer object attribute record into an object attribute table.
The application also provides a data processing method, which comprises the following steps:
Receiving a creation request for creating a carrier object; the creation request includes: target carrier object name, target carrier object attribute data; the target carrier object attribute data comprises a name of a target carrier object attribute and a type of the target carrier object attribute;
Generating a target carrier object record according to the target carrier object name, and inserting the target carrier object record into an object definition table;
and generating a target carrier object attribute record according to the target carrier object attribute data, and inserting the target carrier object attribute record into an object attribute table.
The application also provides a data processing method, which comprises the following steps:
Receiving a creation request for creating a vendor object; the creation request includes: target vendor object name, target vendor object attribute data; the target vendor object attribute data comprises a name of a target vendor object attribute and a type of the target vendor object attribute;
generating a target vendor object record according to the target vendor object name, and inserting the target vendor object record into an object definition table;
and generating a target vendor object attribute record according to the target vendor object attribute data, and inserting the target vendor object attribute record into an object attribute table.
The application also provides a data processing method, which comprises the following steps:
Receiving a creation request for creating a warehouse object; the creation request includes: target warehouse object name, target warehouse object attribute data; the target warehouse object attribute data comprises names of target warehouse object attributes and types of the target warehouse object attributes;
Generating a target warehouse object record according to the target warehouse object name, and inserting the target warehouse object record into an object definition table;
and generating a target warehouse object attribute record according to the target warehouse object attribute data, and inserting the target warehouse object attribute record into an object attribute table.
The application provides a data processing method, which comprises the following steps:
receiving a creation request for creating a commodity object; the creation request includes: target commodity object name, target commodity object attribute data; the target commodity object attribute data comprises a name of a target commodity object attribute and a type of the target commodity object attribute;
Generating a target commodity object record according to the target commodity object name, and inserting the target commodity object record into an object definition table;
And generating a target commodity object attribute record according to the target commodity object attribute data, and inserting the target commodity object attribute record into an object attribute table.
The application provides a data processing method, which comprises the following steps:
receiving a creation request for creating a customer object; the creation request includes: target customer object name, target customer object attribute data; the target customer object attribute data comprises a name of a target customer object attribute and a type of the target customer object attribute;
generating a target customer object record according to the target customer object name, and inserting the target customer object record into an object definition table;
And generating a target customer object attribute record according to the target customer object attribute data, and inserting the target customer object attribute record into an object attribute table.
Compared with the prior art, the application has the following advantages:
The application provides a data processing method, which is used for receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute; generating a target object record according to the target object name, and inserting the target object record into an object definition table; and generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table. According to the data processing method provided by the application, when a user creates a target object, the database server only needs to generate the target object record according to the name of the target object and insert the target object record into the object definition table, so that an object table is not required to be created independently, a user is not required to write complex codes, and the development efficiency is improved; in addition, the target object attribute data contains the types of the target object attributes, so that the storage space occupied by each target object attribute can be determined according to the types of the target object attributes, the number of fields included in the target object attribute records is determined according to the number of the target object attributes, and compared with the number of fields of 500 columns, a large amount of storage space is saved; furthermore, as the target object attribute has own data type, index management can be performed through the underlying database, so that the use and management of the whole index are very simple, and the query and writing efficiency is improved.
Drawings
Fig. 1 is a flowchart of a data processing method according to a first embodiment of the present application.
Fig. 2 is a schematic structural diagram of a database according to a first embodiment of the present application.
Fig. 3 is a schematic diagram of a data processing apparatus according to a second embodiment of the present application.
Fig. 4 is a schematic diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. The present invention may be embodied in many other forms than those herein described, and those skilled in the art will readily appreciate that the present invention may be similarly embodied without departing from the spirit or essential characteristics thereof, and therefore the present invention is not limited to the specific embodiments disclosed below.
A first embodiment of the present application provides a data processing method, where an execution body of the method is a database server, and the details are described below with reference to fig. 1 and fig. 2.
As shown in fig. 1, in step S101, a creation request for creating an object is received.
The creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of the target object attribute and a type of the target object attribute.
The creation request may refer to a creation request sent by a user to a database server through a client.
As shown in fig. 1, in step S102, a target object record is generated according to the target object name, and the target object record is inserted into an object definition table.
As shown in FIG. 2, objects are object definition tables, the tenants, i.e., users.
For example, table 1 defines a table for one object. If the target object name is ScItem (article), an article record is generated according to the target object name ScItem, and the article record contains { object name: scItem }, and inserts the item record into the object definition table, after insertion as shown in the second row of table 1, with record number id=12. If the target object name is SalePlan (sales plan), a sales plan record is generated according to SalePlan, and the sales plan record contains { object name: salePlan }, and inserts the sales plan record into the object definition table, after insertion, as shown in the third row of table 1, with record number id=15. It should be noted that, table 1 is only a simple schematic table, and in practical implementation, the records of the object generally include more fields, and the object definition table also includes more records.
TABLE 1
In the prior art, when a user creates a target object, the user needs to create an object table for the target object independently.
As an implementation manner, the first embodiment of the present application may further include:
And when the target object record is inserted into the object definition table, generating target object identification data corresponding to the target object name.
As shown in table 1, guid (object guid) is identification data, and target object identification data corresponding to the target object name ScItem (article) is a194962.
In one embodiment, in order to enable each user to access only the object record of the user, each user is isolated, and the creation request may further include identification information of the user. As in table 1, the tenant_id is an identification information field of the user. When the name of the target object is ScItem (goods), the identification information tenant_id of the user is ascp-mdsc; when the target object name is SalePlan (sales plan), the identification information tenant_id of the user is ascp-mdsc, and two records of id=12 and id=15 belong to the same user.
The generating a target object record according to the target object name, and inserting the target object record into an object definition table includes:
And generating a target object record according to the target object name and the identification information of the user, and inserting the target object record into an object definition table.
Because the target object record contains the identification information of the user, the user can only inquire the object record created by the user when inquiring the object definition table, and the isolation of the user is realized.
As shown in fig. 1, in step S103, a target object attribute record is generated from the target object attribute data, and the target object attribute record is inserted into an object attribute table.
As shown in FIG. 2, fields are object definition tables.
The generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table, includes:
generating a target object attribute record according to the target object attribute data and the target object identification data;
And inserting the target object attribute record into an object attribute table.
The target object attribute data is a target object attribute list; the generating a target object attribute record according to the target object attribute data and the target object identification data includes:
traversing the target object attribute list to obtain each target object attribute data in the target object attribute list;
generating a target object attribute record according to the target object identification data and each target object attribute data;
Each entry is inserted into an object attribute table.
For example, an item object defines four attributes (i.e., a target object attribute list): the goods id, the goods name, the goods owner id, the goods owner name. And respectively generating an item object attribute record according to the item object identification data a194962 and each target object attribute data, wherein the generated target object attribute record is shown in a table 2.
TABLE 2
As an implementation manner, the first embodiment of the present application may further include:
Receiving a data insertion request for an object; the data insertion request includes target data and the target object identification data;
And generating a target data record according to the target data and the target object identification data, and inserting the target data record into a data table.
As shown in fig. 2, data is a Data table.
In a specific implementation, after a user creates a target object, data is generally written into the target object, a client sends a data insertion request for the object, and a database server receives the data insertion request for the object and inserts the target data into a data table.
The data records in the data sheet can be written with jsonb or json (JavaScript Object Notation, json object profile) data types. Table 3 is an example of a data table.
TABLE 3 Table 3
As can be seen from table 3, the data field contains only a few fields, which saves significantly memory space compared to 500 columns of the prior art.
As an implementation manner, the first embodiment of the present application may further include:
receiving an index insertion request for an index table; the index insertion request comprises index data and target object identification data;
And generating an index record according to the index data and the target object identification data, and inserting the index record into an index table.
The index data may include: index names; an index column; target object identification data; index attribute data; wherein the index attribute data is data for identifying whether it is a unique index.
As in FIG. 2, indexes are the index table.
Still using the previous example, the unique index (uk_1) index field scitemId is added for the item object Scitem; non-unique index (index_1) index fields scItemId, supplierId are added to the sales plan object SALESPALN. As shown in table 4.
TABLE 4 Table 4
As an implementation manner, the first embodiment of the present application may further include:
receiving a relationship insertion request for a relationship table; the relation insertion request comprises target object identification data, second object identification data and an associated field; the second object identification data is identification data of an object establishing a relation with the target object;
generating a relation record according to the relation insertion request and the object identification data, and inserting the relation record into a relation table.
By establishing the relation table among the objects, the objects with the association relation can be updated and deleted conveniently.
The relationship table refers to a table for storing relationships between objects. As shown in FIG. 2, the datarelationships are a relational table.
For example, the above example is still followed if the sales plan object and the object of the item are in a many-to-one relationship. The relationship table is shown in table 5.
TABLE 5
After the object definition table, the object attribute table, the data table, the index table and the relationship table are established, users often need to perform operations such as adding, deleting, changing, checking and the like on the target object. When a user needs to operate on a target object, all target objects created by the user can be queried first.
As an implementation manner, the first embodiment of the present application may further include:
Receiving an object query request for querying a list of target objects of a user; the object query request comprises identification information of a user;
Inquiring a target object of a user from an object definition table according to the object inquiry request;
generating a list of target objects according to the inquired target objects;
Transmitting the list of the target objects to a client; the list of the target objects comprises target object identification data and target object names.
After the user queries the own target object list, when the target object attribute needs to be added, the target object identification data can be put into the attribute adding request, and the server inserts the second target object attribute (namely, the target object attribute to be added) into the object attribute list according to the target object identification data.
As an implementation manner, the first embodiment of the present application may further include:
Receiving an attribute adding request for adding the attribute of the target object; the attribute adding request comprises second target object attribute data and target object identification data;
generating a second target object attribute record according to the attribute adding request;
and inserting the second target object attribute record into an object attribute table.
After the user queries the own list of the target objects, when the data needs to be queried, the target object identification data can be put into a data query request, and the server queries the target data from the data table according to the target object identification data.
As an implementation manner, the first embodiment of the present application may further include:
Receiving a data query request for querying data; the data query request comprises target object identification data;
Inquiring target data from a data table according to the data inquiry request;
And sending the target data to a client.
The second embodiment of the present application also provides a data processing apparatus corresponding to the data processing method provided in the first embodiment of the present application.
As shown in fig. 3, the data processing apparatus includes:
A creation request receiving unit 301 for receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
A target object record inserting unit 302, configured to generate a target object record according to the target object name, and insert the target object record into an object definition table;
A target object attribute record inserting unit 303, configured to generate a target object attribute record according to the target object attribute data, and insert the target object attribute record into an object attribute table.
Optionally, the creating request further includes: identification information of the user;
the target object record insertion unit is specifically configured to:
And generating a target object record according to the target object name and the identification information of the user, and inserting the target object record into an object definition table.
Optionally, the apparatus further includes:
and the target object identification data generation unit is used for generating target object identification data corresponding to the target object name when the target object record is inserted into the object definition table.
Optionally, the target object attribute record inserting unit is specifically configured to:
generating a target object attribute record according to the target object attribute data and the target object identification data;
And inserting the target object attribute record into an object attribute table.
Optionally, the target object attribute data is a target object attribute list; the target object attribute record insertion unit is specifically configured to:
traversing the target object attribute list to obtain each target object attribute data in the target object attribute list;
generating a target object attribute record according to the target object identification data and each target object attribute data;
Each entry is inserted into an object attribute table.
Optionally, the apparatus further includes:
a data insertion request receiving unit for receiving a data insertion request for an object; the data insertion request includes target data and the target object identification data;
and the target data record inserting unit is used for generating a target data record according to the target data and the target object identification data and inserting the target data record into a data table.
Optionally, the apparatus further includes:
An index insertion request receiving unit configured to receive an index insertion request for an index table; the index insertion request comprises index data and target object identification data;
and the index record inserting unit is used for generating an index record according to the index data and the target object identification data and inserting the index record into an index table.
Optionally, the index data includes: index names; an index column; target object identification data; index attribute data; wherein the index attribute data is data for identifying whether it is a unique index.
Optionally, the apparatus further includes:
A relationship insertion request receiving unit configured to receive a relationship insertion request for a relationship table; the relation insertion request comprises target object identification data, second object identification data and an associated field; the second object identification data is identification data of an object establishing a relation with the target object;
and the relation record inserting unit is used for generating a relation record according to the relation inserting request and the object identification data and inserting the relation record into a relation table.
Optionally, the apparatus further includes:
An object query request unit for receiving an object query request for querying a list of target objects of a user; the object query request comprises identification information of a user;
The target object inquiring unit is used for inquiring a target object of the user from the object definition table according to the object inquiring request;
a target object list generating unit, configured to generate a target object list according to the queried target object;
a list sending unit of a target object, configured to send the list of the target object to a client; the list of the target objects comprises target object identification data and target object names.
Optionally, the apparatus further includes:
an attribute adding request unit for receiving an attribute adding request for adding the attribute of the target object; the attribute adding request comprises second target object attribute data and target object identification data;
a second target object attribute record generating unit, configured to generate a second target object attribute record according to the attribute adding request;
And the second target object attribute record inserting unit is used for inserting the second target object attribute record into the object attribute table.
Optionally, the apparatus further includes:
A data query request receiving unit for receiving a data query request for querying data; the data query request comprises target object identification data;
the target data query unit is used for querying target data from the data table according to the data query request;
And the target data sending unit is used for sending the target data to the client.
It should be noted that, for the detailed description of the apparatus provided in the second embodiment of the present application, reference may be made to the description related to the first embodiment of the present application, which is not repeated here.
Corresponding to the data processing method provided in the first embodiment of the present application, the third embodiment of the present application further provides an electronic device.
As shown in fig. 4, the electronic device includes:
A processor 401; and
A memory 402 for storing a program of a data processing method, the apparatus, after powering on and running the program of the data processing method by the processor, performs the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
And generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table.
Optionally, the creating request further includes: identification information of the user;
The generating a target object record according to the target object name, and inserting the target object record into an object definition table includes:
And generating a target object record according to the target object name and the identification information of the user, and inserting the target object record into an object definition table.
Optionally, the electronic device further performs the following steps:
And when the target object record is inserted into the object definition table, generating target object identification data corresponding to the target object name.
Optionally, the generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table includes:
generating a target object attribute record according to the target object attribute data and the target object identification data;
And inserting the target object attribute record into an object attribute table.
Optionally, the target object attribute data is a target object attribute list; the generating a target object attribute record according to the target object attribute data and the target object identification data includes:
traversing the target object attribute list to obtain each target object attribute data in the target object attribute list;
generating a target object attribute record according to the target object identification data and each target object attribute data;
Each entry is inserted into an object attribute table.
Optionally, the electronic device further performs the following steps:
Receiving a data insertion request for an object; the data insertion request includes target data and the target object identification data;
And generating a target data record according to the target data and the target object identification data, and inserting the target data record into a data table.
Optionally, the electronic device further performs the following steps:
receiving an index insertion request for an index table; the index insertion request comprises index data and target object identification data;
And generating an index record according to the index data and the target object identification data, and inserting the index record into an index table.
Optionally, the index data includes: index names; an index column; target object identification data; index attribute data; wherein the index attribute data is data for identifying whether it is a unique index.
Optionally, the electronic device further performs the following steps:
receiving a relationship insertion request for a relationship table; the relation insertion request comprises target object identification data, second object identification data and an associated field; the second object identification data is identification data of an object establishing a relation with the target object;
generating a relation record according to the relation insertion request and the object identification data, and inserting the relation record into a relation table.
Optionally, the electronic device further performs the following steps:
Receiving an object query request for querying a list of target objects of a user; the object query request comprises identification information of a user;
Inquiring a target object of a user from an object definition table according to the object inquiry request;
generating a list of target objects according to the inquired target objects;
Transmitting the list of the target objects to a client; the list of the target objects comprises target object identification data and target object names.
Optionally, the electronic device further performs the following steps:
Receiving an attribute adding request for adding the attribute of the target object; the attribute adding request comprises second target object attribute data and target object identification data;
generating a second target object attribute record according to the attribute adding request;
and inserting the second target object attribute record into an object attribute table.
Optionally, the electronic device further performs the following steps:
Receiving a data query request for querying data; the data query request comprises target object identification data;
Inquiring target data from a data table according to the data inquiry request;
And sending the target data to a client.
It should be noted that, for the detailed description of the electronic device provided in the third embodiment of the present application, reference may be made to the description related to the first embodiment of the present application, which is not repeated here.
The fourth embodiment of the present application also provides a storage device storing a program of the data processing method, which is executed by a processor, for executing the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
And generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table.
It should be noted that, for the detailed description of the storage device provided in the fourth embodiment of the present application, reference may be made to the description related to the first embodiment of the present application, which is not repeated here.
The application can be applied to a supply chain scene, comprising data management of a plurality of entities of manufacturers, carriers, sellers, warehouses, commodities and customers.
A fifth embodiment of the present application provides a data processing method, including:
receiving a creation request for creating a producer object; the creation request includes: target producer object name, target producer object attribute data; the target producer object attribute data comprises a name of a target producer object attribute and a type of the target producer object attribute;
Generating a target producer object record according to the target producer object name, and inserting the target producer object record into an object definition table;
And generating a target producer object attribute record according to the target producer object attribute data, and inserting the target producer object attribute record into an object attribute table.
A sixth embodiment of the present application provides a data processing method, including:
Receiving a creation request for creating a carrier object; the creation request includes: target carrier object name, target carrier object attribute data; the target carrier object attribute data comprises a name of a target carrier object attribute and a type of the target carrier object attribute;
Generating a target carrier object record according to the target carrier object name, and inserting the target carrier object record into a carrier object definition table;
And generating a target carrier object attribute record according to the target carrier object attribute data, and inserting the target carrier object attribute record into a carrier object attribute table.
A seventh embodiment of the present application provides a data processing method, including:
Receiving a creation request for creating a vendor object; the creation request includes: target vendor object name, target vendor object attribute data; the target vendor object attribute data comprises a name of a target vendor object attribute and a type of the target vendor object attribute;
Generating a target vendor object record according to the target vendor object name, and inserting the target vendor object record into a vendor object definition table;
and generating a target vendor object attribute record according to the target vendor object attribute data, and inserting the target vendor object attribute record into a vendor object attribute table.
An eighth embodiment of the present application provides a data processing method, including:
Receiving a creation request for creating a warehouse object; the creation request includes: target warehouse object name, target warehouse object attribute data; the target warehouse object attribute data comprises names of target warehouse object attributes and types of the target warehouse object attributes;
Generating a target warehouse object record according to the target warehouse object name, and inserting the target warehouse object record into a warehouse object definition table;
And generating a target warehouse object attribute record according to the target warehouse object attribute data, and inserting the target warehouse object attribute record into a warehouse object attribute table.
A ninth embodiment of the present application provides a data processing method, including:
receiving a creation request for creating a commodity object; the creation request includes: target commodity object name, target commodity object attribute data; the target commodity object attribute data comprises a name of a target commodity object attribute and a type of the target commodity object attribute;
Generating a target commodity object record according to the target commodity object name, and inserting the target commodity object record into an object definition table;
And generating a target commodity object attribute record according to the target commodity object attribute data, and inserting the target commodity object attribute record into an object attribute table.
A tenth embodiment of the present application provides a data processing method, including:
receiving a creation request for creating a customer object; the creation request includes: target customer object name, target customer object attribute data; the target customer object attribute data comprises a name of a target customer object attribute and a type of the target customer object attribute;
generating a target customer object record according to the target customer object name, and inserting the target customer object record into an object definition table;
And generating a target customer object attribute record according to the target customer object attribute data, and inserting the target customer object attribute record into an object attribute table.
It should be noted that, the detailed descriptions of the fifth to tenth embodiments of the present application may refer to the related descriptions of the first embodiment of the present application, and are not repeated here.
While the application has been described in terms of preferred embodiments, it is not intended to be limiting, but rather, it will be apparent to those skilled in the art that various changes and modifications can be made herein without departing from the spirit and scope of the application as defined by the appended claims.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include non-transitory computer readable media (transmission media), such as modulated data signals and carrier waves.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Claims (21)
1. A method of data processing, comprising:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
Generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target object, and generating a second target object attribute record according to the attribute adding request; and inserting the second target object attribute record into an object attribute table.
2. The method of claim 1, wherein the creating request further comprises: identification information of the user;
The generating a target object record according to the target object name, and inserting the target object record into an object definition table includes:
And generating a target object record according to the target object name and the identification information of the user, and inserting the target object record into an object definition table.
3. The method as recited in claim 2, further comprising:
And when the target object record is inserted into the object definition table, generating target object identification data corresponding to the target object name.
4. A method according to claim 3, wherein generating a target object property record from the target object property data and inserting the target object property record into an object property table comprises:
generating a target object attribute record according to the target object attribute data and the target object identification data;
And inserting the target object attribute record into an object attribute table.
5. The method of claim 4, wherein the target object attribute data is a target object attribute list; the generating a target object attribute record according to the target object attribute data and the target object identification data includes:
traversing the target object attribute list to obtain each target object attribute data in the target object attribute list;
generating a target object attribute record according to the target object identification data and each target object attribute data;
Each entry is inserted into an object attribute table.
6. The method as recited in claim 5, further comprising:
Receiving a data insertion request for an object; the data insertion request includes target data and the target object identification data;
And generating a target data record according to the target data and the target object identification data, and inserting the target data record into a data table.
7. The method as recited in claim 6, further comprising:
receiving an index insertion request for an index table; the index insertion request comprises index data and target object identification data;
And generating an index record according to the index data and the target object identification data, and inserting the index record into an index table.
8. The method of claim 7, wherein the index data comprises: index names; an index column; target object identification data; index attribute data; wherein the index attribute data is data for identifying whether it is a unique index.
9. The method as recited in claim 8, further comprising:
receiving a relationship insertion request for a relationship table; the relation insertion request comprises target object identification data, second object identification data and an associated field; the second object identification data is identification data of an object establishing a relation with the target object;
generating a relation record according to the relation insertion request and the object identification data, and inserting the relation record into a relation table.
10. A method according to claim 3, further comprising:
Receiving an object query request for querying a list of target objects of a user; the object query request comprises identification information of a user;
Inquiring a target object of a user from an object definition table according to the object inquiry request;
generating a list of target objects according to the inquired target objects;
Transmitting the list of the target objects to a client; the list of the target objects comprises target object identification data and target object names.
11. The method as recited in claim 1, further comprising:
The attribute adding request comprises second target object attribute data and target object identification data.
12. The method as recited in claim 6, further comprising:
Receiving a data query request for querying data; the data query request comprises target object identification data;
Inquiring target data from a data table according to the data inquiry request;
And sending the target data to a client.
13. A data processing apparatus, comprising:
a creation request receiving unit for receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
A target object record inserting unit, configured to generate a target object record according to the target object name, and insert the target object record into an object definition table;
A target object attribute record insertion unit, configured to generate a target object attribute record according to the target object attribute data, and insert the target object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target object, and generating a second target object attribute record according to the attribute adding request; and inserting the second target object attribute record into an object attribute table.
14. An electronic device, comprising:
A processor; and
A memory for storing a program of a data processing method, the apparatus, after powering on and running the program of the data processing method by the processor, performing the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
Generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target object, and generating a second target object attribute record according to the attribute adding request; and inserting the second target object attribute record into an object attribute table.
15. A storage device storing a program of a data processing method, the program being executed by a processor to perform the steps of:
receiving a creation request for creating an object; the creation request includes: target object name, target object attribute data; the target object attribute data comprises a name of a target object attribute and a type of the target object attribute;
Generating a target object record according to the target object name, and inserting the target object record into an object definition table;
Generating a target object attribute record according to the target object attribute data, and inserting the target object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target object, and generating a second target object attribute record according to the attribute adding request; and inserting the second target object attribute record into an object attribute table.
16. A method of data processing, comprising:
receiving a creation request for creating a producer object; the creation request includes: target producer object name, target producer object attribute data; the target producer object attribute data comprises a name of a target producer object attribute and a type of the target producer object attribute;
Generating a target producer object record according to the target producer object name, and inserting the target producer object record into an object definition table;
Generating a target producer object attribute record according to the target producer object attribute data, and inserting the target producer object attribute record into an object attribute table;
receiving an attribute adding request for adding the object attribute of the target producer, and generating a second object attribute record according to the attribute adding request; and inserting the second target producer object attribute record into an object attribute table.
17. A method of data processing, comprising:
Receiving a creation request for creating a carrier object; the creation request includes: target carrier object name, target carrier object attribute data; the target carrier object attribute data comprises a name of a target carrier object attribute and a type of the target carrier object attribute;
Generating a target carrier object record according to the target carrier object name, and inserting the target carrier object record into an object definition table;
generating a target carrier object attribute record according to the target carrier object attribute data, and inserting the target carrier object attribute record into an object attribute table;
Receiving an attribute adding request for adding the object attribute of the target carrier, and generating a second object attribute record of the target carrier according to the attribute adding request; and inserting the second target carrier object attribute record into an object attribute table.
18. A method of data processing, comprising:
Receiving a creation request for creating a vendor object; the creation request includes: target vendor object name, target vendor object attribute data; the target vendor object attribute data comprises a name of a target vendor object attribute and a type of the target vendor object attribute;
generating a target vendor object record according to the target vendor object name, and inserting the target vendor object record into an object definition table;
Generating a target vendor object attribute record according to the target vendor object attribute data, and inserting the target vendor object attribute record into an object attribute table;
Receiving an attribute adding request for adding the object attribute of the target vendor, and generating a second object attribute record of the target vendor according to the attribute adding request; and inserting the second target vendor object attribute record into an object attribute table.
19. A method of data processing, comprising:
Receiving a creation request for creating a warehouse object; the creation request includes: target warehouse object name, target warehouse object attribute data; the target warehouse object attribute data comprises names of target warehouse object attributes and types of the target warehouse object attributes;
Generating a target warehouse object record according to the target warehouse object name, and inserting the target warehouse object record into an object definition table;
generating a target warehouse object attribute record according to the target warehouse object attribute data, and inserting the target warehouse object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target warehouse object, and generating a second target warehouse object attribute record according to the attribute adding request; and inserting the second target warehouse object attribute record into an object attribute table.
20. A method of data processing, comprising:
receiving a creation request for creating a commodity object; the creation request includes: target commodity object name, target commodity object attribute data; the target commodity object attribute data comprises a name of a target commodity object attribute and a type of the target commodity object attribute;
Generating a target commodity object record according to the target commodity object name, and inserting the target commodity object record into an object definition table;
Generating a target commodity object attribute record according to the target commodity object attribute data, and inserting the target commodity object attribute record into an object attribute table;
Receiving an attribute adding request for adding the attribute of the target commodity object, and generating a second target commodity object attribute record according to the attribute adding request; and inserting the second target commodity object attribute record into an object attribute table.
21. A method of data processing, comprising:
receiving a creation request for creating a customer object; the creation request includes: target customer object name, target customer object attribute data; the target customer object attribute data comprises a name of a target customer object attribute and a type of the target customer object attribute;
generating a target customer object record according to the target customer object name, and inserting the target customer object record into an object definition table;
Generating a target commodity object attribute record according to the target customer object attribute data, and inserting the target commodity object attribute record into an object attribute table;
Receiving an attribute adding request for adding the object attribute of the target customer, and generating a second object attribute record according to the attribute adding request; and inserting the second target customer object attribute record into an object attribute table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010855874.0A CN113297207B (en) | 2020-08-24 | 2020-08-24 | Data processing method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010855874.0A CN113297207B (en) | 2020-08-24 | 2020-08-24 | Data processing method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113297207A CN113297207A (en) | 2021-08-24 |
CN113297207B true CN113297207B (en) | 2024-06-07 |
Family
ID=77318324
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010855874.0A Active CN113297207B (en) | 2020-08-24 | 2020-08-24 | Data processing method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113297207B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6735584B1 (en) * | 1998-05-29 | 2004-05-11 | Bridgewell, Inc. | Accessing a database using user-defined attributes |
CN102567418A (en) * | 2010-12-23 | 2012-07-11 | 北大方正集团有限公司 | Methods and devices for integrating and searching data |
CN103853759A (en) * | 2012-12-03 | 2014-06-11 | 方正国际软件(北京)有限公司 | Self-adaptive form generation method and self-adaptive form generation system |
CN105320675A (en) * | 2014-07-03 | 2016-02-10 | 南京中兴力维软件有限公司 | Database application system attribute extension management method and device |
CN105488366A (en) * | 2014-10-13 | 2016-04-13 | 阿里巴巴集团控股有限公司 | Data permission control method and system |
CN110799961A (en) * | 2017-06-27 | 2020-02-14 | 易享信息技术有限公司 | System and method for creating and deleting tenants in database |
CN111177776A (en) * | 2019-12-20 | 2020-05-19 | 平安资产管理有限责任公司 | Multi-tenant data isolation method and system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030154197A1 (en) * | 2002-02-13 | 2003-08-14 | Permutta Technologies | Flexible relational data storage method and apparatus |
US8150850B2 (en) * | 2008-01-07 | 2012-04-03 | Akiban Technologies, Inc. | Multiple dimensioned database architecture |
-
2020
- 2020-08-24 CN CN202010855874.0A patent/CN113297207B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6735584B1 (en) * | 1998-05-29 | 2004-05-11 | Bridgewell, Inc. | Accessing a database using user-defined attributes |
CN102567418A (en) * | 2010-12-23 | 2012-07-11 | 北大方正集团有限公司 | Methods and devices for integrating and searching data |
CN103853759A (en) * | 2012-12-03 | 2014-06-11 | 方正国际软件(北京)有限公司 | Self-adaptive form generation method and self-adaptive form generation system |
CN105320675A (en) * | 2014-07-03 | 2016-02-10 | 南京中兴力维软件有限公司 | Database application system attribute extension management method and device |
CN105488366A (en) * | 2014-10-13 | 2016-04-13 | 阿里巴巴集团控股有限公司 | Data permission control method and system |
CN110799961A (en) * | 2017-06-27 | 2020-02-14 | 易享信息技术有限公司 | System and method for creating and deleting tenants in database |
CN111177776A (en) * | 2019-12-20 | 2020-05-19 | 平安资产管理有限责任公司 | Multi-tenant data isolation method and system |
Non-Patent Citations (1)
Title |
---|
基于地块的时态地籍数据库数据结构的研究;詹长根;张雁;;测绘科学(02);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113297207A (en) | 2021-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11176132B2 (en) | Processing database queries using format conversion | |
US20150205885A1 (en) | CREATING NoSQL DATABASE INDEX FOR SEMI-STRUCTURED DATA | |
US20110004638A1 (en) | Attributed key-value-store database system | |
US20150347484A1 (en) | Combining row based and column based tables to form mixed-mode tables | |
CN102509012A (en) | Method for mapping contents of electronic medical record into electronic medical record standard database | |
WO2006046669A1 (en) | Database management device, method and program | |
US11567999B2 (en) | Using a B-tree to store graph information in a database | |
US7624117B2 (en) | Complex data assembly identifier thesaurus | |
CN113157692B (en) | Relational memory database system | |
CN102193990A (en) | Pattern database and realization method thereof | |
US10360232B2 (en) | Semantic mapping of data from an entity-relationship model to a graph-based data format to facilitate simplified querying | |
US7908243B2 (en) | Considering transient data also in reports generated based on data eventually stored in a data-warehouse | |
US20180300362A1 (en) | Dimension data insertion into a dimension table | |
CN101261639B (en) | Sharing of database objects | |
CN113297207B (en) | Data processing method, device and equipment | |
US20090198643A1 (en) | Apparatus and method for utilizing density metadata to process multi-dimensional data | |
US11086901B2 (en) | Method and system for efficient data replication in big data environment | |
CN108241624A (en) | The generation method and device of a kind of query script | |
Jin et al. | An incremental maintenance scheme of data cubes | |
US8626746B2 (en) | Tracking modifications to values of various fields in a database serve | |
CN110609926A (en) | Data tag storage management method and device | |
CN111459949A (en) | Data processing method, device and equipment for database and index updating method | |
CN109063167A (en) | A kind of unstructured finance data storage method | |
US12105828B2 (en) | Grant inheritance in RBAC | |
Engle et al. | The Case for NoSQL on a Single Desktop |
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 |