Đang chuẩn bị liên kết để tải về tài liệu:
Seminars in IT for Businesses - Lecture 13: Information and databases (Part 2)
Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG
Tải xuống
In this chapter, students will be able to understand: Relationships, data modeling & DB design, dealing with many-to-many relationships, composite entities, database design, foreign keys in relational database, database integrity,. | INFORMATION AND DATABASES Part 2 Entities: Identification A key is an attribute, or a group of attributes, that assumes a unique value for each entity member (Student ID, SSN, Driver License). Why First Name, Last Name are NOT valid keys ? A group of attributes that uniquely identifies a member of an entity is called a composite key. A secondary key is an attribute whose values divide all entity members into useful subgroups/sub-criteria. (Major, Gender, etc) No additional notes Relationships: Degree Degree of Relationship defines how many entities are involved in a relationship (according to a business rule): Recursive (Unary), Binary, Ternary May carry specific data on the relationship Relationships: Degree. Recursive Relationship: members in the same entity have relationship with each other (one another) STUDENT -StudendID -StudentName Be Friend INDIVIDUAL -ID -Name Marry Date 1 1 (0,1) (0,1) M N (0,M) (0,N) Relationships: Degree . Binary Relationship EMPLOYEE - Emp_ID - Emp_Name - Emp_Title PROJECT - Project_ID - Proj_Name - Proj_Due Lead Date 1 M (1,1) (0,M) Relationships: Degree . Ternary relationship EMPLOYEE - EmpID - Emp_Name - Emp_Title TASK - TaskID - TaskName Assign Date PROJECT - ProjectID - Proj_Name - Proj_Due (1,N) (1,M) (1,P) N M P Relationships: Cardinalities Cardinalities document how many members of one entity can relate to a single member of another entity in a relationship. Max / Min number of members Reflect business policies or general business practices (e.g., how many classes a student can take, how many students a class can hold). Student Class Enroll (25, 40) (1, 5) M N One-to-One One-to-One (1:1) – A relationship between two entities in which an instance of entity A can be related to only one instance of entity B and entity B can be related to only one instance of entity A Sales Pay Cash Collections Ex: Cash Sales 1 1 (1,1) (1,1) One-to-Many One-to-Many (1:M) – A relationship between two entities, in which an instance of . | INFORMATION AND DATABASES Part 2 Entities: Identification A key is an attribute, or a group of attributes, that assumes a unique value for each entity member (Student ID, SSN, Driver License). Why First Name, Last Name are NOT valid keys ? A group of attributes that uniquely identifies a member of an entity is called a composite key. A secondary key is an attribute whose values divide all entity members into useful subgroups/sub-criteria. (Major, Gender, etc) No additional notes Relationships: Degree Degree of Relationship defines how many entities are involved in a relationship (according to a business rule): Recursive (Unary), Binary, Ternary May carry specific data on the relationship Relationships: Degree. Recursive Relationship: members in the same entity have relationship with each other (one another) STUDENT -StudendID -StudentName Be Friend INDIVIDUAL -ID -Name Marry Date 1 1 (0,1) (0,1) M N (0,M) (0,N) Relationships: Degree . Binary Relationship EMPLOYEE - Emp_ID - .