In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
/ * /
Table of contents:
Part one: basic concepts
Part two: the way of design
Part III: introduction to the basic concepts of banking data model
Part IV: sub-thematic introduction of banking data model.
Part V: ODS and EDW
/ * /
Part one: basic concepts
1. What is LDM (Logic Data Module)
LDM is the information representation of a business organization.
Not Database.
Platform independence
Is a logical representation of business data
Define the existing data entities and the relationships between them
Business people can know whether their business problems can be solved through LDM.
Characteristics of 2.LDM
Stability:
Can meet business needs for a long time
Correctness:
Data mapping to real-world business one-to-one
Sharing:
Not designed for specific departments or specific application requirements
Flexibility:
When the business environment changes, only minimal changes are needed
Industry characteristics of 3.LDM
Different industries have different LDM reference models
Communication (Communication) cLDM
Financial (Financial) FISLDM
Medical (HealthCare)
Retail (Retail)
Traffic (Transportation)
Tourism (Travel)
Manufacturing (Manufacture)
4. Why use LDM (implementation side)
Cost reduction (cost savings)
Risk reduction (Reduce Risk)
1:1 Mapping (LDM- > PDM)
Low maintenance quantity (Low Maintenance)
Communication (Communication)
Enterprise wide (Cross Functional)
Customer Center (Customer Centric)
5. Why use LDM (client side)
Generate an accurate (accurate) and consistent (consistent) view of business data
A clear expression of business rules
It can go beyond the limitations of current data and provide a roadmap for data integration.
Provide means of communication to participants at all levels
6. Modeling framework (Data Modeling Frame Work)
7.LDM (Logic Data Module) and PDM (Physical Data Module)
8.LDM and ERD
ERD (Entity Relationship Diagram)
ERD is a standard modeling technique for graphical expression of LDM.
ERD technology can be realized through different products:
Erwin
Power Designer
Visio
ERD needs to express:
Entity (Entity). Everything.
Relationship (Relationship). The relationship between different business entities
Property (Attribute). The data fact of an entity or relationship (data fact) is the lowest level of information, and the business meaning is inseparable
Primary key (Primary Key)
Relational descriptor (Relationship Descriptor)
Foreign key (Foreign Key)
9.LDM and Table Layout (table style)
Table Layout makes the data more intuitive for business people by adding sample data (sampling data) to the LDM.
Key attributes are represented in blue and non-key attributes in red.
Part two: the way of design
Modeling method:
Step 1: define business requirements and scope (Requirement)
Step 2: define an entity (Entity)
Step 3: define relationships (Relationship/PK/FK)
Step 4: define attributes (No-key Attribute)
Step 5: verify the model (Verify)
Step 6: regularization (Normalization)
Step 7: historical data Modeling (History Modeling)
Step 1: define business requirements and scope
The construction of LDM is a gradual process, and it also evolves with the continuous expansion of enterprise business and management models.
LDM is the representation of information, and the classification of information is the topic, which defines the scope of information through the topic.
The content of the same topic may also expand with the business.
Step 2: define the entity
What is an entity:
The information that needs to be expressed and maintained is the entity, which can include any concept of person, place, product, etc. Entity is the concept of logical model, and the corresponding physical model is table.
Name of the entity:
Is unique in the whole model.
It is usually a noun (such as a customer) and can be modified (such as a VIP customer).
Error that occurs when defining an entity:
Synonyms and different names (e.g. employee worker and employee employee)
The same name has different meanings (for example, products and promotions are defined as product)
Primary key (Primary Key) in the entity:
The primary key is the flag that distinguishes each instance (instance) in the entity from the other instances. In the physical model, the primary key is the distinguishing mark of row.
When defining an entity, you usually define the primary key first. In the graphical representation, it is usually put at the front.
Some principles for defining primary keys:
Each entity (table) must have a primary key Even if the table is multiset (duplicate records may occur), it must have a primary key.
Each table can have only one primary key.
The primary key value must be unique (the ANSI standard allows non-uniqueness. In order to ensure data loading performance, the primary key value may not be unique)
Primary key value cannot be empty
The primary key value cannot be modified
Primary key values can be made up of multiple values.
Step 3: define relationships (Relationship)
What is a Relationship:
A relationship is an expression of the way two different entities interact (for example, the customer buys the product and the employee is in that department)
Direct and indirect relationships are shown in the following figure. In the model, only direct relationships are defined, not indirect relationships.
Principles for defining relationships:
The relationship is unique (marked uniquely by the table involved)
Relationships apply to all instances within the entity (physical model applies to all row in the table)
You need to define a set representation of the relationship (cardinality). For example, 1:1, 1VOR M, MRV M
To define a relationship:
Step1: identify whether there is a relationship between entities
Whether there is a relationship
Is it direct or indirect?
Define the name of the relationship
Step2: identify the collective representation between entities
1:1
1:M
M:M
Step3: express the relationship with Foreign Key
Foreign keys represent the quantitative relationship between instances in two entities.
Principles of foreign key definition:
An entity can have 0ram, 1ram, M foreign keys.
The value of a foreign key may not be unique (1:M/M:M)
The value of the foreign key can be empty (the customer can not have an account)
The value of the foreign key can be changed (the customer's account number can be modified)
Foreign keys can be made up of multiple attributes
The properties and values of the foreign key of table A must exist in the competition in table B.
Defining a MRV M relationship requires a new relational entity (Associative Entities):
The relationship between the customer and the product is a MRV M relationship, so you need to define a relationship entity (order subscription)
A relational entity is formed by putting the primary keys of An entity and B entity together.
The primary key of relational entity is An entity primary key + B entity primary key.
Recursive relationship:
In a relationship that exists within an entity, the foreign key of the entity is the primary key of the entity
As shown in the following figure
The manager himself is an employee.
MgrEmp# is the foreign key of Empolyee, and the corresponding primary key is Emp# of Empolyee.
Step 4: define attributes (Attribute Modeling)
Attributes are related, detailed data items that describe an entity (entity)
Principles for defining attributes:
The name is unique within the entity
Related to this entity
Cannot be described by other attributes
There is a single range space
Attribute should be valid for all instances within the entity
Type of property:
Key attributes (primary key, foreign key)
Non-key attribute
Derived attributes, attributes that can be calculated from other attributes
Step 5: verify the model (Verify)
The problems of the above four steps are found through model verification, which are constantly corrected and cycled many times.
Discuss with the customer to confirm whether the customer's business needs, business problems and business constraints can be reflected through the model.
Don't think about any questions about physical models.
However, the customer's business needs can be expressed through the model, which ends the optimization of the model.
Step 6: regularization (Normalization)
Regularization is the rule for designing the attributes of entities, so that entity-attributes can more accurately reflect objective facts.
The role of regularization:
Reduce data redundancy (avoid multiple data storage)
Reduce data inconsistencies caused by data modifications (only one data has been modified and the other has been forgotten)
Regularization principle "one fact, one place" (one fact, one place)
1NFMagazine 2NFMagazine 3NF solves the dependence of non-key attributes on primary keys
4NF, 5NF solution is the dependency between key attributes.
General LDM modeling is only required to 3NF
What is 3NF:
1NF: The Key (with primary key and no duplicate attributes)
2NF: The Whole Key (dependency of non-key attributes on primary keys)
3NF: And Nothing But Key (attributes are directly dependent on primary keys, not indirect)
Step 7: historical data Modeling (History Modeling)
Business people not only need to analyze the current (current) data, but also need to track the changes of the data (track), but also need to analyze the historical data.
This requires modeling the changing history of the data, which is called historical data modeling (History Modeling).
The principles of History Modeling:
Current and History:
If there are both current entities (current entity) and historical entities (history entity) in the model, the information of the current entities must be redundant.
In the design LDM, you only need to retain the historical entities, and when designing the physical model, you can add a current flag (current flag) to indicate which records correspond to the information of the current entity.
Historical data modeling:
Put the attributes that need to save the historical information into the historical entity (History Entity).
The time property is part of the primary key.
The primary key of a historical entity (History entity) must be a matching primary key (including multiple attributes)
First Normal Form (1NF)
First normal form (1NF) sets the very basic rules for an organized database:
Eliminate duplicative columns from the same table.
Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).
Second Normal Form (2NF)
Second normal form (2NF) further addresses the concept of removing duplicative data:
Meet all the requirements of the first normal form.
Remove subsets of data that apply to multiple rows of a table and place them in separate tables.
Create relationships between these new tables and their predecessors through the use of foreign keys.
Third Normal Form (3NF)
Third normal form (3NF) goes one large step further:
Meet all the requirements of the second normal form.
Remove columns that are not dependent upon the primary key.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.