CN108121784A - The design method of data structure Custom Attributes - Google Patents
The design method of data structure Custom Attributes Download PDFInfo
- Publication number
- CN108121784A CN108121784A CN201711372452.2A CN201711372452A CN108121784A CN 108121784 A CN108121784 A CN 108121784A CN 201711372452 A CN201711372452 A CN 201711372452A CN 108121784 A CN108121784 A CN 108121784A
- Authority
- CN
- China
- Prior art keywords
- data structure
- custom attributes
- design method
- data
- attributes
- 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
Links
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/21—Design, administration or maintenance of databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
- G06F8/24—Object-oriented
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention relates to Data Structure Designs, and it discloses a kind of design method of data structure Custom Attributes, it is low, difficult in maintenance that development efficiency existing for each analysis one data structure of design is adopted as in solution traditional technology;And the problem of business demand cannot be met using unified data structure.This method includes:A. project Collection data structures are defined;B. Custom Attributes data structure is defined;C. associated item set and Custom Attributes;D. the data structure of basic data is defined, stores corresponding Custom Attributes set.It is self-defined that the present invention is suitable for item data structure.
Description
Technical field
The present invention relates to Data Structure Designs, and in particular to a kind of design method of data structure Custom Attributes.
Background technology
At present, enhance with the flexibility of business, more and more clients have data structure customization demand, even
Each subitem is required for a unique data structure under same project, if each subitem one data knot of design
Structure, low, the repeatable utilization rate of such mechanical development efficiency is low, later maintenance is difficult.And if using unified data structure, with
Business demand is not well positioned to meet toward fixed data structure again.Particularly, project progress during, to data structure into
Row changes, and the structure that can cause new legacy data is inconsistent, causes confusion.
The content of the invention
The technical problems to be solved by the invention are:It proposes a kind of design method of data structure Custom Attributes, solves
It is low, difficult in maintenance that development efficiency existing for each analysis one data structure of design is adopted as in traditional technology;And it uses
Unified data structure cannot meet the problem of business demand.
The present invention solve above-mentioned technical problem the technical solution adopted is that:
The design method of data structure Custom Attributes, comprises the following steps:
A. project Collection data structures are defined;
B. Custom Attributes data structure is defined;
C. associated item set and Custom Attributes;
D. the data structure of basic data is defined, stores corresponding Custom Attributes set.
Optimize as further, in step a, the general character in project set is extracted as fixed properties of data structures.
Optimize as further, in step c, the Custom Attributes is set using name+unit as Candidate Key with project set
It is set to multi-to-multi correspondence.
Optimize as further, in step d, its corresponding Custom Attributes set is stored with text.
Optimizing as further, in step d, the Custom Attributes collection is stored by dict structures, and key is attribute id,
Value is property value;When being stored in basic data structural database list, character string is turned to by json sequences and is stored.
As further optimization, this method further includes step:
E. by rewriteeing parsing and operation of the skeleton code realization to Custom Attributes.
The beneficial effects of the invention are as follows:
By defining the data structure of Custom Attributes, and the correspondence for being arranged to multi-to-multi is combined with project, and profit
With the corresponding Custom Attributes set of the data structure storage of basic data;It is realized by rewriteeing skeleton code to Custom Attributes
Parsing and operation, change number so as to provide under the premise of runtime code is not changed dynamically addition for system user
According to the function of Custom Attributes.
Specific embodiment
The present invention is directed to propose a kind of design method of data structure Custom Attributes, solves to be adopted as in traditional technology every
Development efficiency existing for one analysis one data structure of design is low, difficult in maintenance;And use unified data structure cannot
The problem of meeting business demand.
In specific implementation, the design method of the data structure Custom Attributes in the present invention comprises the following steps:
1. define project Collection data structures;
In this step, the general character in project set is extracted as fixed properties of data structures;
2. define Custom Attributes data structure;
In this step, it is contemplated that Custom Attributes it is changeable, devise the data structure of Custom Attributes, Custom Attributes
Data structure it is as shown in table 1:
Table 1:The data structure of Custom Attributes
Title | Type | Remarks |
Id | Int | Major key |
Name | Varchar | Property Name |
Type | Varchar | Attribute type |
Unit_type | Varchar | Measurement unit type |
Unit | Varchar | Measurement unit |
Description | Varchar | Description |
Is_active | Tinyint | Whether can use |
Add_time | Datetime | Add the time |
3. associated item set and Custom Attributes;
In this step, Custom Attributes using name+unit as Candidate Key, with project set be arranged to multi-to-multi it is corresponding close
System.
Wherein, the incidence relation of project set and Custom Attributes is as shown in table 2 below:
Table 2:The incidence relation table of project set and Custom Attributes
Title | Type | Remarks |
Id | Int | Major key |
Collection_id | Int | External key is directed toward project set |
Attribute_id | Int | External key is directed toward Custom Attributes |
4. defining the data structure of basic data, corresponding Custom Attributes set is stored.
In this step, the data structure of basic data is as shown in table 3 below:
Table 3:The data structure table of basic data
Title | Type | Remarks |
Id | Int | Major key |
…… | …… | The attribute determined by business demand |
Attributes | Text | Custom Attributes collection |
The storage of Custom Attributes:
Because with the data structure of oneself and corresponding database table, Custom Attributes can be found only by id
One corresponding attribute, therefore, Custom Attributes collection is stored by dict structures, and key is property value for attribute id, value;It is being stored in
During basic data structural database list, character string is turned to by json sequences and is stored.
Method returns:Treated series data list and treated label data list;
The parsing of Custom Attributes:
Custom Attributes belongs to each basic data itself, and project determines parsing wherein which attribute.
Based on Django+Rest frame structures, serializers.ModelSerializer classes, optimized integration number are inherited
According to parsing class DataSerializer, primary attribute parses by the mode that frame provides, and the parsing of Custom Attributes needs weight
Write to_representation methods;In the data got in front end, Custom Attributes is resolved at the same level with primary attribute
, with the attribute that " attribute-name (measurement unit) " is key.
The operation of Custom Attributes --- conditional filtering:
Since by parsing, the Custom Attributes collection that front end receiver arrives is { " attribute 1 (unit 1) ":" value 1 ", " attribute 2
(unit 2) ":Value 2 } structure, when user needs to carry out screening operation with this, the attribute key of submission is also " 1 (unit of attribute
1) " form, therefore backstage needs to parse this form.After being parsed on backstage, " attribute 1 (unit 1) " structure can be turned
It is changed to " id " structures, with being consistent in basic data.
Claims (6)
1. the design method of data structure Custom Attributes, which is characterized in that comprise the following steps:
A. project Collection data structures are defined;
B. Custom Attributes data structure is defined;
C. associated item set and Custom Attributes;
D. the data structure of basic data is defined, stores corresponding Custom Attributes set.
2. the design method of data structure Custom Attributes as described in claim 1, which is characterized in that in step a, by project
General character in set is extracted as fixed properties of data structures.
3. the design method of data structure Custom Attributes as described in claim 1, which is characterized in that in step c, it is described from
Defined attribute is arranged to multi-to-multi correspondence using name+unit as Candidate Key, with project set.
4. the design method of data structure Custom Attributes as described in claim 1, which is characterized in that in step d, with text
Store its corresponding Custom Attributes set.
5. the design method of data structure Custom Attributes as described in claim 1, which is characterized in that in step d, it is described from
Defined attribute collection is stored by dict structures, and key is property value for attribute id, value;In deposit basic data structural database
During list, character string is turned to by json sequences and is stored.
6. the design method of the data structure Custom Attributes as described in claim 1-5 any one, which is characterized in that the party
Method further includes step:E. by rewriteeing parsing and operation of the skeleton code realization to Custom Attributes.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711372452.2A CN108121784A (en) | 2017-12-15 | 2017-12-15 | The design method of data structure Custom Attributes |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711372452.2A CN108121784A (en) | 2017-12-15 | 2017-12-15 | The design method of data structure Custom Attributes |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108121784A true CN108121784A (en) | 2018-06-05 |
Family
ID=62229356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711372452.2A Pending CN108121784A (en) | 2017-12-15 | 2017-12-15 | The design method of data structure Custom Attributes |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108121784A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1773453A (en) * | 2004-11-10 | 2006-05-17 | 东软集团有限公司 | System constituting method based on data definition |
CN102436462A (en) * | 2011-08-25 | 2012-05-02 | 华南理工大学 | Fuzzy ontology description module supporting custom data type |
US20170322732A1 (en) * | 2016-05-04 | 2017-11-09 | Nasdaq Technology Ab | Computer systems and methods for implementing in-memory data structures |
-
2017
- 2017-12-15 CN CN201711372452.2A patent/CN108121784A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1773453A (en) * | 2004-11-10 | 2006-05-17 | 东软集团有限公司 | System constituting method based on data definition |
CN102436462A (en) * | 2011-08-25 | 2012-05-02 | 华南理工大学 | Fuzzy ontology description module supporting custom data type |
US20170322732A1 (en) * | 2016-05-04 | 2017-11-09 | Nasdaq Technology Ab | Computer systems and methods for implementing in-memory data structures |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106528129B (en) | A kind of Web application interface generation system and method | |
CN103856392B (en) | Message push method, outgoing server using message push method and outgoing server system | |
CN104572122B (en) | A kind of generating means and method of software application data | |
CN108647330A (en) | A kind of 3D lightweight conversion methods based on BIM model files | |
CN107092625A (en) | data configuration method, data processing method and device | |
CN101714157A (en) | Method, device and heterogeneous database system for generating heterogeneous database report | |
CN106341444A (en) | Data access method and device | |
CN111124405A (en) | Method and system for realizing online form design supporting front-end and back-end decoupling | |
CN102298740A (en) | Business process management supporting method | |
CN103399934A (en) | Form data transmission and storage method | |
CN108388572A (en) | A kind of user's portrait access method | |
CN104951565B (en) | XM (extensible messaging client) L (extensible markup language) configuration maintenance method and system based on memory database | |
CN106960274A (en) | A kind of fault ticket processing system and method | |
CN108256820A (en) | A kind of PBOM methods of adjustment under three-dimensional assembled view based on MBD | |
EP2662781A2 (en) | Entity name variant generator | |
CN106599015A (en) | Data service management system and method | |
CN109445794A (en) | A kind of page building method and device | |
CN107729561A (en) | The method that the table handling of paired data storehouse is reversely given birth to based on database table structure | |
CN108121784A (en) | The design method of data structure Custom Attributes | |
CN103488642A (en) | Method and system for storing electronic table data as variable-dimension business intelligence data | |
CN102868746A (en) | Method for realizing mobile informationization | |
CN101771675B (en) | Method and device for implementing feature matching of data packet | |
CN107786661A (en) | Information synchronization method | |
CN105975286A (en) | Method and system for generating interface for man-machine interaction | |
CN107544953A (en) | XBRL data acquisitions and display systems based on jqGrid |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180605 |