0

I'm a beginner with databases and I'm trying to design a database in Microsoft Access that will allow users to make bookings for fitness classes. There are two slots per day that these classes can be booked for and each session can cater for 10 people.
What I am struggling to understand is how I can limit the number of bookings made per session, per day, to ensure nobody can book a class on a session and a day that is already full up. Can anyone offer me any suggestions about how I can achieve this? I have started designing the tables but I know they aren't correct it all feels a bit of a mess.
The tables I have so far:

Customers
Customer ID (PK)
Surname
Forename
Address
Telephone No

Bookings
Booking ID (PK)
Date_taken
Customer ID (FK)

Class
Class ID (PK)
Description
Price

Session
Session ID (PK)
Session
Number per session

Booking_Class_Lines
Booking_ID(PK)
Session_ID (PK)
Class_ID (PK)
Date_of_booking

Thanks in advance

4
Contributors
6
Replies
44
Views
10 Months
Discussion Span
Last Post by Oleg_3
0

Not sure I'm with you. Is the class a pre-organised one that is set to a session, or are the classes set to a session on an ad hoc basis?

It seems to me that most leisure centres etc, tend to block book classes for a time/day (recurring) for a certain period, e.g. for 8 weeks (or in perpetuity). Members can either sign up to a class and pay for the whole blocked period, or do a pay as you go (if there's room).

Can more than one class be held at the same time, e.g. 6 in one, 4 in the other or are they fixed so that only one class can be held in any particular session?

0

Ok well to simplify my question completely let's say I had a session and the maximum amount of people that book the session was 10. How would I limit the number of bookings that can be made for it to 10 per day?

0

Pseudocode:
Using a conditional construct:

IF
    count of records for that session < 10
THEN
    insert record into the table
ELSE
    report session full
END IF
0

What is the relationship between customers and numbers of booking on your Access database?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.