The Student Room Group

Can anyone one HELP? cpt6

hello, at the moment im doin a library management system, these are my tables so far...

BookCopy
BookID
ISBN
DatePurchased
ReplacementCost


Book
ISBN
Author
Title
Quantity

Member
Name
Surname
Address1
Address2
Postcode
TelephoneNumber

BookLoan
BookID
MemberID
LoanID
DateDueBack



the problem is im not sure exactly how to over come the quantity problem, in the library i will probably have more than 1 copy of a book, each copy has a bookID and all the same books have the same ISBN. say a member takes a book out or returns it how can i make quantity vary accordingly? thanks for your help. :]
When you take out a book, simply decrement the quantity value like so;
Book.Quantity = Book.Quantity - 1
Reply 2
sorry but one more thing for example if 5 copies of a book came in, i will have to do this via a form, but when i do this the BOOK table will show quantity of that book that i have entered but how can each copy of that book in BOOKCOPY get a BOOKID if u understand what im talking about, and again thanx
Shanx
sorry but one more thing for example if 5 copies of a book came in, i will have to do this via a form, but when i do this the BOOK table will show quantity of that book that i have entered but how can each copy of that book in BOOKCOPY get a BOOKID if u understand what im talking about, and again thanx

Why would each copy of the book need a different BookID wouldn't the LoanID uniquely identify the transaction?
Reply 4
Hi,
First of all,if i understand what you mean to say,then you don't need a BookCopy table.You can have a the Book table like this:

Book
ISBN (Primary Key)
Author
Title
Quantity
DatePurchased
ReplacementCost
Category( I would also have this)


Now,when say 5 copies come in,then Quantity changes to:
Quantity = Quantity + 5;

Similarly,say 3 copies of this particular book go out,then
Quantity = Quantity - 5;

You can write a query for this or do it programatically.

HTH
Cheers
Reply 5
yeh the only reason why i thought about having BookCopy table is just identify each copy of a book, but i guess i dont have to do that. Thank you for you help. :smile:
Reply 6
do you guys know we only have a month to finish everything??!!!
Reply 7
greatpotter
do you guys know we only have a month to finish everything??!!!

woah says where??? ive barely started. Im starting my analysis now, project is going to be mainly Access with some VB behind it. God panic!!!
Shanx
hello, at the moment im doin a library management system, these are my tables so far...

BookCopy
BookID
ISBN
DatePurchased
ReplacementCost


Book
ISBN
Author
Title
Quantity

Member
Name
Surname
Address1
Address2
Postcode
TelephoneNumber

BookLoan
BookID
MemberID
LoanID
DateDueBack



the problem is im not sure exactly how to over come the quantity problem, in the library i will probably have more than 1 copy of a book, each copy has a bookID and all the same books have the same ISBN. say a member takes a book out or returns it how can i make quantity vary accordingly? thanks for your help. :]



im doing a library system too....for each book there are 5 copies represented by copy ID
greatpotter
do you guys know we only have a month to finish everything??!!!


who said?...our deadline is after easter.
There is a standard solution to this problem.

Your BOOKLOAN entity is wrong it should be

BOOKLOAN (AccessionNo,DateDueBack,MemberID)

Each book in a library as a unique ID called the Accession Number this corresponds to your BookID.

You do not need a LoanID as a given book cannot be due back twice on the same day this forms a good joint key. (If you are actually doing this in Access you can bung in a LoanID if you really want to without harm but it is not strictly needed.)
f.amir
who said?...our deadline is after easter.

Deadlines are usually composed internally to help adjust for marking and standardization processes. For example our deadline is before the Easter holidays, but in all honesty there is no way the department is going to mark and standardize all submissions during the break, thus I am sure slightly adjustments would be made accordingly.
Reply 12
The place I teach at has coursework deadlines before the Easter break (a week before), it's partly to allow the marking and standardisation to be done over Easter - there's a hell of a lot of paperwork your teacher has to do once you've handed stuff in. And yes, we do do it then - easier than when the next term gets started

There's other reasons too - it means if someone is late we can chase them, ring their parents etc etc. It'll vary from school to school I guess, to some extent where I work deadlines are a bit of a bluff - if we say this date, they'll get it handed in a week later which is a date I'm okay with! Personally though I think it's good to have the coursework out of the way before the holidays start - partly because then you can get help all the way to the end (what happens if you get stuck over the holidays?) but also because you can concentrate on revision. The exams only start a few weeks after the exam board coursework deadline and IMO you'll stand a far better chance if you finish it off before Easter.
Can you confirm if you are able to use the BookID as an accession number?

Latest

Trending

Trending