Access relationship..the best way...

Tech

Registered User.
Local time
Today, 07:34
Joined
Oct 31, 2002
Messages
267
Hi there

I am trying to make a simple "booking" system.

This booking system is for cars.

We have customers, cars availible and the date and time and location etc... of when to pick up the customer

So 4 tables i have so far:

cars
customers
Bookings
Drivers

a field in Bookings known as customerID is joint to the customers table, field CustomerID.
a field in the Bookings known as DriverID is joint to the Drivers table, field DriverID
a field in Bookings known as CarID is joint to the cars table, field CarID

I am wondering, does this sound ok to you? i am not great with relationships but i am improving. does this sound ok?

Another Q is, i need to know what times of bookings are availible. What is the best way of going about this?

Thanks :)
 
heh yeh - sorry my bad. was all over the place!

still trying to figure out a way to calculate the cost as well as displaying dates availible to book a particular car.

here is the database relationship:

Drivers:
DriverID (PK)
Driver_fname
Driver_lname

Prices:
CarID
Price_Per_Hour

Cars:
CarID(PK)
Car_Manufacturer
Car_Model
Car_Reg

Customers:
CustID(PK)
Cust_fname
Cust_lname
Cust_Address
Cust_Town
Cust_Contact_No

Bookings:
BookingID(PK)
CarID
CustID
AdditionalNotes
FarePrice << Meant to be the total price
Booked
DateOfPickUp
TimeToPickUp
PickUpAddress
DropOffAddress
DriverID
Hours_Req

relationships:

TableName: FieldName > TableName: FieldName
Cars: CarID > Bookings: CarID >> 1:m
Customers: CustID > Bookings: CustID >> 1:m
Drivers: DriverID > Bookings: DriverID >> 1:m

hope it helps...
 
Last edited:
thanks very much :)

i am not bothered about the "real world" stuff really, it's just a simple quickie little database, however i have learnt and thought more about what you have said :) Thanks alot! Much appreciated
 

Users who are viewing this thread

Back
Top Bottom