100 likes | 114 Views
Bookstore DB Requirements. Entity Sets. Customers open an account by providing their national number, name, address, phone, and book type preferences.
E N D
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.
Entity Sets • For each book writer, the following information is recorded: national number, name, address, and phone. • Any ideas?
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.
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.
Relationships • A book may be bought by one or more customers, and one customer may buy one or more books.
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.
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)