Question
can you input necessary info s to complete this database?? CREATE TABLE TRAIN ( TRAIN_NO INT(10) PRIMARY KEY, TRAIN_NAME VARCHAR(20), SOURCE_SID VARCHAR(20), DESTINATION_SID VARCHAR(20), TRAIN_TYPE
can you input necessary info s to complete this database??
CREATE TABLE TRAIN ( TRAIN_NO INT(10) PRIMARY KEY, TRAIN_NAME VARCHAR(20), SOURCE_SID VARCHAR(20), DESTINATION_SID VARCHAR(20), TRAIN_TYPE VARCHAR(20) )
CREATE TABLE TRAIN_AC2 ( TRAIN_NO INT(20), FOREIGN KEY (TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), AC2_FARE INT(30), AC2_SEAT INT(30) )
CREATE TABLE TRAIN_AC1 ( TRAIN_NO INT (20), FOREIGN KEY(TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), AC1_FARE INT(30), AC1_SEAT INT(30) )
CREATE TABLE TRAIN_SL ( TRAIN_NO INT(20), FOREIGN KEY ( TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), SL_FARE INT(30), SL_SEAT INT(30))
CREATE TABLE STATION( STATION_ID INT(20) PRIMARY KEY, STATION_NAME VARCHAR(20))
CREATE TABLE STATION_ROUTE ( STATION_ID INT(20), FOREIGN KEY(STATION_ID) REFERENCES STATION(STATION_ID), TRAIN_NO INT(20), FOREIGN KEY ( TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), STOP_NO INT(20), FOREIGN KEY(STOP_NO) REFERENCES ROUTE(STOP_NO))
CREATE TABLE ROUTE ( TRAIN_NO INT(20), FOREIGN KEY ( TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), STOP_NO INT(20) PRIMARY KEY, ARRIVAL_TIME INT(20), DEPT_TIME INT(20), DESTINATION VARCHAR(20))
CREATE TABLE USER_REGISTRATION ( USER_ID INT(20) PRIMARY KEY, USER_NAME VARCHAR(20), USER_PASSWORD VARCHAR(20), USER_EMAIL VARCHAR(20), USER_ADDRESS INT(20), USER_PHONE INT(20))
CREATE TABLE PASSENGER ( TICKET_ID INT(20), PASSENGER_NAME VARCHAR(20), PASSENGER_AGE INT(20), PASSENGER_SEX VARCHAR(10), PASSENGER_SEATNO INT(30), TRAIN_NO INT(20), FOREIGN KEY(TRAIN_NO) REFERENCES TRAIN(TRAIN_NO))
CREATE TABLE TICKET_RESERVATION( USER_ID INT(20), FOREIGN KEY(USER_ID) REFERENCES user_registration(USER_ID), TICKET_ID INT(20), TRAIN_NO INT(20), FOREIGN KEY(TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), DATE_AVAIABLE VARCHAR(20), DATE_STATUS VARCHAR(20))
CREATE TABLE TRAINSL_STATUS ( TRAIN_NO INT(20), FOREIGN KEY (TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), DATE_AVAIABLE VARCHAR(20), SL_RESERVESEATS INT(30), SL_WAITINGSEATS INT(30), SL_AVAIABLESEATS INT(30))
CREATE TABLE AC1_STATUS ( TRAIN_NO INT(20), FOREIGN KEY (TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), DATE_AVAIABLE VARCHAR(20), AC1_RESERVESEATS INT(30), AC1_WAITINGSEATS INT(30), AC1_AVAIABLESEATS INT(30))
CREATE TABLE AC2_STATUS ( TRAIN_NO INT(20), FOREIGN KEY (TRAIN_NO) REFERENCES TRAIN(TRAIN_NO), DATE_AVAIABLE VARCHAR(20), AC2_RESERVESEATS INT(30), AC2_WAITINGSEATS INT(30), AC2_AVAIABLESEATS INT(30))
CREATE TABLE PASSENGER_STATUS ( TICKET_ID INT(20), SOURCE_ID VARCHAR(20), DESTINATION_ID VARCHAR(20), TICKET_CLASS VARCHAR(20), PASSENGER_TICKETSTATUS VARCHAR(20), TRAIN_ID INT(20))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started