Logical model refers to theLogical structure。Logical modelingyesdata warehouse An important link in implementation, because it canDirect reflectionOutBusiness DepartmentAt the same time, it plays an important role in guiding the physical implementation of the system. Its role is to outline the data blueprint of the enterprise through entities and relationships.
Since the 1980s, object-oriented methods and technologies have been used in various computer fields, includingProgramming language,software engineering, computer hardware and other aspects have had a profound impact, and a new model - object-oriented data model has emerged.
classification
Announce
edit
logical model
The most common logical models arehierarchical model , mesh model and relational model.
The fundamental difference between the three logical models lies in the different data structures, that isExpressionDifferent, used for hierarchical model“Tree structure”To represent the relationship between data;Mesh model uses "graph structure" to represent the relationship between data;The relationship model uses“2D table”To represent the relationship between data.[1]
Data structure is computerdata organization Framework description of the relationship between methods and data, anddata fileThe data of is organized according to this framework description.
The data structure is described inobject typeThe collection of is a static description of the system.
Data operation
Data operation refers to the set of operations allowed to be performed on instances or values of various objects in the database, including operation methods and relevant rulesDynamic characteristicsDescription of.
integrity constraint
integrity constraint
CompletenessA constraint is a set of integrity rules for data(constraint condition)Collection of.The logic logic shall reflect and specify the basic general integrity constraints that the data model must comply with.For example, in a relational model, any relationship must satisfyEntity integrityandReferential integrityTwo conditions.In addition, the logical model should also provide a mechanism for user-defined integrity constraints to reflect the specific semantic constraints that data involved in specific applications must comply with.[2]
Design steps
Announce
edit
Analysis subject field
Analysis subject field
In the conceptual model design, we have determined several basic subject areas, but,data warehouse The design method ofGradual refinementThe process of design is generally completed one theme at a time or several themes at a time.Therefore, we must understand the conceptmodel design Several identified in stepBasic themeDomain analysis, and select the subject domain to be implemented first.When selecting the first topic domain, we should consider that it should be large enough so that the topic domain can be built into an applicable system;It should also be small enough to facilitate development and rapid implementation.
Granularity hierarchy division
data warehouse logic design An important problem to be solved in is to determine the granularity level of the data warehouse. Whether the granularity level is appropriate or not directly affects the amount of data in the data warehouse and the appropriate query type.becauseSubject databaseRespond to enterprise businessOLTPTherefore, the most detailed classification data must be saved according to theBusiness DepartmentIn order to improve the speed of complex queries, multiple granularity should be determined.
Determine data segmentation strategy
In this step, choose the appropriateData segmentationIn general, the following factors should be considered: data volume (not the number of record lines)Data analysisThe actual situation, simplicity and granularity division strategy of the processing.Among them, the size of the data is the main factor that determines whether to segment the data and how to segment it;The requirements of data analysis and processing are a main basis for selecting data segmentation standards, because data segmentation is closely related to the objects of data analysis and processing.
Relationship schema definition
Relationship schema definition
Each topic of the data warehouse is realized by multiple tables, which are linked together by the public key of the topic to form a complete topic.When designing the conceptual model, we determined the basic theme of the data warehouse, and described the public key and basic content of each theme.In this step, we will divide the selected currently implemented topics into patterns, form multiple tables, and determine theRelational model。