#Write SQL query for Railway Management System
The Main aim of the Railway
Management Mini DBMS project is
to ease the process of railway
reservation. We aim to
demonstrate the use of create,
read, update and delete MySQL
operations through this project. In
this project, we first add the details
of trains and their halting stations.
Then passengers can book a ticket
by adding their details, source and
Destination. Passenger module
shows the number of passengers
boarding to the station. Trains and
Stations can be added or deleted
and the train details can be
updated for changing the timing on
arrival and departure or just
increasing or decreasing the
amount for tickets based on
classes such as 2A,3B,etc.
CREATE TABLE Passenger(id int PRIMARY KEY, name varchar(50),
DOB DATE, country varchar(50));
CREATE TABLE transaction(t_id int PRIMARY KEY, id int,
source varchar(50),
travelling_date DATE, destination varchar(50),
FOREIGN KEY(id) REFERENCES Passenger(id)
);
CREATE TABLE train(train_id int PRIMARY KEY,
capacity varchar(50),
name varchar(50)
);
CREATE TABLE station(station_id int PRIMARY KEY,
name varchar(50),
location varchar(50)
);
Comments
Leave a comment