Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bookstore DB Requirements

Similar presentations


Presentation on theme: "Bookstore DB Requirements"— Presentation transcript:

1 Bookstore DB Requirements

2 Entity Sets Customers open an account by providing their national number, name, address, phone, and book type preferences. For each employee, the following information is recorded: an employee identification number, national number, name, address, phone, a birth date, and the position within the bookstore.

3 Entity Sets For each book writer, the following information is recorded: national number, name, address, and phone. Any ideas?

4 Entity Sets The database records the following information about each book: a book identification number, name, publication year, the publisher's name, the book category, and the number of books in stock.

5 Entity Sets The database also keeps the following information about book supplying companies: an identification number, name, phone, address, and the name of the contact person.

6 Relationships A book may be bought by one or more customers, and one customer may buy one or more books.

7 Relationships A book may be written by one or more writers, and one writer may write one or more books. Additionally, an employee may monitor the sales of one or more books; however, a book is monitored by exactly one employee. Suppliers may provide one or more books; however, a book is supplied by exactly one supplier.

8 ERD

9 Mapping ERD into tables

10 Relational Model Person (NN, Name, Address, Phone) Customer (NN, Pref) Emp (NN, Bdate, Pos) Writer (NN) Buy (Cust_NN, Book_ID) Writes (Writer_NN, Book_ID) Book (ID, Name, Publisher, Stock, Year, Category, Sup_ID, Monit_E_NN) Supplier (ID, Name, Address, Phone, Contact)


Download ppt "Bookstore DB Requirements"

Similar presentations


Ads by Google