Library Database System 1
University Library
Project Report
Team 10
Anush Bonam - abonam@ncsu.edu
Jaithrik Yadav Bollaboina - jbollab@ncsu.edu
Manisha Reddy Chintapally - mchinth@ncsu.edu
Roshini Ravilla - rravill@ncsu.edu
Harini Reddy Kumbum - hkumbum@ncsu.edu
Library Database System 2
1. Problem Statement
The purpose of this UniversityLibrarydatabase systemistoorganize the data and to automate the
manual papersystem.Manyfunctionalitiesare providedtothe patrons(studentsandfaculty) like online
bookcheckout,bookrenew,bookreturn,reservingaroom, camera etc. Maintainingthe datamanually
for all the studentsinthe Universitywouldbe atedioustask.Universityalsoneedstomaintainrecords
of the students,faculty,books,conference proceedings,journalsandcameras.Managingthe manual
recordsfor the numberof publicationsavailableandcalculatingthe due amountmanuallywouldbe
inefficient.Inordertoovercome all these difficulties,LibraryDatabase Systemhasbeendesignedwhich
makesthe whole processeffortlessandeasytoaccess.StudentsandFacultycan use thisdatabase
applicationastheywish. Theywouldbe able tosearchthe database forany of the publications,
available roomsandcameras.Othercapabilitiesinclude checkingoutanyavailable book,renewinga
book,reservingabook,reservingaroomor checkingouta camera. . Withthe automatedsystem,
Database wouldbe able tokeeptrack of the variouscheckouts.
2. Entity Relationship Diagram
Library Database System 3
3. Entities and Relationships
3.1 Entities
1. Students: Students have a unique student id and password, using which they login into
the Library system. They have certain privileges like searching for publications (books,
Journals and conference papers), rooms and cameras. They can checkout, reserve or
renew these resources.
2. Faculty: Faculty have a unique faculty id and password with which they login. They
have the same privileges like students with some additional privileges like reserving a
book for a course.
3. Books: Books have a unique isbn which is used to identify them. They also store the
library name which indicates the library in which they’re available. The attributes of
books are edition, year of publication, author, title, book type, total number and
available number.
4. Journals: The journals table has similar attributes to the Books entity. The only
difference is that there is a unique issn instead of the isbn in the books table. Journal
type indicates if it’s a hard copy or an electronic copy.
5. Conference Proceedings: Conference papers are identified using the unique attribute
conf_paper_id. The other attributes of this entity are conf_name, authors, year of
publication title and conf_type. Conf_type like journals and books indicates if it’s a hard
copy or an electronic or both.
6. Rooms: The primary key for Rooms table is room_num, library name. The other
attributes include capacity,floor number and room type. Students can only reserve
study rooms whereas faculty can reserve both study rooms as well as conference
rooms.
7. Cameras: Cameras are uniquely identified using the primary key cam_id. It has
attributes like library name, make, model, lens config and memory.
3.2 Relationships
Courses taught: The courses taught by each faculty are maintained.
Courses enrolled: The courses and the corresponding students enrolled in it are maintained
Student book checkout: All the books checkout by each student, the issued date, due date,
returned date and the book type of the corresponding book are stored in it.
Faculty book checkout: All the books checkout by each faculty, the issued date, due date,
returned date and the book type of the corresponding book are stored in it.
Library Database System 4
Student book waitlist: When the requested book is not available, the student is added to the
student book waitlist and this list is used to allocate a book to waitlisted student when
available.
Faculty book waitlist: When the requested book is not available, the faculty is added to the
faculty book waitlist and this list is used to allocate a book to waitlisted faculty member when
available.
Faculty Reserves books: Faculty can reserve a book for a course for a period of four months
and these books can be checked out only by those students enrolled in that course.
Student conference Paper checkout: All the Conference papers checkout by each student,
the issued date, due date, returned date and the type (i.e., hard or electronic copy) of the
corresponding book are stored in it.
Faculty conference Paper checkout: All the Conference papers checkout by each faculty, the
issued date, due date, returned date and the type (i.e., hard or electronic copy) of the
corresponding book are stored in it.
Student conference Paper Waitlist: When the requested conference paper is not available,
the conference paper is added to the student conference paper waitlist and this list is used to
allocate a conference paper to waitlisted student when available.
Faculty conference Paper Waitlist: When the requested conference paper is not available,
the conference paper is added to the faculty conference paper waitlist and this list is used to
allocate a conference paper to waitlisted faculty when available.
Student Journal checkout: All the Journals checkout by each student, the issued date, due
date, returned date and the type (i.e., hard or electronic copy) of the corresponding journal
are stored in it.
Faculty Journal checkout: All the Journals checkout by each student, the issued date, due
date, returned date and the type (i.e., hard or electronic copy) of the corresponding journal
are stored in it.
Student Journal Waitlist: When the requested journal is not available, the journal is added to
the student journal waitlist and this list is used to allocate a journal to waitlisted student
when available.
Faculty Journal Waitlist: When the requested journal is not available, the journal is added to
the faculty journal waitlist and this list is used to allocate a journal to waitlisted faculty when
available.
Student Camera checkout: The student who checks out a camera on a particular day and the
issue date, due date, return date, check out time and check in time are stored.
Library Database System 5
Faculty Camera checkout: The faculty who checks out a camera on a particular day and the
issue date, due date, return date, check out time and check in time are stored.
Student Camera Waitlist: The students are waitlisted for the requested camera when not
available and the camera is allotted when it becomes available.
Faculty Camera Waitlist: The faculties are waitlisted for the requested camera when not
available and the camera is allotted when it becomes available.
Student Reserved Rooms: The students who reserved the rooms are stored along with the
room number, library name and capacity of the room.
Faculty Reserved Rooms: The students who reserved the rooms are stored along with the
room number, library name and capacity of the room.
Amount Due: The due amount that a student has to pay as a penalty for their late return of a
resource is stored in it.
Student Hold: The students who do not pay their due amount before 90 days after their due
date are added into the student hold and those students cannot checkout any resources until
they pay their due amount
4. Relational Model:
FACULTY
(
fac_id: VARCHAR2(10),
user_id: VARCHAR2(50) ,
password: VARCHAR2(50) ,
first_name :VARCHAR2(50) ,
last_name : VARCHAR2(50) ,
category: VARCHAR2(50) ,
dept_name :VARCHAR2(10) ,
nationality:VARCHAR2(20) ,
ph_num: VARCHAR2(20) ,
alt_ph_num: VARCHAR2(20),
dob: DATE ,
gender: VARCHAR2(20) ,
address: VARCHAR2(100) ,
PRIMARY KEY (fac_id)
);
STUDENTS
(
Library Database System 6
student_id:VARCHAR2(10),
user_id : VARCHAR2(50) ,
password:VARCHAR2(50) ,
first_name :VARCHAR2(50) ,
last_name :VARCHAR2(50) ,
gender:VARCHAR2(20) ,
ph_num: VARCHAR2(20) ,
alt_ph_num: VARCHAR2(20),
dob: DATE ,
address: VARCHAR2(100) ,
nationality:VARCHAR2(20) ,
degree :VARCHAR2(10) ,
dept_name :VARCHAR2(10) ,
classification:VARCHAR2(20) ,
category: VARCHAR2(20) ,
PRIMARYKEY (STUDENT_ID)
);
STUDENT_HOLD
(
student_id:VARCHAR2(10),
PRIMARY KEY (student_id),
);
COURSES_TAUGHT
(
course_id: VARCHAR2(50),
fac_id: VARCHAR2(10) ,/* ensuresthateverycourse hasa faculty*/
PRIMARY KEY (course_id),
);
COURSES_ENROLLED
(
course_id: VARCHAR2(50),
student_id :VARCHAR2(10),
PRIMARY KEY (course_id,student_id),
);
BOOKS
BOOKS
(
isbn: VARCHAR2(10),
edition:NUMBER(10) ,
Library Database System 7
publisher:VARCHAR2(100) ,
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
lib_name :VARCHAR2(20) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
book_type :VARCHAR2(20) CHECK (book_type in('electronic','hard','both')),
total_num: NUMBER(10) ,
available_num:NUMBER(10) ,
PRIMARYKEY (isbn)
);
STUDENTS_BOOKS_CHECKOUT
(
student_id :VARCHAR2(10),
isbn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
book_type :VARCHAR2(20),
PRIMARY KEY (isbn,student_id, issued_date,book_type),
);
FACULTY_BOOKS_CHECKOUT
(
fac_id: VARCHAR2(10),
isbn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
book_type :VARCHAR2(20),
PRIMARY KEY (isbn,fac_id,issued_date,book_type),
);
STUDENTS_BOOKS_WAITLIST
(
isbn: VARCHAR2(10),
student_id:VARCHAR2(10),
PRIMARY KEY (isbn,student_id),
);
FACULTY_BOOKS_WAITLIST
Library Database System 8
(
isbn: VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (isbn,fac_id),
);
FACULTY_RESERVE_BOOK
(
course_id: VARCHAR2(50),
isbn: VARCHAR2(10) ,
reserve_from_date:DATE,
reserve_to_date :DATE,
PRIMARY KEY (course_id,isbn),
);
CONFERENCEPAPERS
CONFERENCE_PAPERS
(
conf_paper_id:VARCHAR2(10),
conf_name : VARCHAR2(100) ,
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
available_num:NUMBER(10) ,
conf_type : VARCHAR2(20) CHECK (conf_type in('electronic','hard','both')),
PRIMARY KEY (conf_paper_id)
);
STUDENTS_CONF_PAPER_CHECKOUT
(
student_id:VARCHAR2(10),
conf_paper_id:VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
conf_type : VARCHAR2(20),
PRIMARY KEY (conf_paper_id,student_id,issued_date, conf_type),
);
FACULTY_CONF_PAPER_CHECKOUT
Library Database System 9
(
fac_id: VARCHAR2(10),
conf_paper_id:VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
conf_type : VARCHAR2(20),
PRIMARY KEY (conf_paper_id,fac_id,issued_date, conf_type),
);
STUDENTS_CONF_PAPERS_WAITLIST
(
conf_paper_id:VARCHAR2(10),
student_id:VARCHAR2(10),
PRIMARY KEY (conf_paper_id,student_id),
);
FACULTY_CONF_PAPERS_WAITLIST
(
conf_paper_id:VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (conf_paper_id,fac_id),
);
JOURNALS
(
issn: VARCHAR2(10),
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
available_num:NUMBER(10) ,
journal_type :VARCHAR2(20) CHECK (journal_typein('electronic','hard','both')),
PRIMARY KEY (issn)
);
STUDENTS_JOURNALS_CHECKOUT
(
student_id:VARCHAR2(10),
issn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
journal_type :VARCHAR2(20),
Library Database System 10
PRIMARY KEY (issn,student_id,issued_date,journal_type),
);
FACULTY_JOURNALS_CHECKOUT
(
fac_id: VARCHAR2(10),
issn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
journal_type :VARCHAR2(20),
PRIMARY KEY (issn,fac_id,issued_date, journal_type),
);
STUDENTS_JOURNALS_WAITLIST
(
issn: VARCHAR2(10),
student_id:VARCHAR2(10),
PRIMARY KEY (issn,student_id),
);
FACULTY_JOURNALS_WAITLIST
(
issn: VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (issn,fac_id),
);
CAMERAS
(
cam_id : VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
make : VARCHAR2(50),
model :VARCHAR2(50),
lens_config:VARCHAR2(50),
memory: VARCHAR2(10),
PRIMARY KEY (cam_id)
);
FACULTY_CAMERAS_CHECKOUT
(
Library Database System 11
fac_id: VARCHAR2(10),
cam_id : VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
PRIMARY KEY (cam_id,fac_id,issued_date),
);
STUDENTS_CAMERAS_CHECKOUT
(
student_id:VARCHAR2(10),
cam_id : VARCHAR2(10),
issued_date TIMESTAMP,
due_date TIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
PRIMARY KEY (cam_id,student_id,issued_date),
);
STUDENTS_CAMERAS_WAITLIST
(
student_id:VARCHAR2(10),
cam_id : VARCHAR2(10),
request_date :DATE,
);
FACULTY_CAMERAS_WAITLIST
(
fac_id: VARCHAR2(10),
cam_id : VARCHAR2(10),
request_date :DATE,
);
ROOMS
ROOMS
(
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
capacity: NUMBER(10) ,
floor_num:NUMBER(10) ,
room_type : VARCHAR2(20) CHECK (room_type in('STUDY','CONFERENCE')),
PRIMARY KEY (room_num,lib_name)
);
Library Database System 12
STUDENTS_RESERVED_ROOMS
(
student_id:VARCHAR2(10),
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
reserve_from_time TIMESTAMP,
reserve_to_timeTIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
occupancy: NUMBER,
PRIMARY KEY (room_num,lib_name,student_id),
);
FACULTY_RESERVED_ROOMS
(
fac_id: VARCHAR2(10),
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
reserve_from_time TIMESTAMP,
reserve_to_timeTIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
occupancy: NUMBER,
PRIMARY KEY (room_num,lib_name,fac_id),
);
AMOUNT_DUE
(
student_id :VARCHAR2(10),
resource_id:VARCHAR2(10),
due_date timestamp,
due_amount:NUMBER ,
payment_date timestamp,
return_date timestamp,
primarykey(student_id,resource_id,due_date),
);
NOTIFICATION
(
student_id :VARCHAR2(10),
Library Database System 13
message :VARCHAR2(128)
);
FACULTY
(
fac_id: VARCHAR2(10),
user_id: VARCHAR2(50) ,
password: VARCHAR2(50) ,
first_name :VARCHAR2(50) ,
last_name : VARCHAR2(50) ,
category: VARCHAR2(50) ,
dept_name :VARCHAR2(10) ,
nationality:VARCHAR2(20) ,
ph_num: VARCHAR2(20) ,
alt_ph_num: VARCHAR2(20),
dob: DATE ,
gender: VARCHAR2(20) ,
address: VARCHAR2(100) ,
PRIMARY KEY (fac_id)
);
STUDENTS
(
student_id:VARCHAR2(10),
user_id : VARCHAR2(50) ,
password:VARCHAR2(50) ,
first_name :VARCHAR2(50) ,
last_name :VARCHAR2(50) ,
gender:VARCHAR2(20) ,
ph_num: VARCHAR2(20) ,
alt_ph_num: VARCHAR2(20),
dob: DATE ,
address: VARCHAR2(100) ,
nationality:VARCHAR2(20) ,
degree :VARCHAR2(10) ,
dept_name :VARCHAR2(10) ,
classification:VARCHAR2(20) ,
category: VARCHAR2(20) ,
PRIMARYKEY (STUDENT_ID)
);
Library Database System 14
STUDENT_HOLD
(
student_id:VARCHAR2(10),
PRIMARY KEY (student_id),
);
COURSES_TAUGHT
(
course_id: VARCHAR2(50),
fac_id: VARCHAR2(10) ,/* ensuresthateverycourse hasa faculty*/
PRIMARY KEY (course_id),
);
COURSES_ENROLLED
(
course_id: VARCHAR2(50),
student_id :VARCHAR2(10),
PRIMARY KEY (course_id,student_id),
);
BOOKS
(
isbn: VARCHAR2(10),
edition:NUMBER(10) ,
publisher:VARCHAR2(100) ,
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
lib_name :VARCHAR2(20) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
book_type :VARCHAR2(20) CHECK (book_type in('electronic','hard','both')),
total_num: NUMBER(10) ,
available_num:NUMBER(10) ,
PRIMARY KEY (isbn)
);
STUDENTS_BOOKS_CHECKOUT
(
student_id :VARCHAR2(10),
Library Database System 15
isbn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
book_type :VARCHAR2(20),
PRIMARY KEY (isbn,student_id, issued_date,book_type),
);
FACULTY_BOOKS_CHECKOUT
(
fac_id: VARCHAR2(10),
isbn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
book_type :VARCHAR2(20),
PRIMARY KEY (isbn,fac_id,issued_date,book_type),
);
STUDENTS_BOOKS_WAITLIST
(
isbn: VARCHAR2(10),
student_id:VARCHAR2(10),
PRIMARY KEY (isbn,student_id),
);
FACULTY_BOOKS_WAITLIST
(
isbn: VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (isbn,fac_id),
);
FACULTY_RESERVE_BOOK
(
course_id: VARCHAR2(50),
isbn: VARCHAR2(10) ,
reserve_from_date:DATE,
reserve_to_date :DATE,
PRIMARY KEY (course_id,isbn),
Library Database System 16
);
CONFERENCE_PAPERS
(
conf_paper_id:VARCHAR2(10),
conf_name : VARCHAR2(100) ,
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
available_num:NUMBER(10) ,
conf_type : VARCHAR2(20) CHECK (conf_type in('electronic','hard','both')),
PRIMARY KEY (conf_paper_id)
);
STUDENTS_CONF_PAPER_CHECKOUT
(
student_id:VARCHAR2(10),
conf_paper_id:VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
conf_type : VARCHAR2(20),
PRIMARY KEY (conf_paper_id,student_id,issued_date, conf_type),
);
FACULTY_CONF_PAPER_CHECKOUT
(
fac_id: VARCHAR2(10),
conf_paper_id:VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
conf_type : VARCHAR2(20),
PRIMARY KEY (conf_paper_id,fac_id,issued_date, conf_type),
);
STUDENTS_CONF_PAPERS_WAITLIST
(
conf_paper_id:VARCHAR2(10),
student_id:VARCHAR2(10),
Library Database System 17
PRIMARY KEY (conf_paper_id,student_id),
);
FACULTY_CONF_PAPERS_WAITLIST
(
conf_paper_id:VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (conf_paper_id,fac_id),
);
JOURNALS
(
issn: VARCHAR2(10),
authors: VARCHAR2(100) ,
year_of_publication:NUMBER(6) ,
title :VARCHAR2(100) ,
available_num:NUMBER(10) ,
journal_type :VARCHAR2(20) CHECK (journal_typein('electronic','hard','both')),
PRIMARY KEY (issn)
);
STUDENTS_JOURNALS_CHECKOUT
(
student_id:VARCHAR2(10),
issn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
journal_type :VARCHAR2(20),
PRIMARY KEY (issn,student_id,issued_date,journal_type),
);
FACULTY_JOURNALS_CHECKOUT
(
fac_id: VARCHAR2(10),
issn: VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :TIMESTAMP,
Library Database System 18
journal_type :VARCHAR2(20),
PRIMARY KEY (issn,fac_id,issued_date, journal_type),
);
STUDENTS_JOURNALS_WAITLIST
(
issn: VARCHAR2(10),
student_id:VARCHAR2(10),
PRIMARY KEY (issn,student_id),
);
FACULTY_JOURNALS_WAITLIST
(
issn: VARCHAR2(10),
fac_id: VARCHAR2(10),
PRIMARY KEY (issn,fac_id),
);
CAMERAS
(
cam_id : VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
make : VARCHAR2(50),
model :VARCHAR2(50),
lens_config:VARCHAR2(50),
memory: VARCHAR2(10),
PRIMARY KEY (cam_id)
);
FACULTY_CAMERAS_CHECKOUT
(
fac_id: VARCHAR2(10),
cam_id : VARCHAR2(10),
issued_date :TIMESTAMP,
due_date : TIMESTAMP,
returned_date :DATE,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
PRIMARY KEY (cam_id,fac_id,issued_date),
);
Library Database System 19
STUDENTS_CAMERAS_CHECKOUT
(
student_id:VARCHAR2(10),
cam_id : VARCHAR2(10),
issued_date TIMESTAMP,
due_date TIMESTAMP,
returned_date TIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
PRIMARY KEY (cam_id,student_id,issued_date),
);
STUDENTS_CAMERAS_WAITLIST
(
student_id:VARCHAR2(10),
cam_id : VARCHAR2(10),
request_date :DATE,
);
FACULTY_CAMERAS_WAITLIST
(
fac_id: VARCHAR2(10),
cam_id : VARCHAR2(10),
request_date :DATE,
);
ROOMS
(
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
capacity: NUMBER(10) ,
floor_num:NUMBER(10) ,
room_type : VARCHAR2(20) CHECK (room_type in('STUDY','CONFERENCE')),
PRIMARY KEY (room_num,lib_name)
);
STUDENTS_RESERVED_ROOMS
(
student_id:VARCHAR2(10),
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
reserve_from_time TIMESTAMP,
reserve_to_timeTIMESTAMP,
Library Database System 20
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
occupancy: NUMBER,
PRIMARY KEY (room_num,lib_name,student_id),
);
FACULTY_RESERVED_ROOMS
(
fac_id: VARCHAR2(10),
room_num: VARCHAR2(10),
lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')),
reserve_from_time TIMESTAMP,
reserve_to_timeTIMESTAMP,
checked_out_time TIMESTAMP,
checked_in_timeTIMESTAMP,
occupancy: NUMBER,
PRIMARY KEY (room_num,lib_name,fac_id),
);
AMOUNT_DUE
(
student_id :VARCHAR2(10),
resource_id:VARCHAR2(10),
due_date timestamp,
due_amount:NUMBER ,
payment_date timestamp,
return_date timestamp,
primarykey(student_id,resource_id,due_date),
);
NOTIFICATION
(
student_id :VARCHAR2(10),
message :VARCHAR2(128)
);
Library Database System 21
5. Constraints
 Patrons cannotcheckout if someone is on waitlist for the same.
 Any type of reserved books (hardcopy or electronic) cannot be checked-
out, if student is not registered for the course.
 Students can checkout only one copy of a title(ISBN).
 A patron can reserveonly one roomat a point of time, but there is no limit
for the whole day.
 Faculty cannot reservesame book for two courses that he teaches.
 Cannot book rooms occupancy greater than capacity
 Constrainton reserved book and normalbook on due date period
 Before checkout a book check if anyoneon waitlist
 While updating the books table for a returned book, make surethe
returned date is not null in checkouttable (samefor all resources)
 Only study rooms for students
 Conference rooms only in hunt
 If book is reserved checkoutfor is only 4 hrs.
 All check constraints are implemented during table creation.
 Journals and conference proceedings can only be checked out for 12 hours.
 Students can check out books for two weeks and faculties for one month.
 Waitlists are prioritized for faculty.
 Rooms can be checked out only after starttime and cannot be checked out
after one hour of start time.
 The maximum reservation time for a roomis 3 hours.
 Students can only reservestudy rooms, faculties are can reserveboth
conference and study rooms.
 Cameras can only be checked on Fridays from9 A.M. to 12 P.M. and
returned on Thursdays 6 P.M.
 Camera checked out cannotbe renewed.
 Notifications at 30 , 60 and 90 days aresent.
6. Functional Dependencies andNormal Forms:
1. FACULTY
Library Database System 22
fac_id → user_id ,password,first_name,last_name,category,dept_name ,nationality
,ph_num,alt_ph_num,dob,gender,address
2. STUDENTS
student_id → user_id, password, first_name , last_name , gender, ph_num,
alt_ph_num, dob , address, nationality, degree , dept_name , classification, category
3. STUDENT_HOLD
No Functional dependencies
4. COURSES_TAUGHT
course_id → fac_id
5. COURSES_ENROLLED
No Functional dependencies
6. BOOKS
isbn→ edition,publisher,authors,year_of_publication,title ,lib_name ,book_type
,total_num,available_num
7. STUDENTS_BOOKS_CHECKOUT
student_id,isbn,issued_date ,book_type → due_date ,returned_date
8. FACULTY_BOOKS_CHECKOUT
fac_id,isbn,issued_date ,book_type → due_date ,returned_date
9. STUDENTS_BOOKS_WAITLIST
No Functional dependencies
10. FACULTY_BOOKS_WAITLIST
No Functional dependencies
11. FACULTY_RESERVE_BOOK
course_id,isbn → reserve_from_date ,reserve_to_date
12. CONFERENCE_PAPERS
conf_paper_id → conf_name ,authors,year_of_publication,title ,available_num
,conf_type
Library Database System 23
13. STUDENTS_CONF_PAPER_CHECKOUT
student_id,conf_paper_id,issued_date, conf_type → due_date ,returned_date,
14. FACULTY_CONF_PAPER_CHECKOUT
fac_id,conf_paper_id,issued_date , conf_type → due_date ,returned_date
15. STUDENTS_CONF_PAPERS_WAITLIST
No functional dependencies
16. FACULTY_CONF_PAPERS_WAITLIST
No functional dependencies
17. JOURNALS
issn→ authors,year_of_publication,title ,available_num,journal_type
18. STUDENTS_JOURNALS_CHECKOUT
student_id,issn,issued_date, journal_type → due_date ,returned_date
19. FACULTY_JOURNALS_CHECKOUT
fac_id,issn,issued_date , journal_type → due_date ,returned_date
20. STUDENTS_JOURNALS_WAITLIST
No Functional Dependencies
21. FACULTY_JOURNALS_WAITLIST
No Functional Dependencies
22. CAMERAS
cam_id → ib_name ,make ,model ,lens_config ,memory
23. FACULTY_CAMERAS_CHECKOUT
fac_id,cam_id ,issued_date → due_date , checked_out_time ,checked_in_time
24. STUDENTS_CAMERAS_CHECKOUT
student_id,cam_id,issued_date → due_date , checked_out_time ,checked_in_time
25. STUDENTS_CAMERAS_WAITLIST
No Functional Dependencies
26. FACULTY_CAMERAS_WAITLIST
Library Database System 24
No Functional Dependencies
27. ROOMS
room_num,lib_name → capacity,floor_num,room_type
28. STUDENTS_RESERVED_ROOMS
student_id,room_num,lib_name → reserve_from_time,reserve_to_time
,checked_out_time,checked_in_time,occupancy
29. FACULTY_RESERVED_ROOMS
fac_id,room_num,lib_name → reserve_from_time ,reserve_to_time ,checked_out_time
,checked_in_time ,occupancy
30. AMOUNT_DUE
student_id ,resource_id,due_date → due_amount,payment_date,return_date
31. NOTIFICATION
No Functional dependency

Project Report_team10

  • 1.
    Library Database System1 University Library Project Report Team 10 Anush Bonam - abonam@ncsu.edu Jaithrik Yadav Bollaboina - jbollab@ncsu.edu Manisha Reddy Chintapally - mchinth@ncsu.edu Roshini Ravilla - rravill@ncsu.edu Harini Reddy Kumbum - hkumbum@ncsu.edu
  • 2.
    Library Database System2 1. Problem Statement The purpose of this UniversityLibrarydatabase systemistoorganize the data and to automate the manual papersystem.Manyfunctionalitiesare providedtothe patrons(studentsandfaculty) like online bookcheckout,bookrenew,bookreturn,reservingaroom, camera etc. Maintainingthe datamanually for all the studentsinthe Universitywouldbe atedioustask.Universityalsoneedstomaintainrecords of the students,faculty,books,conference proceedings,journalsandcameras.Managingthe manual recordsfor the numberof publicationsavailableandcalculatingthe due amountmanuallywouldbe inefficient.Inordertoovercome all these difficulties,LibraryDatabase Systemhasbeendesignedwhich makesthe whole processeffortlessandeasytoaccess.StudentsandFacultycan use thisdatabase applicationastheywish. Theywouldbe able tosearchthe database forany of the publications, available roomsandcameras.Othercapabilitiesinclude checkingoutanyavailable book,renewinga book,reservingabook,reservingaroomor checkingouta camera. . Withthe automatedsystem, Database wouldbe able tokeeptrack of the variouscheckouts. 2. Entity Relationship Diagram
  • 3.
    Library Database System3 3. Entities and Relationships 3.1 Entities 1. Students: Students have a unique student id and password, using which they login into the Library system. They have certain privileges like searching for publications (books, Journals and conference papers), rooms and cameras. They can checkout, reserve or renew these resources. 2. Faculty: Faculty have a unique faculty id and password with which they login. They have the same privileges like students with some additional privileges like reserving a book for a course. 3. Books: Books have a unique isbn which is used to identify them. They also store the library name which indicates the library in which they’re available. The attributes of books are edition, year of publication, author, title, book type, total number and available number. 4. Journals: The journals table has similar attributes to the Books entity. The only difference is that there is a unique issn instead of the isbn in the books table. Journal type indicates if it’s a hard copy or an electronic copy. 5. Conference Proceedings: Conference papers are identified using the unique attribute conf_paper_id. The other attributes of this entity are conf_name, authors, year of publication title and conf_type. Conf_type like journals and books indicates if it’s a hard copy or an electronic or both. 6. Rooms: The primary key for Rooms table is room_num, library name. The other attributes include capacity,floor number and room type. Students can only reserve study rooms whereas faculty can reserve both study rooms as well as conference rooms. 7. Cameras: Cameras are uniquely identified using the primary key cam_id. It has attributes like library name, make, model, lens config and memory. 3.2 Relationships Courses taught: The courses taught by each faculty are maintained. Courses enrolled: The courses and the corresponding students enrolled in it are maintained Student book checkout: All the books checkout by each student, the issued date, due date, returned date and the book type of the corresponding book are stored in it. Faculty book checkout: All the books checkout by each faculty, the issued date, due date, returned date and the book type of the corresponding book are stored in it.
  • 4.
    Library Database System4 Student book waitlist: When the requested book is not available, the student is added to the student book waitlist and this list is used to allocate a book to waitlisted student when available. Faculty book waitlist: When the requested book is not available, the faculty is added to the faculty book waitlist and this list is used to allocate a book to waitlisted faculty member when available. Faculty Reserves books: Faculty can reserve a book for a course for a period of four months and these books can be checked out only by those students enrolled in that course. Student conference Paper checkout: All the Conference papers checkout by each student, the issued date, due date, returned date and the type (i.e., hard or electronic copy) of the corresponding book are stored in it. Faculty conference Paper checkout: All the Conference papers checkout by each faculty, the issued date, due date, returned date and the type (i.e., hard or electronic copy) of the corresponding book are stored in it. Student conference Paper Waitlist: When the requested conference paper is not available, the conference paper is added to the student conference paper waitlist and this list is used to allocate a conference paper to waitlisted student when available. Faculty conference Paper Waitlist: When the requested conference paper is not available, the conference paper is added to the faculty conference paper waitlist and this list is used to allocate a conference paper to waitlisted faculty when available. Student Journal checkout: All the Journals checkout by each student, the issued date, due date, returned date and the type (i.e., hard or electronic copy) of the corresponding journal are stored in it. Faculty Journal checkout: All the Journals checkout by each student, the issued date, due date, returned date and the type (i.e., hard or electronic copy) of the corresponding journal are stored in it. Student Journal Waitlist: When the requested journal is not available, the journal is added to the student journal waitlist and this list is used to allocate a journal to waitlisted student when available. Faculty Journal Waitlist: When the requested journal is not available, the journal is added to the faculty journal waitlist and this list is used to allocate a journal to waitlisted faculty when available. Student Camera checkout: The student who checks out a camera on a particular day and the issue date, due date, return date, check out time and check in time are stored.
  • 5.
    Library Database System5 Faculty Camera checkout: The faculty who checks out a camera on a particular day and the issue date, due date, return date, check out time and check in time are stored. Student Camera Waitlist: The students are waitlisted for the requested camera when not available and the camera is allotted when it becomes available. Faculty Camera Waitlist: The faculties are waitlisted for the requested camera when not available and the camera is allotted when it becomes available. Student Reserved Rooms: The students who reserved the rooms are stored along with the room number, library name and capacity of the room. Faculty Reserved Rooms: The students who reserved the rooms are stored along with the room number, library name and capacity of the room. Amount Due: The due amount that a student has to pay as a penalty for their late return of a resource is stored in it. Student Hold: The students who do not pay their due amount before 90 days after their due date are added into the student hold and those students cannot checkout any resources until they pay their due amount 4. Relational Model: FACULTY ( fac_id: VARCHAR2(10), user_id: VARCHAR2(50) , password: VARCHAR2(50) , first_name :VARCHAR2(50) , last_name : VARCHAR2(50) , category: VARCHAR2(50) , dept_name :VARCHAR2(10) , nationality:VARCHAR2(20) , ph_num: VARCHAR2(20) , alt_ph_num: VARCHAR2(20), dob: DATE , gender: VARCHAR2(20) , address: VARCHAR2(100) , PRIMARY KEY (fac_id) ); STUDENTS (
  • 6.
    Library Database System6 student_id:VARCHAR2(10), user_id : VARCHAR2(50) , password:VARCHAR2(50) , first_name :VARCHAR2(50) , last_name :VARCHAR2(50) , gender:VARCHAR2(20) , ph_num: VARCHAR2(20) , alt_ph_num: VARCHAR2(20), dob: DATE , address: VARCHAR2(100) , nationality:VARCHAR2(20) , degree :VARCHAR2(10) , dept_name :VARCHAR2(10) , classification:VARCHAR2(20) , category: VARCHAR2(20) , PRIMARYKEY (STUDENT_ID) ); STUDENT_HOLD ( student_id:VARCHAR2(10), PRIMARY KEY (student_id), ); COURSES_TAUGHT ( course_id: VARCHAR2(50), fac_id: VARCHAR2(10) ,/* ensuresthateverycourse hasa faculty*/ PRIMARY KEY (course_id), ); COURSES_ENROLLED ( course_id: VARCHAR2(50), student_id :VARCHAR2(10), PRIMARY KEY (course_id,student_id), ); BOOKS BOOKS ( isbn: VARCHAR2(10), edition:NUMBER(10) ,
  • 7.
    Library Database System7 publisher:VARCHAR2(100) , authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , lib_name :VARCHAR2(20) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), book_type :VARCHAR2(20) CHECK (book_type in('electronic','hard','both')), total_num: NUMBER(10) , available_num:NUMBER(10) , PRIMARYKEY (isbn) ); STUDENTS_BOOKS_CHECKOUT ( student_id :VARCHAR2(10), isbn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, book_type :VARCHAR2(20), PRIMARY KEY (isbn,student_id, issued_date,book_type), ); FACULTY_BOOKS_CHECKOUT ( fac_id: VARCHAR2(10), isbn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, book_type :VARCHAR2(20), PRIMARY KEY (isbn,fac_id,issued_date,book_type), ); STUDENTS_BOOKS_WAITLIST ( isbn: VARCHAR2(10), student_id:VARCHAR2(10), PRIMARY KEY (isbn,student_id), ); FACULTY_BOOKS_WAITLIST
  • 8.
    Library Database System8 ( isbn: VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (isbn,fac_id), ); FACULTY_RESERVE_BOOK ( course_id: VARCHAR2(50), isbn: VARCHAR2(10) , reserve_from_date:DATE, reserve_to_date :DATE, PRIMARY KEY (course_id,isbn), ); CONFERENCEPAPERS CONFERENCE_PAPERS ( conf_paper_id:VARCHAR2(10), conf_name : VARCHAR2(100) , authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , available_num:NUMBER(10) , conf_type : VARCHAR2(20) CHECK (conf_type in('electronic','hard','both')), PRIMARY KEY (conf_paper_id) ); STUDENTS_CONF_PAPER_CHECKOUT ( student_id:VARCHAR2(10), conf_paper_id:VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, conf_type : VARCHAR2(20), PRIMARY KEY (conf_paper_id,student_id,issued_date, conf_type), ); FACULTY_CONF_PAPER_CHECKOUT
  • 9.
    Library Database System9 ( fac_id: VARCHAR2(10), conf_paper_id:VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, conf_type : VARCHAR2(20), PRIMARY KEY (conf_paper_id,fac_id,issued_date, conf_type), ); STUDENTS_CONF_PAPERS_WAITLIST ( conf_paper_id:VARCHAR2(10), student_id:VARCHAR2(10), PRIMARY KEY (conf_paper_id,student_id), ); FACULTY_CONF_PAPERS_WAITLIST ( conf_paper_id:VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (conf_paper_id,fac_id), ); JOURNALS ( issn: VARCHAR2(10), authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , available_num:NUMBER(10) , journal_type :VARCHAR2(20) CHECK (journal_typein('electronic','hard','both')), PRIMARY KEY (issn) ); STUDENTS_JOURNALS_CHECKOUT ( student_id:VARCHAR2(10), issn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, journal_type :VARCHAR2(20),
  • 10.
    Library Database System10 PRIMARY KEY (issn,student_id,issued_date,journal_type), ); FACULTY_JOURNALS_CHECKOUT ( fac_id: VARCHAR2(10), issn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, journal_type :VARCHAR2(20), PRIMARY KEY (issn,fac_id,issued_date, journal_type), ); STUDENTS_JOURNALS_WAITLIST ( issn: VARCHAR2(10), student_id:VARCHAR2(10), PRIMARY KEY (issn,student_id), ); FACULTY_JOURNALS_WAITLIST ( issn: VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (issn,fac_id), ); CAMERAS ( cam_id : VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), make : VARCHAR2(50), model :VARCHAR2(50), lens_config:VARCHAR2(50), memory: VARCHAR2(10), PRIMARY KEY (cam_id) ); FACULTY_CAMERAS_CHECKOUT (
  • 11.
    Library Database System11 fac_id: VARCHAR2(10), cam_id : VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, PRIMARY KEY (cam_id,fac_id,issued_date), ); STUDENTS_CAMERAS_CHECKOUT ( student_id:VARCHAR2(10), cam_id : VARCHAR2(10), issued_date TIMESTAMP, due_date TIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, PRIMARY KEY (cam_id,student_id,issued_date), ); STUDENTS_CAMERAS_WAITLIST ( student_id:VARCHAR2(10), cam_id : VARCHAR2(10), request_date :DATE, ); FACULTY_CAMERAS_WAITLIST ( fac_id: VARCHAR2(10), cam_id : VARCHAR2(10), request_date :DATE, ); ROOMS ROOMS ( room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), capacity: NUMBER(10) , floor_num:NUMBER(10) , room_type : VARCHAR2(20) CHECK (room_type in('STUDY','CONFERENCE')), PRIMARY KEY (room_num,lib_name) );
  • 12.
    Library Database System12 STUDENTS_RESERVED_ROOMS ( student_id:VARCHAR2(10), room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), reserve_from_time TIMESTAMP, reserve_to_timeTIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, occupancy: NUMBER, PRIMARY KEY (room_num,lib_name,student_id), ); FACULTY_RESERVED_ROOMS ( fac_id: VARCHAR2(10), room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), reserve_from_time TIMESTAMP, reserve_to_timeTIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, occupancy: NUMBER, PRIMARY KEY (room_num,lib_name,fac_id), ); AMOUNT_DUE ( student_id :VARCHAR2(10), resource_id:VARCHAR2(10), due_date timestamp, due_amount:NUMBER , payment_date timestamp, return_date timestamp, primarykey(student_id,resource_id,due_date), ); NOTIFICATION ( student_id :VARCHAR2(10),
  • 13.
    Library Database System13 message :VARCHAR2(128) ); FACULTY ( fac_id: VARCHAR2(10), user_id: VARCHAR2(50) , password: VARCHAR2(50) , first_name :VARCHAR2(50) , last_name : VARCHAR2(50) , category: VARCHAR2(50) , dept_name :VARCHAR2(10) , nationality:VARCHAR2(20) , ph_num: VARCHAR2(20) , alt_ph_num: VARCHAR2(20), dob: DATE , gender: VARCHAR2(20) , address: VARCHAR2(100) , PRIMARY KEY (fac_id) ); STUDENTS ( student_id:VARCHAR2(10), user_id : VARCHAR2(50) , password:VARCHAR2(50) , first_name :VARCHAR2(50) , last_name :VARCHAR2(50) , gender:VARCHAR2(20) , ph_num: VARCHAR2(20) , alt_ph_num: VARCHAR2(20), dob: DATE , address: VARCHAR2(100) , nationality:VARCHAR2(20) , degree :VARCHAR2(10) , dept_name :VARCHAR2(10) , classification:VARCHAR2(20) , category: VARCHAR2(20) , PRIMARYKEY (STUDENT_ID) );
  • 14.
    Library Database System14 STUDENT_HOLD ( student_id:VARCHAR2(10), PRIMARY KEY (student_id), ); COURSES_TAUGHT ( course_id: VARCHAR2(50), fac_id: VARCHAR2(10) ,/* ensuresthateverycourse hasa faculty*/ PRIMARY KEY (course_id), ); COURSES_ENROLLED ( course_id: VARCHAR2(50), student_id :VARCHAR2(10), PRIMARY KEY (course_id,student_id), ); BOOKS ( isbn: VARCHAR2(10), edition:NUMBER(10) , publisher:VARCHAR2(100) , authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , lib_name :VARCHAR2(20) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), book_type :VARCHAR2(20) CHECK (book_type in('electronic','hard','both')), total_num: NUMBER(10) , available_num:NUMBER(10) , PRIMARY KEY (isbn) ); STUDENTS_BOOKS_CHECKOUT ( student_id :VARCHAR2(10),
  • 15.
    Library Database System15 isbn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, book_type :VARCHAR2(20), PRIMARY KEY (isbn,student_id, issued_date,book_type), ); FACULTY_BOOKS_CHECKOUT ( fac_id: VARCHAR2(10), isbn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, book_type :VARCHAR2(20), PRIMARY KEY (isbn,fac_id,issued_date,book_type), ); STUDENTS_BOOKS_WAITLIST ( isbn: VARCHAR2(10), student_id:VARCHAR2(10), PRIMARY KEY (isbn,student_id), ); FACULTY_BOOKS_WAITLIST ( isbn: VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (isbn,fac_id), ); FACULTY_RESERVE_BOOK ( course_id: VARCHAR2(50), isbn: VARCHAR2(10) , reserve_from_date:DATE, reserve_to_date :DATE, PRIMARY KEY (course_id,isbn),
  • 16.
    Library Database System16 ); CONFERENCE_PAPERS ( conf_paper_id:VARCHAR2(10), conf_name : VARCHAR2(100) , authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , available_num:NUMBER(10) , conf_type : VARCHAR2(20) CHECK (conf_type in('electronic','hard','both')), PRIMARY KEY (conf_paper_id) ); STUDENTS_CONF_PAPER_CHECKOUT ( student_id:VARCHAR2(10), conf_paper_id:VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, conf_type : VARCHAR2(20), PRIMARY KEY (conf_paper_id,student_id,issued_date, conf_type), ); FACULTY_CONF_PAPER_CHECKOUT ( fac_id: VARCHAR2(10), conf_paper_id:VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, conf_type : VARCHAR2(20), PRIMARY KEY (conf_paper_id,fac_id,issued_date, conf_type), ); STUDENTS_CONF_PAPERS_WAITLIST ( conf_paper_id:VARCHAR2(10), student_id:VARCHAR2(10),
  • 17.
    Library Database System17 PRIMARY KEY (conf_paper_id,student_id), ); FACULTY_CONF_PAPERS_WAITLIST ( conf_paper_id:VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (conf_paper_id,fac_id), ); JOURNALS ( issn: VARCHAR2(10), authors: VARCHAR2(100) , year_of_publication:NUMBER(6) , title :VARCHAR2(100) , available_num:NUMBER(10) , journal_type :VARCHAR2(20) CHECK (journal_typein('electronic','hard','both')), PRIMARY KEY (issn) ); STUDENTS_JOURNALS_CHECKOUT ( student_id:VARCHAR2(10), issn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP, journal_type :VARCHAR2(20), PRIMARY KEY (issn,student_id,issued_date,journal_type), ); FACULTY_JOURNALS_CHECKOUT ( fac_id: VARCHAR2(10), issn: VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :TIMESTAMP,
  • 18.
    Library Database System18 journal_type :VARCHAR2(20), PRIMARY KEY (issn,fac_id,issued_date, journal_type), ); STUDENTS_JOURNALS_WAITLIST ( issn: VARCHAR2(10), student_id:VARCHAR2(10), PRIMARY KEY (issn,student_id), ); FACULTY_JOURNALS_WAITLIST ( issn: VARCHAR2(10), fac_id: VARCHAR2(10), PRIMARY KEY (issn,fac_id), ); CAMERAS ( cam_id : VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), make : VARCHAR2(50), model :VARCHAR2(50), lens_config:VARCHAR2(50), memory: VARCHAR2(10), PRIMARY KEY (cam_id) ); FACULTY_CAMERAS_CHECKOUT ( fac_id: VARCHAR2(10), cam_id : VARCHAR2(10), issued_date :TIMESTAMP, due_date : TIMESTAMP, returned_date :DATE, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, PRIMARY KEY (cam_id,fac_id,issued_date), );
  • 19.
    Library Database System19 STUDENTS_CAMERAS_CHECKOUT ( student_id:VARCHAR2(10), cam_id : VARCHAR2(10), issued_date TIMESTAMP, due_date TIMESTAMP, returned_date TIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, PRIMARY KEY (cam_id,student_id,issued_date), ); STUDENTS_CAMERAS_WAITLIST ( student_id:VARCHAR2(10), cam_id : VARCHAR2(10), request_date :DATE, ); FACULTY_CAMERAS_WAITLIST ( fac_id: VARCHAR2(10), cam_id : VARCHAR2(10), request_date :DATE, ); ROOMS ( room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), capacity: NUMBER(10) , floor_num:NUMBER(10) , room_type : VARCHAR2(20) CHECK (room_type in('STUDY','CONFERENCE')), PRIMARY KEY (room_num,lib_name) ); STUDENTS_RESERVED_ROOMS ( student_id:VARCHAR2(10), room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), reserve_from_time TIMESTAMP, reserve_to_timeTIMESTAMP,
  • 20.
    Library Database System20 checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, occupancy: NUMBER, PRIMARY KEY (room_num,lib_name,student_id), ); FACULTY_RESERVED_ROOMS ( fac_id: VARCHAR2(10), room_num: VARCHAR2(10), lib_name :VARCHAR2(10) CHECK (lib_name in('J.B.HUNT','D.H.HILL')), reserve_from_time TIMESTAMP, reserve_to_timeTIMESTAMP, checked_out_time TIMESTAMP, checked_in_timeTIMESTAMP, occupancy: NUMBER, PRIMARY KEY (room_num,lib_name,fac_id), ); AMOUNT_DUE ( student_id :VARCHAR2(10), resource_id:VARCHAR2(10), due_date timestamp, due_amount:NUMBER , payment_date timestamp, return_date timestamp, primarykey(student_id,resource_id,due_date), ); NOTIFICATION ( student_id :VARCHAR2(10), message :VARCHAR2(128) );
  • 21.
    Library Database System21 5. Constraints  Patrons cannotcheckout if someone is on waitlist for the same.  Any type of reserved books (hardcopy or electronic) cannot be checked- out, if student is not registered for the course.  Students can checkout only one copy of a title(ISBN).  A patron can reserveonly one roomat a point of time, but there is no limit for the whole day.  Faculty cannot reservesame book for two courses that he teaches.  Cannot book rooms occupancy greater than capacity  Constrainton reserved book and normalbook on due date period  Before checkout a book check if anyoneon waitlist  While updating the books table for a returned book, make surethe returned date is not null in checkouttable (samefor all resources)  Only study rooms for students  Conference rooms only in hunt  If book is reserved checkoutfor is only 4 hrs.  All check constraints are implemented during table creation.  Journals and conference proceedings can only be checked out for 12 hours.  Students can check out books for two weeks and faculties for one month.  Waitlists are prioritized for faculty.  Rooms can be checked out only after starttime and cannot be checked out after one hour of start time.  The maximum reservation time for a roomis 3 hours.  Students can only reservestudy rooms, faculties are can reserveboth conference and study rooms.  Cameras can only be checked on Fridays from9 A.M. to 12 P.M. and returned on Thursdays 6 P.M.  Camera checked out cannotbe renewed.  Notifications at 30 , 60 and 90 days aresent. 6. Functional Dependencies andNormal Forms: 1. FACULTY
  • 22.
    Library Database System22 fac_id → user_id ,password,first_name,last_name,category,dept_name ,nationality ,ph_num,alt_ph_num,dob,gender,address 2. STUDENTS student_id → user_id, password, first_name , last_name , gender, ph_num, alt_ph_num, dob , address, nationality, degree , dept_name , classification, category 3. STUDENT_HOLD No Functional dependencies 4. COURSES_TAUGHT course_id → fac_id 5. COURSES_ENROLLED No Functional dependencies 6. BOOKS isbn→ edition,publisher,authors,year_of_publication,title ,lib_name ,book_type ,total_num,available_num 7. STUDENTS_BOOKS_CHECKOUT student_id,isbn,issued_date ,book_type → due_date ,returned_date 8. FACULTY_BOOKS_CHECKOUT fac_id,isbn,issued_date ,book_type → due_date ,returned_date 9. STUDENTS_BOOKS_WAITLIST No Functional dependencies 10. FACULTY_BOOKS_WAITLIST No Functional dependencies 11. FACULTY_RESERVE_BOOK course_id,isbn → reserve_from_date ,reserve_to_date 12. CONFERENCE_PAPERS conf_paper_id → conf_name ,authors,year_of_publication,title ,available_num ,conf_type
  • 23.
    Library Database System23 13. STUDENTS_CONF_PAPER_CHECKOUT student_id,conf_paper_id,issued_date, conf_type → due_date ,returned_date, 14. FACULTY_CONF_PAPER_CHECKOUT fac_id,conf_paper_id,issued_date , conf_type → due_date ,returned_date 15. STUDENTS_CONF_PAPERS_WAITLIST No functional dependencies 16. FACULTY_CONF_PAPERS_WAITLIST No functional dependencies 17. JOURNALS issn→ authors,year_of_publication,title ,available_num,journal_type 18. STUDENTS_JOURNALS_CHECKOUT student_id,issn,issued_date, journal_type → due_date ,returned_date 19. FACULTY_JOURNALS_CHECKOUT fac_id,issn,issued_date , journal_type → due_date ,returned_date 20. STUDENTS_JOURNALS_WAITLIST No Functional Dependencies 21. FACULTY_JOURNALS_WAITLIST No Functional Dependencies 22. CAMERAS cam_id → ib_name ,make ,model ,lens_config ,memory 23. FACULTY_CAMERAS_CHECKOUT fac_id,cam_id ,issued_date → due_date , checked_out_time ,checked_in_time 24. STUDENTS_CAMERAS_CHECKOUT student_id,cam_id,issued_date → due_date , checked_out_time ,checked_in_time 25. STUDENTS_CAMERAS_WAITLIST No Functional Dependencies 26. FACULTY_CAMERAS_WAITLIST
  • 24.
    Library Database System24 No Functional Dependencies 27. ROOMS room_num,lib_name → capacity,floor_num,room_type 28. STUDENTS_RESERVED_ROOMS student_id,room_num,lib_name → reserve_from_time,reserve_to_time ,checked_out_time,checked_in_time,occupancy 29. FACULTY_RESERVED_ROOMS fac_id,room_num,lib_name → reserve_from_time ,reserve_to_time ,checked_out_time ,checked_in_time ,occupancy 30. AMOUNT_DUE student_id ,resource_id,due_date → due_amount,payment_date,return_date 31. NOTIFICATION No Functional dependency