Detailed explanation of the database principle, save your final exam four parts [3]: Chapter 6

Chapter Six

1. Relationship model

① The composition of the relationship model

R(U,D,DOM,F)

• R-Relationship name
• U-a set of attributes
• DOM-attribute to domain mapping
• A set of data dependencies of F-attribute group U

② Processing in this chapter

R<U,F>

If and only if a relation r on U satisfies F, r is called a relation of the relational pattern

Two, functional dependence (FD)

① Function dependency definition

If the value of attribute or attribute group X is determined, the value of attribute Y can be determined, then it is called

• Y function depends on X or X function to determine Y
③ Complete functional dependence, partial functional dependence and transitive dependence
• In a table, if X → Y, and for any proper subset of X (if the attribute group X contains more than one attribute), X '→ Y does not hold, then we say that Y is fully functionally dependent on X:
• If the Y function depends on X, but at the same time Y is not fully functionally dependent on X, then we say that part of the function of Y depends on X, denoted as:
④ Transitive dependence

Each component must be an inseparable data item , denoted as R ∈ 1NF

Examples of errors :

There is no partial dependence on the code of non-primary attributes

② Judgment method
• Find all the codes in the data table
• According to the obtained code, find out all the main attributes and non-primary attributes
• Check whether the partial dependency of the non-primary attribute pairing code exists
② The improvement benefits of the second paradigm

There is no transfer function dependence of non-primary attributes on the code

① Judgment method
• Find all the codes in the data table
• According to the obtained code, find out all the main attributes and non-primary attributes
• Check whether the transitive dependency of non-primary attributes on the code exists