Pay
Data Model for Sports Centers

Data Model for Sports Centers

Sports_Centers

PK center_id

center_short

center_full_name

center_address

center_manager

center_email

center_phone

other_center_details

The SQL to finnd available Facilities

would look something like this:-

SELECT DISTINCT facility_id

FEOM bookings

WHERE facility_id NOT IN

(SELECT facility_id

FROM bookings

WHERE booking_start_datetime > required_start

AND booking_start_datetime < required_end)

Ref_Facility_Types

PK facility_type_code

facility_type_description

Facilities

PK facility_id

FK center_id

FK facility_type_code

facility_number

deadline_days_count

other_facility_details

Users

PK user_id

FK gender_code

FK user_category

FK user_status_code

user_email

user_first_name

user_last_name

missed_bookings_count

missed_payments_count

other_user_details

Ref_Gender

PK gender_code

gender_description

Ref_User_Categories

PK user_category_code

user_category_description

Ref_User_Status

PK user_status_code

user_status_description

Bookings

PK booking_id

FK booking_status_code

FK facillity_id

FK user_id

email_sent_yn

booking_made_detetime

booking_start_datetime

booking_end_datetime

other_booking_details

Ref_Facility_Types

PK facility_type_code

facility_type_description

0
0
0
publish time: 2021-06-04
easy diagrams