Entity relationship diagrams (library example)

Soldato
Joined
1 Dec 2004
Posts
22,716
Location
S.Wales
Ok, anyone who remembers my thread?

Im having 2nd thoughts about my entity attributes now..

Here they are

erd3.JPG



I need to accomodate attributes to somehow define the fines part of the system, i was thinking about doing this in the loans entity.

Basically if the book late back in, the customer is fined £1 for every week that passes for every book. Would this work by including an:

"Weeks overdue" attribute in the loans table? then adding another attribute in the customer table called "Outstanding fines" this would then somehow get the information from the loans table.

Also the customer can only take out 10 books at a time, how would i link between the loans and the customers table to keep records of how many books the customer has on file?
 
im trying aint i?? iv done it all infact, before i print out the final draft im having trouble positioning the 2 attributes i have left out, iv racked my brain, and my notes, which havnt helped.
 
As regards to the books/loans/copies i would rather stick to what i got..


The library has multiple copies of the same book, the book obviously is recognised by the ISBN number (Yes im going to change it from BookID to ISBN), the library may or may not stock multiple copies of each book. This brings me to the copies table..

The copies table will contain the CopyID and the ISBN number which will identify each book's copy.

The problem i am faced with is how to get the information based on tracking the books to each customer when they are loaned out (can this be done by simple queries?) and also sorting out the fines?

Anyone??
 
Last edited:
Back
Top Bottom