Database
Database Project
Library Management System
Team Members
Nardin Philip Boles
20201448030
Doha Mahmoud Ramadan
20201372121
Mayar Kamel Samir
20201378683
Sally Mohamed Ghozal
20201378673
Yara Hassan Mohsen
20201447189
Mennatullah Magdy Mahmoud
20201378920
Business Rules
1)
A Branch must assign one or more Librarians.
A Librarian must be assigned to one Branch only.
2)
A Librarian may verify one or more Persons.
A Person must be verified by one Librarian only.
3)
A Librarian may search for one or more books.
A Book may be searched for by a number of Librarians.
4)
A Librarian may sell one or more Books.
A Book may be sold by one Librarian.
5)
A Person may purchase a number of Books.
A Book may be purchased by one person only.
6)
A Person may borrow a number of books.
A Book may be borrowed by a number of Persons.
7)
An Author may write one or more Books.
A Book may be written by one or more Authors.
8)
A Vendor may supply a number of Books to one or more
Branches.
A Vendor may supply one or more Books to a certain Branch.
A Book may be supplied to a certain Branch by one or more
Vendors.
Relational Model
Enhanced ERD
The ‘Librarian’ Entity is Partially Specialized into ‘IT’ and ‘Sales’
Entities by the Disjoint Rule.
An ‘Employee_Type’ attribute is added to the Supertype
(‘Librarian’ Entity) that works as a discriminator to indicate the
Subtype (whether the Librarian is ‘IT’ or ‘Sales’).
1)
The IT Librarian has a ‘Password’ attribute to access the system.
An IT Librarian may verify one or more Persons.
A Person must be verified by one IT Librarian only.
An IT librarian may search for one or more books.
A Book may be searched for by a number of IT Librarians.
2)
The Sales Librarian has a ‘Target’ attribute to set his monthly
target.
A Sales Librarian may sell one or more Books.
A Book may be sold by one Sales Librarian only.
The ‘Person’ Entity is Totally Specialized into ‘Buyer’ and
‘Borrower’ Entities (Overlap Rule):
A ‘Member_Type’ Attribute is added to the Supertype (‘Person’
Entity) that works as a discriminator to indicate the Subtype(s)
(whether the Person is ‘Buyer’ or ‘Borrower’ or both).
1)
The Buyer has the ‘Receipt Number’ attribute.
A Buyer may purchase one or more Books.
A Book must be purchased by one Buyer only.
2)
A Borrower has the ‘Date of Return’ attribute.
A Borrower may borrow one or more Books.
A Book may be borrowed by a number of Borrowers.
Enhanced
Relational Model
Oracle DBMS
Describe Book
Select * from Book
Oracle DBMS
Describe Author
Select * from Author
Oracle DBMS
Describe Write
Select * from Write
Oracle DBMS
Describe Vendor
Select * from Vendor
Oracle DBMS
Describe Branch
Select * from Branch
Oracle DBMS
Describe Branch Phone Number
Select * from Branch Phone Number
Oracle DBMS
Describe Supply
Select * from Supply
Oracle DBMS
Describe Librarian
Select * from Librarian
Oracle DBMS
Describe Person
Select * from Person
Oracle DBMS
Describe Person Phone Number
Select * from Person Phone Number
Oracle DBMS
Describe Purchase
Select * from Purchase
Oracle DBMS
Describe Borrow
Select * from Borrow
Oracle DBMS
Describe Sell
Select * from Sell