Duplications?

Tansar

Registered User.
Local time
Today, 05:33
Joined
Dec 28, 2000
Messages
55
Hello,

I am trying to create a Library DB, and noticed that we have more than 1 copy of the same book. I have set the ISBN number as the primary key - so I think that I may need to change it (?)

The advise that I am seeking is how do I go about showing that the library has 3 copies but only 2 are available as 1 is on loan. Any advice much appreciated.

TIA
 
I've done the search but found things relating to loans of a different kind. I've also tried library and got weird answers.

Is ther anyone who is willing to help?

TIA
 
Here are some tips to point you in the right direction.

You're right about ISBN by itself not being sufficient as a primary key field since multiple books can have the same ISBN number. You need to add something additional to it, like the edition or revision number, or a simple arbitrary copy number to differentiate between multiples. Say you decide to throw in the copy number. With that and the ISBN, you can create a compound primary key, using the two fields together to unique identify each book.

Your database should have a loaned out date to tell you when the book was loaned out. You should also have a returned date. The usual logic would be, if the loan date is filled in but the returned date is empty then the book is out.
 
Thank you for your well explained answer. I'll give that a try.
 
Is there a sample of the 'video store model' anywhere?
 

Users who are viewing this thread

Back
Top Bottom