Download presentation
1
Dept. of Computer & Information Sciences
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems (Chapter 4 Tutorial)
2
Exercise 1 A rental car agency classifies the vehicles it rents into four categories: compact, mid-size, full-size, and sport utility. The agency wants to record the following data for all vehicles: Vehicle-ID, Year, and Color. There are no unique attributes for any of the four classes of vehicle. The entity type vehicle has a relationship with a customer entity type. None of the four vehicle classes has a unique relationship with an entity type. Would you consider creating a class/subclass relationship? Why or why not? Chapter 4 Tutorial 1
3
Exercise 1 (Solution) No, because:
There are no unique attributes for any of the four classes of vehicle. None of the four vehicle classes has a unique relationship with an entity type.
4
Exercise 2 Identify the entities and relationships for the following description and draw an EER diagram. A company leases various types of vehicles, identified by a VID and having a gross vehicle weight (GVW). Trucks have a load capacity and a length. Cars have a seating capacity. Individuals (known by their name and drivers license) can lease one of the company’s vehicles for a specific period of time. Chapter 4 Tutorial 2
5
Exercise 2 (Solution) License No LeasePeriod VID M LEASES N PERSON
VEHICLE GVW Name d TRUCK CAR Load Length SeatingCapacity Chapter 4 Tutorial 3
6
Exercise 3 Identify the entities and relationships for the following description and draw an EER diagram. Library staff, each having an ID, name, and title work on a number of projects, each with its own name, start date and end date. Any given project is only worked on by one staff member. Every staff member has a manager (except for the director). Chapter 4 Tutorial 4
7
Exercise 3 (Solution) ID Name ProjectName 1 N STAFF PROJECT StartDate
WORKS-ON N STAFF PROJECT StartDate Title EndDate d MANAGER STAFF_MEMBER DIRECTOR 1 N MANAGES Chapter 4 Tutorial 5
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.