From ER Model to Relational Model • Our method of designing relational (logical) model uses information from ER Model — We assume that ER modelling is performed before relational modelling • Informally, ER Model — Partitions information in a domain into Entities (boxes) and attributes — Links entities up into a network to reflect the relationships from the real world domain — The network of entities represents the real world domain • Informally, relational model — Partitions information into tables (relations) — Links tables up into a network to reflect the relationships existing among data — The network of tables store data from the real world domain • We can notice similarities between ER Models and Relational Models — Entities correspond to Tables (relations) — Network of entities correspond to network of tables 实体对应表即关系 实体网络对应表网络
Step-by-Step Procedure for Logical Database Design • Derive relations for logical data model • Validate relations using normalization • Validate relations against user transactions • Check integrity constraints • Review logical data model with user • Merge logical data models into global model (optional) • Check for future growth 重要的是前两个步骤 逻辑数据模型推导关系和使用规范验证关系
Entities & their Attributes • Individual tables are derived from strong entities (entities with a clear Primary key) • Fields in the tables are derived from attributes associated with entities — Define the data types of the fields • Define the primary key of the table • Foreign keys are decided later while modelling the relationships — Not all tables (relations) have foreign keys — At this stage, however, bear in mind that relation model is incomplete without deciding foreign keys 表个体都来自

本文介绍了如何从ER模型转化为关系模型,包括设计逻辑数据模型、推导关系、规范化验证、用户事务验证和完整性检查。重点讲解了实体、属性、不同关系类型的建模策略,如一对一、一对多和多对多关系,以及超级类/子类关系的处理。
最低0.47元/天 解锁文章
1万+






