数据库知识点Database Tech首页投稿(暂停使用,暂停投稿)

Relationship Database Design

2017-12-18  本文已影响5人  jin2017

Content

E-R Diagram (Conceptual Model)
Conceptual Model - ERD Superclass/Subclass Hierarchy

"O" is overlapping, meaning there could be overlapping between each subclass entities. (A manager could also be a salesperson)
Besides, we can use "D" for disjoint subclasses.

A single line between Employee and its subclasses implies an optinal participation (an employee may not belong to any subclass), while a double line implies a mandatory participation (an employee must be in one or more subclasses).

An U-like symbol identify subclasses by pointing to them. (the entity the bottom of "U" points to is a subclass)

Logical Model

Schema represents abstract (strong and weak) entities and associated attributes and necessary relationships between entities.

A schema looks like this:
STUDENT(Stu_num, Stu_Lname, Stu_Fname, program_num@, age, gender)
(PK "Stu_num" should be underscored. I use italic instead)

Data dictionary contains metadata of attributes, with which you could understand the what, where, how, how much, who, when questions about data.

Normal Form

A good logical model should follow normal form of database.

For example, in R(A B C D), if
(A+B) -> C, D,
(B) -> D,
D is partially dependent on primary key (A+B), thus not satisfying 2NF.

For example (a model in 3NF but not in BCNF)
In R(A B C D), there are
(A+B) -> C, D;
(A+C) -> B, D;
(C) -> B.
With a non-primary-key attribute C determines primary-key attribute B, the model does not satisfy BCNF.

上一篇 下一篇

猜你喜欢

热点阅读