6. Create an E-R Diagram for College Database
Requirements:
1.A student can enrol for any number of subjects.
2.Each Instructor should teach one or more subjects.
3.Each subject can have any number of students.
7. Entity
Relationship
Attributes
Key Attribute of an Entity Type
Cardinality
MAJOR COMPONENTS:
9. WEAK ENTITY
• depends on the existence of another entity
• entity that must defined by a foreign key relationship with another entity as it cannot be uniquely identified
by its own attributes alone.
10. Create an E-R Diagram for College Database
Requirements:
1. A student can enrol for any number of subjects.
2. Each Instructor should teach one or more subjects.
3. Each subject can have any number of students.
Student Instructor Subject
12. Create an E-R Diagram for College Database
Requirements:
1. A student can enrol for any number of subjects.
2. Each Instructor should teach one or more subjects.
3. Each subject can have any number of students.
Student Instructor
Subject
Enrolled Taught
14. MULTIVALUED
ATTRIBUTE DERIVED ATTRIBUTE
an attribute that can have more than one value
Example:
TEACHER SUBJECTS
an attribute based on another attribute
Example:
EMPLOYEE
BIRTH_DATE AGE
15. Create an E-R Diagram for College Database
Student Instructor
Subject
Enrolled Taught
Student_ID
First_Name
Last_Name
Subject_Code Description Duration
Instructor_ID
First_Name
Last_Name
Requirements:
1. A student can enrol for any number of subjects.
2. Each Instructor should teach one or more subjects.
3. Each course can have any number of students.
17. Create an E-R Diagram for College Database
Student Instructor
Subject
Enrolled Taught
Student_ID
First_Name
Last_Name
Subject_Code Description Duration
Instructor_ID
First_Name
Last_Name
Requirements:
1. A student can enrol for any number of subjects.
2. Each Instructor should teach one or more subjects.
3. Each subject can have any number of students.
18. CARDINALITY
The count of instances that are allowed or are necessary between entities
• One to One - 1:1
• One to Many - 1:N
• Many to Many - M:N
4.
CHEN’S STYLE:
19. Create an E-R Diagram for College Database
Student Instructor
Subject
Enrolled Taught
Student_ID
First_Name
Last_Name
Subject_Code Description Duration
Instructor_ID
First_Name
Last_Name
M
N N
1
Requirements:
1. A student can enrol for any number of subjects
2. Each Instructor should teach one or more subjects. (1:N)
3. Each subject can have any number of students. (M:N)
22. Create an E-R Diagram for College Database
Requirements:
1.A student can enrol for any number of subjects.
2.Each Instructor should teach one or more subjects.
3.Each subject can have any number of students.
30. HOW TO CREATE AN ER DIAGRAM?
1. Identify the Entities
2. Identify Relationships
3. Describe the Relationship
4. Add Attributes and the Identify Key Attribute
5. Identify the Cardinality of each entities
6. Complete the Diagram
It is a high level conceptual data modellings technique that helps designers to create accurate and useful conceptual models.
Prof. Peter Chen developed this technique to serve as a tool for communication between designers and users. Chen recognized the problems that are caused when the developers and the users fail to understand each other.
PRIMARY KEY- An attribute or a group of attributes that uniquely identifies an instance of the entity
PRIMARY KEY- An attribute or a group of attributes that uniquely identifies an instance of the entity
PRIMARY KEY- An attribute or a group of attributes that uniquely identifies an instance of the entity