Week 3
Teaching and Learning Methods to be Employed
i. Illustrated lecture with step-by-step ER diagram construction
ii. Hands-on ER diagram drawing exercise (paper or draw.io)
iii. Case study: Modelling a Nigerian hospital information system
iv. Collection of Assignment 1
Learning Outcomes / Objectives
By the end of this week, students should be able to:
1. Explain the purpose of conceptual data modelling.
2. Define entities, attributes, and relationships in the ER model.
3. Classify attributes by type (simple, composite, multi-valued, derived).
4. Identify and specify cardinality ratios and participation constraints.
5. Draw a complete Entity-Relationship (ER) diagram for a given scenario.
3.4 Participation Constraints
Participation indicates whether all or only some entity instances participate in a relationship:
1. TOTAL PARTICIPATION (Mandatory) — Every instance of the entity type MUST participate in the relationship. Drawn as a DOUBLE LINE. E.g., every STUDENT must BELONG-TO a DEPARTMENT.
2. PARTIAL PARTICIPATION (Optional) — Some instances may not participate. Drawn as a SINGLE LINE. E.g., not every STAFF member has a DEPENDENT.
Complete ER Diagram Example: Newgate University Database
ENTITIES: STUDENT, COURSE, LECTURER, DEPARTMENT, EXAMINATION
STUDENT attributes: MatricNo (key), FirstName, LastName, DateOfBirth, Email, PhoneNo (multi-valued), Level
COURSE attributes: CourseCode (key), CourseName, CreditUnits, Semester
LECTURER attributes: StaffID (key), FullName, Rank, Specialisation
DEPARTMENT attributes: DeptCode (key), DeptName, Faculty
EXAMINATION attributes: ExamID (key), ExamDate, Venue, Duration
RELATIONSHIPS:
1. STUDENT ENROLS-IN COURSE [M:N, Total:Total] — Many students enrol in many courses
2. LECTURER TEACHES COURSE [1:N, Partial:Total] — One lecturer teaches many courses; each course is taught by one lecturer
3. STUDENT BELONGS-TO DEPARTMENT [N:1, Total:Partial] — Many students belong to one department
4. COURSE BELONGS-TO DEPARTMENT [N:1, Total:Partial] — Many courses belong to one department
5. STUDENT SITS EXAMINATION [M:N] — Students sit many examinations; each examination has many students

|
ER Diagram Notation Summary |
Symbol/Representation |
|
Entity Type (strong) |
Rectangle |
|
Entity Type (weak) |
Double Rectangle |
|
Attribute (simple) |
Oval |
|
Attribute (multi-valued) |
Double Oval |
|
Attribute (derived) |
Dashed Oval |
|
Key Attribute |
Underlined text in Oval |
|
Relationship |
Diamond |
|
Identifying Relationship (weak) |
Double Diamond |
|
Total Participation |
Double Line |
|
Partial Participation |
Single Line |
Reading List / References
Elmasri, R. & Navathe, S. B. (2016). Fundamentals of Database Systems, Chapter 3: ER Model. Pearson.
Connolly, T. & Begg, C. (2015). Database Systems, Chapter 12: ER Modelling. Pearson.
Chen, P. P. (1976). The Entity-Relationship Model: Toward a Unified View of Data. ACM Transactions on Database Systems, 1(1), 9-36.
Activities
|
Self-Assessment Quiz: 1. What is the difference between an entity and an entity type? 2. Name FOUR types of attributes and give an example of each from a STAFF entity. 3. What is a weak entity? Give a Nigerian example. 4. A department has many lecturers but each lecturer belongs to only one department. What is the cardinality of this relationship? |
|
ER Diagram Exercise: Draw a complete ER diagram for a HOSPITAL MANAGEMENT SYSTEM for a Nigerian Teaching Hospital. Include at minimum: PATIENT, DOCTOR, WARD, APPOINTMENT, PRESCRIPTION. For each entity, specify at least 4 attributes including the key attribute. Specify cardinality and participation for all relationships. You may use draw.io, Lucidchart, or pencil and paper. |