Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help trying to get the business rules from these tables. Here are the rul

ID: 3675356 • Letter: I

Question

I need help trying to get the business rules from these tables. Here are the rules that I have so far, not sure how many are correct:

Business Rules

Each train can be scheduled on many schedules. 1:N

There are many seats on a train. N:1

There can be many stations on a schedule. N:1

There can be many stations on a reservation. N:1

Each station can accommodate many trains. 1:N

A passenger can make multiple reservations. 1:N

There are many seats reserved on one reservation. 1:N

There can be many trains in a station. N:1

Here are the tables, the entities and attributes were assigned:

TRAIN (table)

TRAIN_SCHEDULE (table)

TRAIN_SEATS (table)

TRAIN_ID(FK)

TRAIN_ID (CK)to make (PK)

SEAT_ID

TRAIN NAME(PK)

STATION_ID (CK) to make (PK)

SEAT_NUMBER (PK)

ARRIVAL_TIME

TRAIN_ID (FK)

DEPARTURE_TIME

STATION (table)

PASSENGER (table)

RESERVATION (table)

STATION_ID (FK)

PASSENGER_ID (FK)

RESERVATION_ID (PK)

STATION_NAME

PASSENGER_FIRSTNAME

PASSENGER_ID (FK)

STATION_LOCATION(PK)

PASSENGER_LASTNAME

DATE_OF_TRAVEL

ADDRESS (PK)

STATION_ID (FK)

PHONE_NUMBER

SEAT_RESERVATION (table)

SEAT_ID (CK) to make (PK)

RESERVATION_ID (CK) to make (PK)

TRAIN (table)

TRAIN_SCHEDULE (table)

TRAIN_SEATS (table)

TRAIN_ID(FK)

TRAIN_ID (CK)to make (PK)

SEAT_ID

TRAIN NAME(PK)

STATION_ID (CK) to make (PK)

SEAT_NUMBER (PK)

ARRIVAL_TIME

TRAIN_ID (FK)

DEPARTURE_TIME

Explanation / Answer

Following are the business rules from the tables given:

1. Each train has a single schedule. 1:1 with train_id as primary key and foreign key

2. There can be only one schedule for a train at one station. 1:1:1

3. There can be many stations on one train schedule. N:1

4. Many trains halts at some stations. M:N

5. Each station can accomodate many trains. 1:N

6. There are many seats in a train. N:1

7. one seat is reserved under one reservation. 1:1

8. Many seat can be reserved by passenger. M:1

9. one passenger can make multiple reservations. 1:M

10. reservation is for train at particular station. 1:1

11. one station may have many reservations for a train schedule.1:M:1

12. One train can have many passengers. 1:M

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote