Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
Size
10
50
10
50
50
50
20
10
25
50
Relation
Primary key
Size
50
50
50
50
Relation
Primary key
BookDetails Table
-
50
50
50
50
-
(8,2)
50
(8,2)
PEN : A1921-714-011(EL)
Page : 1 of 3
Assignment B
Data Type
Varchar
Datetime
Varchar
Varchar
Datetime
Varchar
Size
10
Relation
Primary key
10
50
Foreign key
Foreign Key
200
Data Type
Varchar
Datetime
Varchar
Int
Decimal
Varchar
Size
10
Relation
Primary key
10
Foreign Key
(8,2)
200
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
Data Type
Varchar
Varchar
Varchar
Varchar
Datetime
Varchar
Datetime
Int
Decimal
Varchar
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
Data Type
Varchar
Varchar
Varchar
Varchar
Datetime
Datetime
Varchar
Datetime
Int
Decimal
Varchar
Varchar
Size
10
10
50
10
Relation
Primary key
Foreign key
Foreign key
TransactionHistory Table
-
10
(8,2)
200
200
PEN : A1921-714-011(EL)
Page : 3 of 3