ABQ1

September 2, 2017 | Author: Nadia Baker | Category: Information Technology Management, Software, Data, Data Management, Computer Data
Share Embed Donate


Short Description

Amity Assignment...

Description

Assignment – B

“Database Management System”

MCA Semester – III

Case Study. A Librarian of a central university has hired a database designer to maintain information about its members, books and other related details i.e. Issue and return of books, reservation, fine calculation and usage of books. Suggest a suitable database design to maintain above mentioned data keeping in mind the redundancy and consistency of data. Mention all your assumptions to justify your answer. Answer Database Name : Library_DB Table Name: MemberDetails Field Name Member_ID Name Gender Qualification Profession Address City Pin_Code State Email Cell_Phone Home_Phone

Data Type Varchar Varchar Varchar Varchar Varchar Varchar Varchar Varchar Varchar Varchar Int Int

Table Name: BookDetails Field Name Data Type Book_ID Varchar Title Varchar Author Varchar Publisher Varchar Date_Publication Datetime Edition Varchar ISBN Varchar Barcode Varchar Cover_Page Image Volumn Varchar Date_Purchase Datetime Cost_price Decimal Book_catg Varchar Fine_Per_Day Decimal No_of_copies int

.Mir Mahamood Ali Khan

Size 10 50 10 50 50 50 20 10 25 50

Relation Primary key

Size 50 50 50 50

Relation Primary key

Database to be Created with Name Library_DB and Various tables under it. MemberDetails Table - Member Master Table has been created with Member Details. -

BookDetails Table -

50 50 50

-

50 -

(8,2) 50 (8,2)

-

PEN : A1921-714-011(EL)

Member_ID has been defined as primary key in order to have unique code for each member and other tables will link to it for more information

Books Master Table has been created with Books Details. Book_ID has been defined as primary key in order to have unique code for each book and other tables will link to it for more information. Also cover page of each book will be scanned and linked with database so that it will easy to recognize the book. Fine Per Day can also be stored per book QTY in library of each book will be tracked in No_of_Copies Column

Page : 1 of 3

Assignment – B

“Database Management System”

MCA Semester – III

Table Name: IssuanceDetails Field Name Issuance_ID Issuance_Date Member_ID Book_ID Due_Date Notes

Data Type Varchar Datetime Varchar Varchar Datetime Varchar

Size 10

Relation Primary key

10 50

Foreign key Foreign Key

200

Table Name: ReturnDetails Field Name Return_ID Return_Date Issuance_ID Delay_Days Fine_Amt Notes

Data Type Varchar Datetime Varchar Int Decimal Varchar

Size 10

Relation Primary key

10

Foreign Key

(8,2) 200

Table Name: ReservationDetails Field Name Reserve_ID Reserve_Date Member_ID Book_ID Notes

Data Type Varchar Datetime Varchar Varchar Varchar

Size 10

Relation Primary key

10 50 200

Foreign key Foreign Key

Size 10 10 50 10

Relation Primary key Foreign key Foreign Key

Table Name: FineDetails Field Name Fine_ID Member_ID Book_ID Issuance_ID Issuance_Date Return_ID Return_Date Delay_Days Fine_Amt Notes

Data Type Varchar Varchar Varchar Varchar Datetime Varchar Datetime Int Decimal Varchar

.Mir Mahamood Ali Khan

10

(8,2) 200

PEN : A1921-714-011(EL)

IssuanceDetails Table - Issuance Table has been created with Issuance Details. - Here minimum columns has been created after normalization. - Two foreign keys has been created which will be referring to the master tables of Member & Book Details - With this we get other required information by relationship - Also with this foreign key master records cannot be deleted unless the transaction or historical information exists. - This will help as referential integrity with the dependent data. ReturnDetails Table - Returns Table has been created with Return Details. - Returns will be linked with issuance table through foreign key. - If book not returned on due date then the difference days between due date and return date will be computed and multiplied by Fine_Per_day column from books table and stored in Fine Amount column. ReservationDetails Table - Reservation Table has been created to store relevant data. - Linked with Member ID so that when book is available can be informed to the member by email or call. FineDetails Table - Fines Table has been created to store all the fine collection info and the amount collected. - Notes column for comments and remarks.

Page : 2 of 3

Assignment – B

“Database Management System”

MCA Semester – III

Table Name: TransactionHistory [Usage of Books] Field Name Record_ID Member_ID Book_ID Issuance_ID Issuance_Date Due_Date Return_ID Return_Date Delay_Days Fine_Amt Issuance_Notes Return_Notes

Data Type Varchar Varchar Varchar Varchar Datetime Datetime Varchar Datetime Int Decimal Varchar Varchar

.Mir Mahamood Ali Khan

Size 10 10 50 10

Relation Primary key Foreign key Foreign key

TransactionHistory Table -

10

(8,2) 200 200

PEN : A1921-714-011(EL)

All the historical transaction related to issuances, returns and fines are stored in this table. This will help to generate reports related to o Usage of books o Usage per member o Usage per month o And many more

Page : 3 of 3

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF