1 / 10

Riyadh Philanthropic Society For Science Prince Sultan College For Woman

Understand class/subclass relationships & entity-relationship diagrams. Solve exercises on vehicle classification & staff management. Learn about entity types, relationships in a database system.

baty
Download Presentation

Riyadh Philanthropic Society For Science Prince Sultan College For Woman

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 Draw an E-R (Entity-Relationship) diagram for the following problem statement. The HappyGarden bookstore has several branches located in different places. Each branch is managed by a branch manager. Other staffs such as secretary and sales personnel are directly under the supervision of the branch manager. Every staff is allocated to only one branch. The staffs of the HappyGarden bookstore can be divided into two main types, full-time and part-time. The full-time staffs are paid by monthly salary, whereby the part-timers are paid buy hour rate. The particulars of staffs include staff name, staff number, gender, date-of-birth, address and telephone number.

  5. Exercise 2 (Solution)

  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. Every staff member has a manager (except for the director). Chapter 4 Tutorial 4

  7. Exercise 3 (Solution) ProjectName ID Name 1 N WORKS-ON STAFF PROJECT StartDate EndDate Title d MANAGER STAFF_MEMBER DIRECTOR 1 N MANAGES Chapter 4 Tutorial 5

  8. Ex: 4.17 Consider the BANK ER schema of Figure 3.21, and suppose that it is necessary to keep track of different types of ACCOUNTS (SAVINGS_ACCTS, CHECKING_ACCTS, ...) and LOANS (CAR_LOANS, HOME_LOANS, ...). Suppose that it is also desirable to keep track of each account's TRANSACTIONs (deposits, withdrawals, checks, ...) and each loan's PAYMENTs; both of these include the amount, date, time, ... . Modify the BANK schema, using ER and EER concepts of specialization and generalization. State any assumptions you make about the additional requirements.

  9. Ex: 4.17 (Solution)

More Related