0% found this document useful (0 votes)
111 views

ITECH1103 Tutorial02 Portfolio

This document contains a tutorial on entity relationship modeling with several example scenarios and questions. It discusses issues with entity relationship diagrams, such as incorrect notation and missing attributes. It provides business rules for common relationships like employees to departments and projects. Students are asked to design entity relationship diagrams for scenarios involving customers and orders, employees and departments, car insurance customers and accidents, project team members, and a property rental system.

Uploaded by

Amitpal Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views

ITECH1103 Tutorial02 Portfolio

This document contains a tutorial on entity relationship modeling with several example scenarios and questions. It discusses issues with entity relationship diagrams, such as incorrect notation and missing attributes. It provides business rules for common relationships like employees to departments and projects. Students are asked to design entity relationship diagrams for scenarios involving customers and orders, employees and departments, car insurance customers and accidents, project team members, and a property rental system.

Uploaded by

Amitpal Singh
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

ITECH 1103 BIG DATA AND ANALYTICS

Tutorial 2
Topic
Entity Relationship Modelling

Review Questions

1. Identify issues in the Crow’s Foot notations used in the following ERD.

1. AUTHORS should be written as AUTHOR.


2.Book should be in capital letters like BOOK.
3.IS WRITTEN BY should be WRITES.

2. Given a scenario represented by the following entities, where customers place orders
for products:

CUSTOMER - customer number, name, address, phone number


ORDER - order number, order date, customer number and for each product ordered
the quantity ordered and the total line price
PRODUCT - product number, product description and product unit price

An initial ERD using Lucidchart for this scenario would be the following:

Page 1 of 4
An initial ERD using Lucidchart for this scenario would be the following:

This ERD only shows the primary keys of each of the entities, sometimes an ERD is
drawn such that it will show all the non-primary key attributes for the model. In such a
complete ERD you must not show or label foreign keys, the use of foreign keys
indicates that you are looking at a logical model where a choice has been made to use
a relational database, rather than a conceptual model.

Replicate the above diagram in your preferred diagramming software package. Once
you have done that, add all the non-primary key attributes listed in the scenario above.

In this case, if you were to add the foreign keys to the respective entities, can you see
any problems moving from a conceptual model to a logical/relational model? What
would you need to do to fix the problem?

Ans

Page 2 of 4
3. Using the above diagram and the business rules below, create an Entity
Relationship Diagram using Crow’s Foot notations.
o Include:
 all appropriate connectivities,
 all cardinalities and
 at least the minimum number of attributes required to implement the
model
o Business Rules:
 A department employs many employees, but each employee is
employed by one department.
 Some employees, known as "rovers," are not assigned to any
department.
 A division operates many departments, but each department is
operated by one division
 An employee may be assigned to many projects, and a project may
have many employees assigned to it.
 A project must have at least one employee assigned to it.
 One of the employees manages each department, and each
department is managed by one employee
 One of the employees runs each division, and each division is run by
one employee.

Page 3 of 4
SOLUTION

4. Design an ER diagram for a car insurance company whose customers own one or
more cars each. Each car has associated with it zero to many number of recorded
accidents.

5.

6. Acme Pty Ltd is made up of a number of departments that manage none or more
projects. Each project is made up of none or more team members.
Each team member belongs to one department. Each team member belongs to zero
to one project.
One of the team members supervise the other team members on the project.

Page 4 of 4
Portfolio Questions

7. Given the following business rules, create an ER diagram for each of the specified
relationships:
• A company operates four departments
• Each department employs staff
• Each staff may work for one or more departments
• A staff may be supervised by another staff member
• Each department has one manager.
Identify the entities and the attributes

8. Design an ER diagram for an university registrar including the following entities:


• Courses, including course number, title, credits, syllabus, and prerequisites;
• Course offerings, including course number, year and teaching period, instructors,
timings and classroom
• Students, including student-id, name, and program; and
• Instructors, including identification number, name, department, and title.
• Furthermore, the enrolment of students in courses and grades awarded to
students in each course they are enrolled in, must be appropriately modelled.
Document all assumptions that you have made

9. Prepare an Entity Relationship Diagram (ERD) showing all primary and non-primary
key attributes for the following description of a Property Rental System:

 Properties are rented by tenants. Each tenant is assigned a unique number by


the Agency. Data held about tenants include family name, given name, property
rented, contact address - street, city, state, postcode & telephone number. A
tenant may rent more than one property and many tenants may rent parts of the
same property (eg. a large shopping complex).
 Properties are owned by owners. Each property is assigned a unique building
number. The agency only recognises a single owner for any of the properties it
handles. The owner, address, and value are recorded for each property. In
addition the lease period and bond are recorded for each property or sub property
rented. An owner may own several properties.
 Properties are subject to damage and the agency records all instance of damage
to its properties - property, date, type of damage and repair cost are recorded.
Repair costs are charged directly to tenants
 Normal property maintenance is also noted - property, date, type of maintenance
and cost are recorded. Maintenance costs are charged to the property owner.
 Tenants pay accounts to the Agency - these consist of weekly rental payments,
bond payments (for new properties) and damage bills. The date of payment,
tenant, property, type of account (Rental, Bond, Damage) and amount are
recorded.
Page 5 of 4

You might also like