Team Name: RNA
Team Members: Adhiraj Deshmukh (2021121012), Pranjal Thapliyal (2020101108), Sukhjinder Kumar (2020101055)
Project Video Link: DnA Project Video
First we would need to initialize the database, to do that we need to run the
CREATE_TABLES.sql
script from the SQL folder.
To run the script enter this command in your MySQL Shell:
source SQL/CREATE_TABLES.sql
If this doesn't work directly copy pasting the whole contents of the file directly onto the shell works too.
Change the .env
file and replace all the environment variable values with the required values.
There are 4 values in this file:
MYSQL_USERNAME
→ username for MySQLMYSQL_PASSWORD
→ password for MySQLDB_NAME
→ The name of the database populated withCREATE_TABLES.sql
.MYSQL_HOST
→ The hostname of MySQL server.
port:30306
is not going to change since this is the version of MySQL we have tested our code with.
Alternative: You can just edit the code and write all the information related to PyMySql directly. This would be preferable since it takes less time and is easier therefore we have commented out the part from the code which makes uses
.env
variables.
To install the required python libraries:
python3 -m pip install PyMySql
python3 -m pip install tabulate
python3 -m pip install python-dotenv
To run the python file:
python3 Python/CLI.py
Display all user_id
: Initially for logging into a user, this command displays all the user_ids (and their passwords :)) to help with the login stageSelect user_id
: Login to existing user_idCreate user_id
: Create new user_id and set passwordDelete user_id
: Delete user_id, only if you know it's password, would also delete all data related to the user (like booked ticket) from thee databaseExit
: Exit from the code
Book ticket
: Book a ticket according to source and destination and available trains, using login user_idUpdate Ticket Status
: Command to Update your booked tickets status, which means confirms which tickets are confirmed according to available seatsView train schedule
: Just displays whole train scheduleFind trains source to destination
: Displays trains that go from given source and destinationFind total cost
: Total cost for the user depending on the tickets booked on which trainsAdd passenger
: Add passenger informationUpdate passenger
: Update passenger informationDelete passenger
: Delete passenger, would also delete booked tickets related to the passengerSearch Train
: Prefix search trainsSearch Station
: Search search stationsLog Out
: Log out from current user