Hi Jo, and welome. Hope you are able to derive good help here.
If this is your first database, the first step is to set up a data structure
(tables) that has all the right connections (one to many relations) between
them.
You might have more than one copy of a particular title. Presumably you want
to be able to track each one individually, e.g. this particular copy of
"Jungle Animals" was borrowed by Jo Smith on 2/28, and so she should have it
back to us by 3/28. If so, for each book title, you can have many instances
of the book: a one-to-many relation between Titles and Books. And you lend
out a book (not merely a title.) That means these tables:
Title table (one record for each title/book published)
TitleID AutoNumber primary key
Title Text name of the book
ISBN Text
YearPublished Number
...
Book table (one record for each copy you buy)
BookID AutoNumber primary key
TitleID Number relates to Title.TitleID
DateAcquired Date/Time when you got this book
...
Now, one person can borrow from you multiple times. Therefore you have a
one-to-many relation between borrower and loans. These tables:
Borrower table (one record for each person)
BorrowerID AutoNumber primary key
Surname Text
FirstName Text
Address Text
City Text
Zip Text
...
Loan table (one record each time someone borrows books):
LoanID AutoNumber primary key
BorrowerID Number relates to Borrower.Borrow erID
LoanDate Date/Time when taken out.
When someone borrows books, they often borrow more than one at at time. Any
loan therfore has multiple line-items: a one-to-many relation between Loan
and loan details. So the books borrowed in a loan go into a related table:
LoanDetail table (line items for a loan):
LoanDetailID AutoNumber primary key
LoanID Number which loan this is a line item of)
BookID Number the book that was borrowed
DueDate Date/Time when this book is due back (blank until
returned.)
That's the basic start. Creating the right tables and relationships is
absolutely crucial to getting a useful database.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Jo" <jo@NOSPAM.stal lan.plus.comwro te in message
news:46******** **************@ ptn-nntp-reader02.plus.n et...
Hi there,
I'm Jo and it's the first time I've posted here. I'm in process of
creating a database at work and have come a little unstuck.....I'm a bit
of a novice and wondered if anyone could help. I work in a library and
send out dual language books to babies of dual or other nationality.
The db is to be used for logging a range of book titles and numbers
ordered and books sent out to individuals. I am trying to work out a way
of keeping track of how many of each title I have in stock so I can see
when to order more. Am I making sense so far?
One table has the following fields:
Book Title (e.g. Jungle Animals (Albanian) or Jungle Animals
(Gujarati))
Date Ordered
No. Ordered
Another table (and related form) has details of books sent out to
individuals:
Name
Address
etc
Book Title
Date Sent Out
I am struggling to find a way - if there is one - of linking the info so
to keep track of stock numbers. I have tried various queries and
exporting data to Excel but got in a real muddle. There's probably a
really simple way, but I'm not that experienced that I can work it out!
I would appreciate any advice.
Thanks,
Jo