You apparently have the following
People
Some People are students
Some Poeple are Staff Members
Are any People both students and staff? If so what rule do you you follow,
staff (many laptops) or student (one laptop)
a. You can set up a table of people with a field to check if student or
staff (or both)
b. Setup two tables of people (students, staff)
Laptops
Each laptop can be issued to one and only one person at a time (1:1)
Some people can have many laptops checked out at one time (1:M), but some
people can have none or at most one laptop at a time. (1:1)
So what you are wanting is a 1:1 relationship sometimes and a 1:M
relationship sometimes.
You can
a. establish two tables for the relationships and set one up as
Student-Laptop 1:1 and the other as Staff-Laptop 1:M or
b. establish the rule in code to limit people that are students to only one
laptop (when entering the data check to see if they are a student and if so
if they already have a laptop checked out.
Your decisons in this area should be guided by good database design (table
normalization) and the business process you use -- e.g. do you want the user
to go to one form to check out the laptops to both students and staff, or
are these separate business processes. e.g. students one place, staff
another.
Your old database might lead you to what the developer was thinking in these
areas.
Ed Warren.
> We have laptops that get checked out to students and staff, and we would
> like
[quoted text clipped - 10 lines]
> Thanks
> in advance.
John Marshall, MVP - 20 Sep 2005 23:50 GMT
Add a field to the laptop table indicating who has it signed out. Before a
student can sign out a laptop run a query against this field to find out how
many laptops this student has signed out. If none; then proceeed.
John... Visio MVP
Mierow - 21 Sep 2005 15:16 GMT
Thanks guys. Both of you have given us some great advice and things to look
at.