table setup

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

This is probably a daft question but I've decided to post it.

I'm need to design a form to ask the user two questions
1) If the user has a Car (check box)
2) If the user can borrow a car (check box)

I'm going to set up the form based on the user table with borrowCar and Car
as sub-forms
I've split the tables into seperate tables for car and borrowCar. the borrow
car only has to hold 3 fields where as the Car holds 8 (Tell me if this is
wrong)

tblCar
CarID PK
UserID FK
Reg
make
Insured
Value
refNo
etc

tblBorrowCar
BorrowCarID PK
UserID FK
Reg
Make
CarOwner
CarOwnerAddress

tblUser
UserId PK
FName
SName

On the table, I'm not sure if the checkbox should be in the respective
tables
So in the car table should I have a checkBox for ownCar or should this be in
the user table?
 
If it were me setting up the tables, I'd put a field in the Car table for
Owner.
that's assuming each car has only one owner.
Since one car can (potentially) have more than one borrower, and one person
can (potenially) borrow more than one car, that would be a many-to-many
relationship, and would require an additional table.

HTH
 
Back
Top