Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In SQL what are the relationships between these tables? Like many to one and such. Also, I need to have business rules from these tables

In SQL what are the relationships between these tables? Like many to one and such. Also, I need to have business rules from these tables and need to determine if the primary keys and foreign keys are correct. Thank you...

TRAIN

TRAIN_SCHEDULE

TRAIN_SEATS

TRAIN_ID (Foreign Key)

TRAIN_ID (Foreign Key)

SEAT_ID

TRAIN NAME (Primary Key)

STATION_ID

SEAT_NUMBER (Primary Key)

ARRIVAL_TIME

TRAIN_ID (Foreign Key)

DEPARTURE_TIME (Primary Key)

STATION

PASSENGER

RESERVATION

STATION_ID (Foreign Key)

PASSENGER_ID (Foreign Key)

RESERVATION_ID

STATION_NAME (Primary Key)

PASSENGER_FIRSTNAME

PASSENGER_ID (Foreign Key)

STATION_LOCATION

PASSENGER_LASTNAME (Primary Key)

DATE_OF_TRAVEL (Primary Key)

ADDRESS

STATION_ID

PHONE_NUMBER

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Probabilistic Databases

Authors: Dan Suciu, Dan Olteanu, Christopher Re, Christoph Koch

1st Edition

3031007514, 978-3031007514

More Books

Students also viewed these Databases questions