TAILIEUCHUNG - Lecture Database System: Chapter 6 - Relational Database Design by ER- and EERR-to-Relational Mapping

Chapter 6 - Relational Database Design by ER and EERR-to-Relational Mapping presents about ER-to-Relational Mapping Algorithm, Mapping EER Model Constructs to Relations (Options for Mapping Specialization or Generalization, Mapping of Union Types (Categories). | CSC271 Database Systems Lecture # 6 Summary: Previous Lecture Relational model terminology Mathematical relations Database relations Properties of a relation Relational Keys Superkey Candidate key Primary key Alternate key Foreign key Superkey An attribute, or set of attributes, that uniquely identifies a tuple within a relation A super key may contain additional attributes that are not necessary for unique identification Consider Branch relation: {branchNo, street, city, postcode} {branchNo, street, city} {branchNo, city} or {branchNo, postcode} Candidate Key Superkey (K) such that no proper subset is a superkey within the relation In each tuple of R, values of K uniquely identify that tuple (uniqueness) No proper subset of K has the uniqueness property (irreducibility) In simple words, superkey with minimal attributes Simple key or composite key Instance of a relation cannot be used to prove uniqueness Consider Branch relation branchNo or postcode Primary Key Candidate key selected to identify tuples uniquely within relation Consider Branch relation Primary key: branchNo Alternate Keys Candidate keys that are not selected to be primary key Consider Branch relation Alternate key: postcode Foreign Key Attribute, or set of attributes, within one relation that matches candidate key of some (possibly same) relation Used to represent relationship In the Branch relation, branchNo is the primary key However, in the Staff relation the branchNo attribute exists to match staff to the branch office they work in In the Staff relation, branchNo is a foreign key branchNo in the Staff relation targets the primary key attribute branchNo in the home relation, Branch Representing Relational Database Schemas Conceptual schema or conceptual model Branch (branchNo, street, city, postcode) Staff (staffNo, Name, position, sex, DOB, salary, branchNo) Integrity Constraints We need to understand Nulls before starting discussion on integrity constraints Null Represents value for an attribute

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.