Download presentation
Presentation is loading. Please wait.
1
Case Studies: Data Modeling
SEEM3430: Information Systems Analysis and Design
2
Case 1: Description each lecturer tutors a group of students
A university consists of a number of departments. Each department offers several courses. A number of modules make up each course. Students enrol in a particular course and take modules towards the completion that course. Each module is taught by a lecturer from the appropriate department, each lecturer tutors a group of students of and Entity Relationship Modelling
3
Identify Entities departments. Each department offers several
A university consists of a number of departments. Each department offers several courses. A number of modules make up each course. Students enrol in a particular course and take modules towards the completion of that course. Each module is taught by a lecturer from the appropriate department, and each lecturer tutors a group of students Entity Relationship Modelling
4
Identify Relationships
• A university consists of a number of departments. Each department offers several courses. A number of modules make up each course. Students enrol in a particular course and take modules towards the completion of that course. Each module is taught by a lecturer from the appropriate department, and each lecturer tutors a group of students Entity Relationship Modelling
5
Example - E/R Diagram Entities: Department, Course, Module, Lecturer,
Student Course Module Lecturer Student Entity Relationship Modelling
6
Example - E/R Diagram Each department offers several courses
Module Lecturer Student Entity Relationship Modelling
7
Example - E/R Diagram A number of modules make up each courses
Department courses Offers Course Includes Module Lecturer Student Entity Relationship Modelling
8
Example - E/R Diagram Students enrol in a particular course Department
Offers Department Course Includes Module Lecturer Enrols In Student Entity Relationship Modelling
9
Example - E/R Diagram Students … take modules Department Course Module
Offers Department Course Includes Module Lecturer Takes Enrols In Student Entity Relationship Modelling
10
Example - E/R Diagram Each module is taught by a lecturer Department
Offers Course Includes Module Teaches Lecturer Takes Enrols In Student Entity Relationship Modelling
11
Example - E/R Diagram a lecturer from the appropriate department
Offers Department Employs Course Includes Module Teaches Lecturer Takes Enrols In Student Entity Relationship Modelling
12
Example - E/R Diagram each lecturer tutors a group of students
Offers Department Employs Course Includes Module Teaches Lecturer Takes Enrols In Student Tutors Entity Relationship Modelling
13
Example - E/R Diagram Department Course Module Lecturer Student Offers
Employs Course Includes Module Teaches Lecturer Takes Enrols In Student Tutors Entity Relationship Modelling
14
Entities and Attributes facts about • Sometimes it is hard
to tell if something should be an entity • General guidelines • Entities can have attributes but attributes have no smaller parts Entities can have relationships between them, but an attribute belongs to a single entity or • an attribute They both objects or the world represent facts about • • They are both often represented by nouns in descriptions Entity Relationship Modelling
15
Case 2: Supplier/Product
We want to represent information about products in a database. Each product has a description, a price and a supplier. Suppliers have addresses, phone numbers, and names. Each address is made up of a street address, a city, and a postcode. Entity Relationship Modelling
16
Indentify Entities/Attributes phone number • Entities or attributes: •
Products, suppliers, and addresses all have smaller parts so we can make them entities The others have no smaller parts and belong to a single entity • product description price supplier address phone number name street address city postcode • Entity Relationship Modelling
17
Example - E/R Diagram Product Supplier Address Price Description
Street address Name Supplier Address City Phone number Postcode Entity Relationship Modelling
18
Identify Relationships supplier address single supplier but address •
Each product has supplier a • Each supplier has an address • Each product has a single supplier but • A supplier has a single address It does not seem sensible for two there is nothing stop a supplier supplying many products A many to one relationship to • different suppliers have the same address A one to one relationship to • • Entity Relationship Modelling
19
Example - E/R Diagram Product Supplier Address Price Description Has A
Street address Name Supplier Has A Address City Phone number Postcode Entity Relationship Modelling
20
One to One Relationships between A and B • Some relationships •
Example - the supplier-address relationship between entities, and B, might be redundant if A • Is one to one Every supplier has address We don’t need addresses that are • It is a 1:1 relationship between A and B an • Every A is related B and every B is related to an A to a • not related to a supplier Entity Relationship Modelling
21
Redundant Relationships a entity • We can merge the two entities
x two entities take part in redundant relationship that a b A B y c z together • They become a single entity • The new entity has all the attributes of the old one a x b AB y c z Entity Relationship Modelling
22
Example - E/R Diagram Product Supplier Price Description Has A Name
City Phone number Postcode Street address Entity Relationship Modelling
23
Tips: E/R Diagrams diagram and then the relationships •
From a description the requirements identify the of • Draw the E/R diagram and then • Look at one to one relationships as they might be redundant Look at many to many relationships as they might need to be split into two one to many links • Entities Attributes Relationships Cardinality ratios the relationships • of Entity Relationship Modelling
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.