Home - Tables required - Setting up database driver and referencesCode with comments


Tables required


Tables required.
student_master

S_NO
S_NAME
S_AGE
S_SEX
S_ADDRESS
S_CITY
S_STATE
S_PINCODE
S_DEPT
S_BOOKS_MAX
S_BOOKS_COUNT
VARCHAR2(10)
VARCHAR2(15)
NUMBER(3)
VARCHAR2(6)
VARCHAR2(20)
VARCHAR2(15)
VARCHAR2(15)
NUMBER(7)
VARCHAR2(15)
NUMBER(2)
NUMBER(2)

book_master

B_NO
B_NAME
B_PUBLISHER
B_EDITION
B_AUTHOR
B_CATEGORY
B_ISBN
B_PRICE
B_STATUS
VARCHAR2(6)
VARCHAR2(25)
VARCHAR2(15)
VARCHAR2(15)
VARCHAR2(15)
VARCHAR2(15)
VARCHAR2(15)
VARCHAR2(15)
VARCHAR2(12)

student_account (s_no and b_no are foreign keys from above two tables)

S_NO
B_NO
ISSUE_DATE
RETURN_DATE
VARCHAR2(6)
VARCHAR2(6)
DATE
DATE

The actual process that happens when a student issues a book is

1) The number of books taken is verified with his maximum books allowed in student_master.
2) If he can take books, the status for the selected book is changed to 'Circulation' in books_master.
3) His book_count is increased.
4) The corresponding b_no,s_no is loaded into student_account with issue date and return date calculated 14 days from today.
5) Done!

The reverse is done for return while checking for fine if the book is returned late.


Setting up database driver
Dont get scared, simple three steps.