Skip to content

ThejasNarayan/Railway-Management-Database-Using-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Railway-Management-Database-Using-SQL

Railway Database System

Introduction

This repository contains SQL scripts to create a basic railway database system. The system is designed to manage information related to trains, routes, passengers, tickets, and stations. The database schema includes tables for Train, Route, Passenger, Ticket, and Station, each serving a specific purpose within the railway system.

Overview

The railway database system allows for efficient management of:

  • Train schedules
  • Passenger bookings
  • Route information
  • Ticket reservations
  • Station details

Database Schema

The database schema consists of the following tables:

  • Train: Information about trains, including departure and arrival details.
  • Route: Details of train routes, including stations and stop order.
  • Passenger: Passenger information with names.
  • Ticket: Reservation details, including seat numbers and fares.
  • Station: Information about railway stations.

Queries and Stored Procedures

The project includes SQL queries and stored procedures for various functionalities such as:

  • Ticket booking and cancellation
  • Train occupancy tracking
  • Late train alerts
  • Passenger count analysis

Triggers

Triggers have been implemented to automate certain actions, including:

  • Updating train occupancy after each ticket booking or cancellation.
  • Alerting if a train is delayed beyond a specified threshold.

Getting Started

  1. Clone the repository: git clone https://github.com/yourusername/railway-database.git
  2. Import the SQL script to set up the database schema and initial data.
  3. Execute the provided queries, stored procedures, and triggers for desired functionalities.

Usage

The database can be utilized for various railway management tasks, such as:

  • Booking and canceling tickets
  • Analyzing passenger and train data
  • Monitoring train occupancy and delays

Feel free to explore and customize the project based on your specific requirements.

Contributing

Contributions are welcome! If you have any ideas, enhancements, or bug fixes, please open an issue or submit a pull request.

Contact

Email - thejasl1508@gmail.com LinkedIn - https://www.linkedin.com/in/thejas-narayan-06046b22b/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published