Calculations in Tables

hargz

New member
Local time
Today, 18:32
Joined
Nov 27, 2008
Messages
3
Hi,

I'm creating a library system and i have one table for the catalouge with all the book information.
One table to rent a book and one table to return a book.

There is an Available field on the catalouge table for each book to see whether the book is available or not.

When i rent a book i want the available to say NO on the catalouge table.
Then when i return the book i want the available to say YES on the catalouge table.

How would i go about doing this?

Thanks
Sam
A Level Student Desborough School
 
Have you got your normalization right??
A book once loaned out can only be returned once right?? Having a 1-1 relationship is seldom right/optimal.

Storing a calculated field in a database is a big NO NO... Dont store the calculated "available = NO" part.
Instead use a query to see if the book is loaned out to someone, by which case it should not be available.

Good luck on your project and Studies :D
 
Use an IIF statement to check if the book is in or out, then return the value in the availbility field.

Edit* Homer simpson moment, I thought we were talking about in the form. Ignore the above. I'm an idiot (see my sig) :D.
 

Users who are viewing this thread

Back
Top Bottom