tailieunhanh - Lecture Database System: Chapter 8 - Normalization for Relational Databases

Chapter 8 - Normalization for Relational Databases includes Normal Forms Based on Primary Keys (Normalization of Relations, Practical Use of Normal Forms, Definitions of Keys and Attributes Participating in Keys,.), General Normal Form Definitions (For Multiple Keys), BCNF (Boyce-Codd Normal Form). | CSC271 Database Systems Lecture # 8 Summary: Previous Lecture Relation algebra and operations Selection (Restriction), projection Union, set difference, intersection Cartesian Product R X S Defines a relation that is the concatenation of every tuple of relation R with every tuple of relation S For example, if relation R has I tuples and N attributes and the relation S has J tuples and M attributes, the Cartesian product relation will contain (I * J) tuples with (N+M) attributes For the attributes with the same name, the attribute names are prefixed with the relation name to maintain the uniqueness of attribute names within a relation Example: Cartesian Product List the names and comments of all clients who have viewed a property for rent We need to combine two relations (Client, Viewing) ΠclinetNo, fName, lName(Client) X ΠclientNo, propertyNo, comment(Viewing) Example: Cartesian Product Example: Cartesian Product Resultant relation contains more information than we require To obtain the required list, we need to carry out a Selection operation on this relation to extract those tuples where ((ΠclientNo, fName, lName(Client)) × (ΠclientNo, propertyNo, comment(Viewing))) Example: Cartesian Product Decomposing Complex Operations The relational algebra operations can be of arbitrary complexity We can decompose such operations into a series of smaller relational algebra operations and give a name to the results of intermediate expressions We use the assignment operation, denoted by ←, to name the results of a relational algebra operation Example: Decomposition Previous example of Cartesian Product Decomposition could be as follows: TempV(clientNo, propertyNo, comment) ← ΠclientNo, propertyNo, comment (Viewing) TempC(clientNo, fName, lName) ← ΠclientNo, fName, lName (Client) Comment(clientNo, fName, lName, vclientNo, propertyNo, comment) ← TempC × TempV Result ← σclientNo= vclientNo (Comment) Rename . | CSC271 Database Systems Lecture # 8 Summary: Previous Lecture Relation algebra and operations Selection (Restriction), projection Union, set difference, intersection Cartesian Product R X S Defines a relation that is the concatenation of every tuple of relation R with every tuple of relation S For example, if relation R has I tuples and N attributes and the relation S has J tuples and M attributes, the Cartesian product relation will contain (I * J) tuples with (N+M) attributes For the attributes with the same name, the attribute names are prefixed with the relation name to maintain the uniqueness of attribute names within a relation Example: Cartesian Product List the names and comments of all clients who have viewed a property for rent We need to combine two relations (Client, Viewing) ΠclinetNo, fName, lName(Client) X ΠclientNo, propertyNo, comment(Viewing) Example: Cartesian Product Example: Cartesian Product Resultant relation contains more information than we require To obtain .

crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.