CN105740414A - Database-based self-described data model structure - Google Patents

Database-based self-described data model structure Download PDF

Info

Publication number
CN105740414A
CN105740414A CN201610064819.3A CN201610064819A CN105740414A CN 105740414 A CN105740414 A CN 105740414A CN 201610064819 A CN201610064819 A CN 201610064819A CN 105740414 A CN105740414 A CN 105740414A
Authority
CN
China
Prior art keywords
data model
data
self
model
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.)
Pending
Application number
CN201610064819.3A
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.)
Shandong Luneng Intelligence Technology Co Ltd
Original Assignee
Shandong Luneng Intelligence 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 Shandong Luneng Intelligence Technology Co Ltd filed Critical Shandong Luneng Intelligence Technology Co Ltd
Priority to CN201610064819.3A priority Critical patent/CN105740414A/en
Publication of CN105740414A publication Critical patent/CN105740414A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • G06F16/212Schema design and management with details for data modelling support

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a database-based self-described data model structure. The database-based self-described data model structure comprises a self-described data model table, a data model access table and a data model class, wherein the self-described data model table and the data model access table are respectively established in a database; the data model class is created in a program; the self-described data model table at least comprises three important fields: a model type, a data model attribute and a data model incidence relation; the data model access table at least comprises two important fields: a data model type and a data model attribute; and the data model class comprises two important fields: a data model type and a data model access structure. The database-based self-described data model structure has the benefit of effectively isolating the influences, caused by the data model type change, on the database table structures and the program class structures, so as to reduce the database maintenance cost and the program maintenance cost caused by the data model change, and effectively improve the productivity of the software development.

Description

Self-description data model structure based on data base
Technical field
The present invention relates to database design technique field, be specifically related to a kind of self-description data model structure based on data base.
Background technology
Data model is the digitized simulation to material objects various in real world and substance feature and abstract, is define a kind of model how data input and export.Its Main Function is the definition and the form that provide data for information system.Data model is core and the basis of Database Systems, and existing Database Systems are all based on certain data model and set up.
Data base uses tables of data that data model is accessed, tables of data and data model one_to_one corresponding, the data attribute of the field corresponding data model in tables of data.
Program uses class that data model is operated, data class and data model one_to_one corresponding, the data attribute of the member variable corresponding data model of data class.
There is very strong dependence in the tables of data in data model and data base, the class example in program, data model changes, and tables of data and class example will be modified, and the cost that data model is changed is very high.
Summary of the invention
The purpose of the present invention is contemplated to solve the problems referred to above, propose a kind of self-description data model structure based on data base, this structure relieves data model and the strong dependence of database table, program class, effectively avoid data model change bring database table structure, program class realize change.
To achieve these goals, the present invention adopts the following technical scheme that
A kind of self-description data model structure based on data base, including:
The self-description data model table set up in data base respectively and data model access list, and create data model class in a program;
Described self-description data model table is for describing the information that data model stores in data base;
Described data model access list is for, based on the information of storage in self-description data model table, carrying out the access of data model example;
Described data model class is that a data model in program describes storage class, for data model being accessed and using;
Described self-description data model table is including at least types of models, data model attribute and three important fields of data model interaction relation;Described data model access list includes at least data model type and two significant fields of data model attributes value;Described data model class includes at least data model type and two important members of data model access structure.
Data model type field in described self-description data model table, for describing the type of data model, is the unique designation of data model.
Data model attribute field in described self-description data model table is for all properties of descriptive model, character string and special list separator is used to split between model attributes, describe realize newly-increased model data attribute by adding separator and model attributes, without extending database literary name section.
Each described data model attribute field includes again Property Name, attribute type, attribute default value content information, uses special symbol segmentation between above-mentioned data model property content information.
Described data model describes the data model incidence relation field in table by called data types of models field, describes the incidence relation between data model.
Data model type field in described data model access list is used for accessing data model type, and described data model type is corresponding with the data model type in self-description data model table.
Data model attribute value field in described data model access list, for accessing the value of all of data attribute of data model, uses special symbol segmentation between data model attribute.
Each described data model attribute value field includes: Property Name, property value, uses special symbol segmentation between Property Name and property value.
The data model type of described data model class deposits class example and the mapping of self-description data model table, data model access list for setting up data model;
Data model access structure is for accessing the data attribute of data model class example.
When carrying out data base data model extension, only need to data model describe table at least increases to extend data model type, data model attribute and and other data models between incidence relation field information, it is not necessary to change data model access list.
The invention has the beneficial effects as follows:
Self-description data design methods based on data base, effectively can change the impact on database table structure and program class formation by isolated data model, thus reducing database maintenance and the program maintenance cost that data model change brings, it is possible to the effective productivity ratio improving software development.
Accompanying drawing explanation
Fig. 1 is self-description data model structure schematic diagram of the present invention;
Fig. 2 is that self-description data model representation of the present invention is intended to;
Fig. 3 is data model access list schematic diagram of the present invention;
Fig. 4 is data model class schematic diagram of the present invention.
Detailed description of the invention:
Below in conjunction with accompanying drawing, the present invention will be further described with embodiment:
A kind of self-description data model structure based on data base, as it is shown in figure 1, include:
The self-description data model table set up in data base respectively and data model access list, and create data model class in a program;
Self-description data model table is for describing the information that data model stores in data base;Data model access list is for, based on the information of storage in self-description data model table, carrying out the access of data model example;Data model class is that a data model in program describes storage class, for data model being accessed and using.
Self-description data model table is including at least types of models, data model attribute and three important fields of data model interaction relation;Data model access list includes at least data model type and two significant fields of data model attributes value;Data model class includes at least data model type and two important members of data model access structure.
As in figure 2 it is shown,
Data model type field: for character string type, for describing the type of data model, is the unique designation of data model.
Data model incidence relation field: for character string type, by types of models, the relation between descriptive model.Such as model A is a router, and Model B is a computer, and B is a child node of A in a network, just can describe this filiation by data model incidence relation field.
Data model attribute field: for character string type, all properties of descriptive model, use between model attributes special symbol segmentation (such as ";"); all model attributes are placed in a data sheet field; describe with character string and special separator; can pass through interpolation separator and model attributes describes the purpose reaching to increase model data attribute without growth data literary name section, it is achieved thereby that the extension of the data model attribute when not changing database table structure.
Each model attributes field includes again the information such as Property Name, attribute type, attribute default value, model attributes content use equally special symbol segmentation (such as "; "), by separator these information are separated according to fixing form and be easy to resolve, it is achieved that the self-described function of model attributes.
Having had above-mentioned data model to describe table, the access in order to carry out data model also needs to create the data model access list of.As shown in Figure 3.
Data model describes the data model access list of table and includes data model type, two significant fields of data model data attribute value.
Data model type field: for character string type, is used for accessing data model type, sets up the mapping (association) of data model access list and self-description data model table.It is illustrated below:
1, data model describes table (being designated as Table A), and data model access list (is designated as table B)
Data model type field in table B and the types of models field in Table A, access is identical content, for setting up the mapping accessing data in Table A and table B.Such as, Table A comprises computer, the description of two kinds of models of phone, table B then needs the example of accessed computer and two kinds of typess of models of phone, in so actually used middle table B, model instance particularly belongs to which kind of types of models (computer or phone), how this types of models resolves, it is accomplished by the data model type field (computer or phone) of first inquiry table B, if computer, it is accomplished by inquiry Table A, data model type is the record of computer, then go to resolve the example in current table B according to the resolution rules of this record in Table A, including which attribute example has, the type of attribute be what etc..
Data model attribute value field: for character string type, the value of the access all of data attribute of data model, use between data model attribute special symbol segmentation (such as ";”).
Each described data model attribute value field includes: Property Name, property value, and data attribute and data property value use special symbol segmentation (such as ", ").Data model access list achieves the data model access facility that data model is unrelated.
Data model access list can access all of data model, thus unrelated with data model;Such as router above-mentioned, computer are stored in this table.
If you wish to add a mobile phone in data base, then you only need to describe in table at data model, describe mobile phone, in data model access list, then just can describe the description information of mobile phone in table according to data model, carry out the access of mobile model example.
As shown in Figure 4, data model class is used for data model being accessed and using, and this data model class includes data model type and two key members of data model access structure.
Data model type field, for character string type, indicates that the unique designation of data model.
Data model access structure field, for map type, by the mode Access Model attribute of key-value pair.
The data model type of data model class deposits class example and the mapping of self-description data model table, data model access list for setting up data model;Data model access structure is for accessing the data attribute of data model class example.
Data model access structure field achieves data model expanded function in a program.This field is map type, it is possible to understand that being shelf, you can only put a Fructus Mali pumilae herein above, it is also possible to continue to put pears, Fructus Citri tangerinae, Fructus Musae, bread, water tumbler, television set, milk powder;A lot of thing can be put in a word, and unrestricted.
By the data model table of above-mentioned self-described, data model access list and data model class, it is achieved that based on the design of the self-description data model of data base.
The specific embodiment of the present invention is described in conjunction with accompanying drawing although above-mentioned; but not limiting the scope of the invention; one of ordinary skill in the art should be understood that; on the basis of technical scheme, those skilled in the art need not pay various amendments or deformation that creative work can make still within protection scope of the present invention.

Claims (10)

1., based on the self-description data model structure of data base, it is characterized in that, including:
The self-description data model table set up in data base respectively and data model access list, and create data model class in a program;
Described self-description data model table is for describing the information that data model stores in data base;
Described data model access list is for, based on the information of storage in self-description data model table, carrying out the access of data model example;
Described data model class is that a data model in program describes storage class, for data model being accessed and using;
Described self-description data model table is including at least types of models, data model attribute and three important fields of data model interaction relation;Described data model access list includes at least data model type and two significant fields of data model attributes value;Described data model class includes at least data model type and two important members of data model access structure.
2. a kind of self-description data model structure based on data base as claimed in claim 1, is characterized in that, the data model type field in described self-description data model table, for describing the type of data model, is the unique designation of data model.
3. a kind of self-description data model structure based on data base as claimed in claim 1, it is characterized in that, data model attribute field in described self-description data model table is for all properties of descriptive model, character string and special list separator is used to split between model attributes, describe realize newly-increased model data attribute by adding separator and model attributes, without extending database literary name section.
4. a kind of self-description data model structure based on data base as claimed in claim 3, it is characterized in that, each described data model attribute field includes again Property Name, attribute type, attribute default value content information, uses special symbol segmentation between above-mentioned data model property content information.
5. a kind of self-description data model structure based on data base as claimed in claim 1, is characterized in that, described data model describes the data model incidence relation field in table by called data types of models field, describes the incidence relation between data model.
6. a kind of self-description data model structure based on data base as claimed in claim 1, it is characterized in that, data model type field in described data model access list is used for accessing data model type, and the data model type that described data model type describes with data model in table is corresponding.
7. a kind of self-description data model structure based on data base as claimed in claim 1, it is characterized in that, data model attribute value field in described data model access list, for accessing the value of all of data attribute of data model, uses special symbol segmentation between data model attribute.
8. a kind of self-description data model structure based on data base as claimed in claim 7, is characterized in that, each described data model attribute value field includes: Property Name, property value, uses special symbol segmentation between Property Name and property value.
9. a kind of self-description data model structure based on data base as claimed in claim 1, is characterized in that, the data model type of described data model class deposits class example and the mapping of self-description data model table, data model access list for setting up data model;
Data model access structure is for accessing the data attribute of data model class example.
10. a kind of self-description data model structure based on data base as claimed in claim 1, it is characterized in that, when carrying out data base data model extension, only need to data model describe table at least increases to extend data model type, data model attribute and and other data models between incidence relation field information, it is not necessary to change data model access list.
CN201610064819.3A 2016-01-29 2016-01-29 Database-based self-described data model structure Pending CN105740414A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610064819.3A CN105740414A (en) 2016-01-29 2016-01-29 Database-based self-described data model structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610064819.3A CN105740414A (en) 2016-01-29 2016-01-29 Database-based self-described data model structure

Publications (1)

Publication Number Publication Date
CN105740414A true CN105740414A (en) 2016-07-06

Family

ID=56248054

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610064819.3A Pending CN105740414A (en) 2016-01-29 2016-01-29 Database-based self-described data model structure

Country Status (1)

Country Link
CN (1) CN105740414A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376164A (en) * 2018-10-19 2019-02-22 深圳点猫科技有限公司 A kind of the lower coupling collecting method and electronic equipment of language based on programming
CN109542893A (en) * 2018-10-19 2019-03-29 深圳点猫科技有限公司 A kind of the compound data structure setting method and electronic equipment of language based on programming

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040117397A1 (en) * 2002-12-16 2004-06-17 Rappold Robert J Extensible database system and method
US6766326B1 (en) * 2000-07-24 2004-07-20 Resty M Cena Universal storage for dynamic databases
CN105144162A (en) * 2013-04-30 2015-12-09 西斯特米特公司 Integration database framework

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766326B1 (en) * 2000-07-24 2004-07-20 Resty M Cena Universal storage for dynamic databases
US20040117397A1 (en) * 2002-12-16 2004-06-17 Rappold Robert J Extensible database system and method
CN105144162A (en) * 2013-04-30 2015-12-09 西斯特米特公司 Integration database framework

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱晓春: "基于CWM的关系型数据库建模工具的研究", 《中国优秀博硕士学位论文全文数据库 (硕士)信息科技辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376164A (en) * 2018-10-19 2019-02-22 深圳点猫科技有限公司 A kind of the lower coupling collecting method and electronic equipment of language based on programming
CN109542893A (en) * 2018-10-19 2019-03-29 深圳点猫科技有限公司 A kind of the compound data structure setting method and electronic equipment of language based on programming

Similar Documents

Publication Publication Date Title
WO2021032002A1 (en) Big data processing method based on heterogeneous distributed knowledge graph, device, and medium
Zhao et al. Modeling MongoDB with relational model
CN107545046A (en) A kind of fusion method and device of multi-source heterogeneous data
CN103218398A (en) Intelligent substation SCL (substation configuration description language) file difference comparison method
CN107391502A (en) The data query method, apparatus and index structuring method of time interval, device
CN106055590A (en) Power grid data processing method and system based on big data and graph database
CN104361091A (en) Big data system
CN105608366A (en) User permission control method and device
CN106095698A (en) OO caching write, read method and device
CN105740414A (en) Database-based self-described data model structure
CN103729427A (en) User-defined multistage flow table incremental updating based flow table transformation method
CN102508971B (en) Method for establishing product function model in concept design stage
Zhang Rise of Chinese multinational firms
CN102999329B (en) The Active Directory interface exploitation method of configuration is mapped based on extend markup language
Cai et al. A semi-transparent selective undo algorithm for multi-user collaborative editors
CN104299170B (en) Intermittent energy source mass data processing method
CN105117333A (en) Method and system for management of test cases
CN107045538A (en) A kind of web terminal based on kettle exchanges management method
CN104850623B (en) Multi-dimensional data analysis model dynamic expansion method and system
Duan et al. Topology modeling of distribution network based on open-source GIS
CN104298756A (en) Method for exchanging data between databases based on internal and external networks
CN107943926A (en) The attribute increase method, apparatus and medium of a kind of tables of data
CN105740429A (en) Extensible database table structure
CN103777957A (en) Design method and system of model library with expandability
Kanoje et al. Using mongodb for social networking website

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 250101 block B, Yinhe building, 2008 Xinjie street, hi tech Zone, Ji'nan, Shandong.

Applicant after: Shandong Luneng Intelligent Technology Co., Ltd.

Address before: 250101 B block 626, Yinhe building, 2008 Xinjie street, Ji'nan high tech Zone, Shandong.

Applicant before: Shandong Luneng Intelligent Technology Co., Ltd.

CB02 Change of applicant information
RJ01 Rejection of invention patent application after publication

Application publication date: 20160706

RJ01 Rejection of invention patent application after publication