CN102521404A - Method for building data model with integrity based on tree-shaped atomic model structure - Google Patents
Method for building data model with integrity based on tree-shaped atomic model structure Download PDFInfo
- Publication number
- CN102521404A CN102521404A CN2011104410694A CN201110441069A CN102521404A CN 102521404 A CN102521404 A CN 102521404A CN 2011104410694 A CN2011104410694 A CN 2011104410694A CN 201110441069 A CN201110441069 A CN 201110441069A CN 102521404 A CN102521404 A CN 102521404A
- Authority
- CN
- China
- Prior art keywords
- definition
- expression formula
- atom
- entity
- model
- 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
Images
Abstract
A method for building a data model with integrity based on a tree-shaped atomic model structure relates to the field of computers, in particular to computer management information system service modeling technology. The method includes: firstly, completing definition of data domains, definition of atoms and atomic entities, definition of expression atom types, definition of expression character string rules and definition of expression operational characters in a system; secondly, decomposing atomic entities of a service model and building the service model according to service attributes; thirdly, listing and defining attributes of the decomposed atomic entities in the system according to rules of the data domain definition, the atom and atomic entity definition, the expression atom type definition, the expression character string definition and expression operational character definition; and lastly, building entity integrity, referential integrity and user-defined integrity of the service model.
Description
Technical field
The present invention relates to computer realm, relate in particular to computer management information system business model technology.
Background technology
Number of patent application is 201010222311.4; Patent name is constructed medium-sized and small enterprises MIS business object engine for the disclosed technology of the Chinese patent of " tree type atomic model structure and the method for using this structure construction business model " with the .Net developing instrument; And encapsulate with the general purpose module model, support com interface standard and web service interface standard.This patented technology has solved the conforming problem of enterprise information system data modeling, but and the relation between unresolved logical model and the relational database product hint obliquely at problem and model integrity problem of management.
Current, the data models of being supported in the Database Systems has three kinds, is respectively hierarchical model (Hierachical Model), network model (Network Model) and relational model (Relational Model); Relational model is most important model in these three kinds of data models, and it is widely used in the current enterprise information system.Relational model (Realtional Model) is with two-dimension table presentation-entity collection, representes the data model of getting in touch between the entity with key, and in relational model, field is called attribute, and field value is called property value, and record type is called relation schema.Record is called tuple (Tuple), and the set of tuple is called relation (Relation) or instance (Instance).
Relational model has three types of integralities, entity integrity, referential integrity and user-defined integrality.Various relations are arranged in relational database, various tables are promptly arranged, like base table, question blank and view table etc.Base table is in esse table, is the logical expressions of actual storage data; Question blank is the table that the result constituted of inquiry; View is empty table, is the table of being derived by entity or view.Entity integrity is the rule that base table is carried out, and requires the value of major key attribute can not be sky, if get null value; Then can not identify the tuple in the relation, an entity in the corresponding real world of tuple, the property value of major key is a null value; Explain and have certain entity that can not identify; In fact the entity in the real world all is differentiable, promptly has unique sign, so the value of major key attribute can not be null value.Entity integrity with keep in the relation major key attribute to get correct value relation is arranged, and can correctly get in touch relevant between referential integrity and the relation.Entity integrity and referential integrity are the integrity rule that relational model must satisfy.User-defined integrality is to concrete data constraint conditions in the database, is determined by applied environment.It has reflected the semantic requirements that a certain concrete related data of application must satisfy, and relational model should provide definition and check the mechanism of this type integrality, so that handle with unified method, and should not accomplish this function by application program.
Summary of the invention
The relation that the objective of the invention is between utility tree type atomic model structure solution logical model and the relational database product is hinted obliquely at problem and model integrity problem of management, provides a kind of and has the method for the data model of integrality based on tree type atomic model structure construction.
The present invention is based on tree type atomic model structure construction and have the method for the data model of integrality; At first in system, accomplish the definition to definition, atom and the atom entity of data field, the definition of expression formula atomic type, the definition of expression formula character string rule and the definition of expression formula operational character, it is characterized in that after the definition of accomplishing aforementioned content integrality through following step realization data model:
At first,, decomposite the atom entity of business model, make up business model according to service attribute;
Secondly; With the rule of the atom entity that decomposites according to data field definition in the system, atom and atom substantial definition, the definition of expression formula atomic type, the definition of expression formula character string and the definition of expression formula operational character; Its attribute is tabulated, and be defined in the system;
At last, entity integrity, referential integrity, the user-defined integrality of business model made up, comprises the content of three aspects, be respectively:
The first, use title definition atom, atom entity and tree type to concern to describe entity major key and attribute to solve the entity integrity problem;
The second, type of service is handled referential integrity for the expression formula atom of " level restriction " or " with reference to restriction ";
Three, type of service comes the integrality of process user definition for the expression formula atom of " constant restriction " and " function restriction ";
Wherein, the content of expression formula atom comprises expression formula title, type expression, expression formula character string, and the expression formula title is used for expression formula is identified, and the expression formula character string is used to describe the content of expression formula.
The definition of the definition of described expression formula atomic type, expression formula character string rule and the definition of expression formula operational character comprise following content:
The definition of expression formula atomic type:
The definition of expression formula character string rule:
The definition of expression formula operational character:
Through the constructed business object engine module of method of the present invention, the relation that can effectively solve between logical model and the relational database product is hinted obliquely at problem and transactional integrity problem of management.
Embodiment
Embodiment 1: the buying warehouse-in to a procurement business is professional, makes up its business data model according to method of the present invention.
Before making up business data model; Will in system, accomplish the definition of definition, atom and the atom entity of data field, the definition of expression formula atomic type, the definition of expression formula character string rule and the definition of expression formula operational character, the content of definition is listed in the following form.
The definition of data field:
The definition of atom and atom entity:
The definition of expression formula atomic type:
The definition of expression formula character string rule, the expression formula character string is made up of 1~6 character string, wherein carries out the interval with ". " between 1~5 character string:
The definition of expression formula operational character:
After in system, having defined above content, next adopt method of the present invention to make up business data model.
At first; According to the procurement business attribute; Make up buying warehouse-in business model, decomposite the buying warehouse-in business model that comprises " buying warehouse-in ", " warehouse-in odd numbers ", " opening the phase in odd-numbered day ", " operator ", " accessory ", " quantity ", " valency of stocking up " and " amount of money " atom entity.
Secondly, with purchasing the rule of the professional atom entity that decomposites of warehouse-in its attribute is listed in the table below, and the buying in the definition tabulation is put professional and relevant atom entity in storage in system according to above-mentioned definition in the system:
One, the atom entity of definition buying warehouse-in wherein, need be chosen " whether main atom " options in the system, and the atom numbering is selected " NameDefine: title atom ", the interface that accompanying drawing 1 and accompanying drawing 2 define in system for this step.
Two, put the warehouse-in odd numbers atomic kernel body of giving a definition in storage in buying, the atom numbering is selected " BaseEID: simplify entity ", the interface that accompanying drawing 3 defines in system for this step.
Three, put phase in the odd-numbered day atom entity of giving a definition out in storage in buying, the atom numbering is selected " DoingDate: date ", the interface that accompanying drawing 4 defines in system for this step.
Four, put operator's atom entity of giving a definition in storage in buying, the atom numbering is selected " EntityID: entity ", the interface that Fig. 5 defines in system for this step.
Five, put the accessory atom entity of giving a definition in storage in buying; The atom numbering is selected " EntityID: entity "; And choose " whether main atom ", and options, relationship type is selected " one-to-many "; Be illustrated in once and can go into a plurality of accessories, the interface that Fig. 6 defines in system for this step simultaneously in the warehouse-in.
Six, at the accessory of the buying warehouse-in quantity atom entity of giving a definition, the atom numbering is selected " Amount: quantity ", the interface that Fig. 7 defines in system for this step.
Seven, at the accessory of the buying warehouse-in valency atom entity of stocking up of giving a definition, the atom numbering is selected " Price: price ", the interface that Fig. 8 defines in system for this step.
Eight, at the accessory of the buying warehouse-in amount of money atom entity of giving a definition, the atom numbering is selected " Money: the amount of money ", the interface that Fig. 9 defines in system for this step.
At last, entity integrity, referential integrity, the user-defined integrality to buying warehouse-in business model makes up.
One, the structure of entity integrity; At " buying warehouse-in " atom entity " warehouse-in odd numbers " atom entity of giving a definition; The atom numbering is selected " BaseEID: simplify entity "; Simplify entity and include two data item, " DataItemCode: numbering " and " DataItemTitle: title ", wherein " DataItemCode " data item is the entity major key.The interface that accompanying drawing 10 and accompanying drawing 11 define in system for this step.So just defined the major key of entity, solved the integrity issue of entity, used in service if increase a warehouse-in odd numbers that has existed, then the insertion repetition can be pointed out by system, is corresponding interface like accompanying drawing 12.
Two, the structure of referential integrity; Under " operator " atom entity, increase the type expression atom of " operator's selection "; The atom numbering is selected " Expression: expression formula "; After increasing completion expression formula is defined, type expression is chosen as: " etSetLimit " is promptly with reference to restriction, and " employee " atom in the basis definition business under selection this project; So constitute expression formula character string " SuperCar.BaseDefine.Employee ", the interface that accompanying drawing 13 and accompanying drawing 14 define in system for this step.Wherein SuperCar representes that the employee selects the engineering name of quoting, shown in accompanying drawing 15 interfaces; BaseDefine representes that the business that the employee selects to quote is " basis definition " business under this project, shown in accompanying drawing 16 interfaces; Employee representes that the business that the employee selects to quote is " employee " atom in " basis definition " business under this project, shown in accompanying drawing 17 interfaces.So just accomplished the definition that expression formula is quoted, in service in the application of buying warehouse-in, operator's selection just can be quoted the data in " employee " application, has realized " referential integrity ", shown in accompanying drawing 18 interfaces.
Three, the structure of user definition integrality; " amount of money " atom under " accessory " atom under the buying warehouse-in is professional; Be that atomic name is: the atom of S_Money increases the type expression atom of " amount of money calculating " down; The atom numbering is selected " Expression: expression formula "; Type expression is chosen as: " etExpress " is the function restriction; The amount of money in the buying warehouse-in business under selection this project in the atom is calculated as " amount of money=quantity * valency of stocking up "; The expression formula character string that so constitutes is: " SuperCar.StockFitting.Entrance.FittyingID.S_Money :=SuperCar.StockFitting.Entrance.FittyingID.Amount * SuperCar.StockFitting.Entrance.FittyingID.RPrice ", the interface that accompanying drawing 19 and accompanying drawing 20 define in system for this step.Wherein, SuperCar is an engineering name, shown in accompanying drawing 21 interfaces; StockFitting refers to " procurement business ", shown in accompanying drawing 22 interfaces; Entrance refers to " buying warehouse-in ", shown in accompanying drawing 23 interfaces; FittyingID refers to " accessory ", shown in accompanying drawing 24 interfaces; S_Money refers to " amount of money " under " accessory ", shown in accompanying drawing 25 interfaces; Amount refers to " quantity " under " accessory ", shown in accompanying drawing 26 interfaces; RPrice refers to " valency of stocking up " under " accessory ", shown in accompanying drawing 27 interfaces.So just accomplished the definition of self-defined calculating; In service in the application of buying warehouse-in, after the quantity and the valency of stocking up of having filled in the warehouse-in accessory, system has calculated the amount of money of this warehouse-in accessory automatically; Realized " user-defined integrality ", shown in accompanying drawing 28 interfaces.
Embodiment 2: to a neck material business that maintenance is professional; Make up its business model according to the inventive method; Before making up business data model; Will in system, accomplish the definition of definition, atom and the atom entity of data field, the definition of expression formula atomic type, the definition of expression formula character string rule and the definition of expression formula operational character, the content of definition is as listed among the embodiment 1.After in system, having defined this content, next adopt method of the present invention to make up business data model.
At first; According to neck material service attribute; Make up neck material warehouse-in business model, decomposite the neck material business model that comprises " neck material ", " material requistion number ", " connecing the car odd numbers ", " date ", " accessory ", " quantity ", " unit price " and " amount of money " atom entity.
Secondly, high-ranking military officer expects that the atom entity that business decomposites is listed in the table below its attribute according to the above-mentioned rule that defines in the system, and the professional and relevant atom entity of the neck material in the definition tabulation is in system.
One, the professional atom entity of definition neck material need be chosen " whether main atom " options, and the atom numbering is selected " NameDefine: title definition ", the interface that accompanying drawing 29 defines in system for this step.
Two, at the professional atom entity of the neck material material requistion atom entity of giving a definition, the atom numbering is selected " BaseEID: simplify entity ", the interface that accompanying drawing 30 defines in system for this step.
Three, give a definition at the professional atom entity of neck material and connect car odd numbers atom entity, the atom numbering is selected " EntityID: entity ", the interface that accompanying drawing 31 defines in system for this step.
Four, at the professional atom entity of the neck material neck material date atom entity of giving a definition, the atom numbering is selected " DoingDate: date ", the interface that accompanying drawing 32 defines in system for this step.
Five, at the professional atom entity of the neck material accessory atom entity of giving a definition; The atom numbering is selected " EntityID: entity "; Need choose " whether main atom " options; Relationship type is selected " one-to-many ", is illustrated in once can go into a plurality of accessories simultaneously, the interface that accompanying drawing 33 defines in system for this step in the neck material.
Six, at the professional accessory atom entity of the neck material quantity atom of giving a definition, the atom numbering is selected " Amount: quantity ", the interface that accompanying drawing 34 defines in system for this step.
Seven, in the professional accessory atom entity of the neck material monovalent atoms of giving a definition, the atom numbering is selected " Price: price ", the interface that accompanying drawing 35 defines in system for this step.
Eight, at the professional accessory atom entity of the neck material amount of money atom of giving a definition, the atom numbering is selected " Money: the amount of money ", the interface that accompanying drawing 36 defines in system for this step.
At last, entity integrity, referential integrity, the user-defined integrality to neck material business model makes up.
One, the structure of entity integrity; " material requistion number " the atom entity of giving a definition at " neck material " atom entity; The atom numbering is selected " BaseEID: simplify entity "; Simplify entity and include two data item: " DataItemCode: numbering " and " DataItemTitle: title ", wherein " DataItemCode " data item is a major key, the interface that accompanying drawing 37 defines in system for this step.So just defined the major key of entity, solved the integrity issue of entity, used in service if increase a warehouse-in odd numbers that has existed, then the insertion repetition can be pointed out by system, shown in accompanying drawing 38 interfaces.
Two, the structure of referential integrity; Under " connecing the car odd numbers " atom entity, increase the type expression atom of " odd numbers selection "; The atom numbering is selected " Expression: expression formula "; After increasing completion expression formula is defined, type expression is chosen as: " etSetLimit " selects " connecing car " atom in the maintenance business under this project promptly with reference to restriction; The expression formula character string that so constitutes is " SuperCar.Repair.Service ", the interface that accompanying drawing 39 and accompanying drawing 40 define in system for this step.Wherein, SuperCar representes the engineering name that the odd numbers selection is quoted, shown in accompanying drawing 41 interfaces; Repair representes that the business that odd numbers is selected to quote is " maintenance " business under this project, shown in accompanying drawing 42 interfaces; Service representes that the business that odd numbers is selected to quote is " connecing car " atom in " maintenance " business under this project, shown in accompanying drawing 43 interfaces.So just accomplished the definition that expression formula is quoted, in service in the application of neck material, the selection that connects the car odd numbers just can be quoted the data in " connecing car " application, has realized " referential integrity ", shown in accompanying drawing 44 interfaces.
Three, the structure of user definition integrality; " amount of money " atom under " accessory " atom under the neck material is professional; Be that atomic name is: the atom of UMoney increases the type expression atom of " calculating of the accessory amount of money " down; The atom numbering is selected " Expression: expression formula "; After increasing completion expression formula is defined; Type expression is chosen as: " etExpress " is the function restriction; The amount of money in the neck material business under selection this project in the accessory atom is calculated as " amount of money=quantity * unit price ", and the expression formula character string that so constitutes is " SuperCar.Repair.GetFitting.FittyingID.UMoney :=SuperCar.Repair.GetFitting.FittyingID.Amount * SuperCar.Repair.GetFitting.FittyingID.OPrice ", the interface that accompanying drawing 45 and accompanying drawing 46 define in system for this step.Wherein SuperCar refers to engineering name, shown in accompanying drawing 47 interfaces; Repair refers to " maintenance is professional ", shown in accompanying drawing 48 interfaces; GetFitting refers to " neck material ", shown in accompanying drawing 49 interfaces; FittyingID refers to " accessory ", shown in accompanying drawing 50 interfaces; UMoney refers to " amount of money " under " accessory ", shown in accompanying drawing 51 interfaces; Amount refers to " quantity " under " accessory ", shown in accompanying drawing 52 interfaces; OPrice refers to " unit price " under " accessory ", shown in accompanying drawing 53 interfaces.So just accomplished the definition of self-defined calculating, in service in the application of neck material, after the quantity and unit price of having filled in neck material accessory, system has calculated the amount of money of this neck material accessory automatically, has realized " user-defined integrality ", shown in accompanying drawing 54 interfaces.
Claims (2)
1. method based on the data model with integrality of tree type atomic model structure construction; At first in system, accomplish the definition to definition, atom and the atom entity of data field, the definition of expression formula atomic type, the definition of expression formula character string rule and the definition of expression formula operational character, it is characterized in that after the definition of accomplishing aforementioned content integrality through following step realization data model:
At first,, decomposite the atom entity of business model, make up business model according to service attribute;
Secondly; With the rule of the atom entity that decomposites according to data field definition in the system, atom and atom substantial definition, the definition of expression formula atomic type, the definition of expression formula character string and the definition of expression formula operational character; Its attribute is tabulated, and be defined in the system;
At last, entity integrity, referential integrity, the user-defined integrality of business model made up, comprises the content of three aspects, be respectively:
The first, use title definition atom, entity atom and tree type to concern and describe entity major key and attribute, to solve the entity integrity problem;
The second, type of service is handled referential integrity for the expression formula atom of " level restriction " or " with reference to restriction ";
Three, type of service comes the integrality of process user definition for the expression formula atom of " constant restriction " and " function restriction ";
Wherein, the content of expression formula atom comprises expression formula title, type expression, expression formula character string, and the expression formula title is used for expression formula is identified, and the expression formula character string is used to describe the content of expression formula.
2. a kind of data model with integrality based on tree type atomic model structure construction as claimed in claim 1 is characterized in that the definition of described expression formula atomic type, the definition of expression formula character string rule and the definition of expression formula operational character comprise following content:
The definition of expression formula atomic type:
The definition of expression formula character string rule:
The definition of expression formula operational character:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104410694A CN102521404A (en) | 2011-12-26 | 2011-12-26 | Method for building data model with integrity based on tree-shaped atomic model structure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011104410694A CN102521404A (en) | 2011-12-26 | 2011-12-26 | Method for building data model with integrity based on tree-shaped atomic model structure |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102521404A true CN102521404A (en) | 2012-06-27 |
Family
ID=46292317
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011104410694A Pending CN102521404A (en) | 2011-12-26 | 2011-12-26 | Method for building data model with integrity based on tree-shaped atomic model structure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102521404A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664604A (en) * | 2018-05-09 | 2018-10-16 | 四川华创世纪科技有限公司 | A method of realizing that data minimum splits storage and calling service is presented |
WO2021128955A1 (en) * | 2019-12-27 | 2021-07-01 | 上海莉莉丝科技股份有限公司 | Visualized data operating method, system, device and medium |
CN114462903A (en) * | 2022-04-14 | 2022-05-10 | 四川省大数据中心 | Water, electricity and gas business applying system |
-
2011
- 2011-12-26 CN CN2011104410694A patent/CN102521404A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108664604A (en) * | 2018-05-09 | 2018-10-16 | 四川华创世纪科技有限公司 | A method of realizing that data minimum splits storage and calling service is presented |
CN108664604B (en) * | 2018-05-09 | 2021-08-24 | 四川华创世纪科技有限公司 | Method for realizing minimum data splitting storage and service calling presentation |
WO2021128955A1 (en) * | 2019-12-27 | 2021-07-01 | 上海莉莉丝科技股份有限公司 | Visualized data operating method, system, device and medium |
US11954116B2 (en) | 2019-12-27 | 2024-04-09 | Shanghai Lilith Technology Corporation | Visual data operation method, system, and device, and medium |
CN114462903A (en) * | 2022-04-14 | 2022-05-10 | 四川省大数据中心 | Water, electricity and gas business applying system |
CN114462903B (en) * | 2022-04-14 | 2022-07-05 | 四川省大数据中心 | Water, electricity and gas business applying system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Vaisman et al. | Data warehouse systems | |
Celko | Joe Celko's Trees and hierarchies in SQL for smarties | |
Carey et al. | Data-Centric Systems and Applications | |
Sadalage et al. | NoSQL distilled: a brief guide to the emerging world of polyglot persistence | |
CN111542813A (en) | Using object models of heterogeneous data to facilitate building data visualizations | |
CN103226478A (en) | Method for automatically generating and using code | |
Lemahieu et al. | Principles of database management: the practical guide to storing, managing and Analyzing big and small Data | |
JP2006513474A (en) | Method, system, and program for describing multidimensional computations for a relational OLAP engine | |
US11461293B2 (en) | Processes and systems for onboarding data for a digital duplicate | |
Davidson et al. | Pro SQL server 2012 relational database design and implementation | |
Harinath et al. | Professional Microsoft SQL server analysis services 2008 with MDX | |
Celko | Joe Celko's data and databases: concepts in practice | |
CN102521404A (en) | Method for building data model with integrity based on tree-shaped atomic model structure | |
Singh et al. | Easy designing steps of a local data warehouse for possible analytical data processing | |
Gusenkov et al. | On ontology based data integration: problems and solutions | |
Sattar et al. | Incorporating nosql into a database course | |
Fouché et al. | Foundations of SQL server 2008 R2 business intelligence | |
Pedersen | Managing complex multidimensional data | |
Peng et al. | Using object deputy model to prepare data for data warehousing | |
Oosterom et al. | Generic query tool for spatio-temporal data | |
Cameron | Microsoft SQL server 2008 analysis services step by step | |
Pedersen et al. | Multidimensional Databases. | |
Winberg et al. | A comparison of relational and graph databases for crm systems | |
Gupta et al. | Database management system Oracle SQL and PL/SQL | |
Thanuja et al. | Database Management Systems: An Introduction |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120627 |