Skip to content

MuhammadYasir85a/Tourism-Management-System-Database-Design-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Database Design & Implementation

Typing SVG
Status MySQL SQL DBMS ER Diagram Normalization

Overview

A comprehensive database design and implementation project for a tourism management system. This project demonstrates strong fundamentals in database management including ER modeling, schema normalization, SQL query optimization, and stored procedure development.

The system is designed to handle real-world tourism industry needs, managing relationships between tourists, destinations, bookings, hotels, transportation, and tour packages through a well-structured relational database.


Project Objectives

  • Design a normalized relational database schema for a tourism management system
  • Implement entity-relationship modeling for complex business requirements
  • Develop optimized SQL queries for common tourism operations
  • Create stored procedures for repetitive business logic
  • Demonstrate understanding of database management principles
  • Build a foundation for a complete tourism management application

Key Features

  • Comprehensive ER diagram covering all tourism entities
  • Fully normalized database schema (3NF compliance)
  • Detailed table relationships with proper foreign keys
  • Optimized SQL queries for common operations
  • Stored procedures for business logic
  • Sample data for testing and demonstration
  • Documentation of design decisions and trade-offs
  • Support for multi-table joins and complex queries

Tech Stack

Database:

  • MySQL
  • SQL (Standard Query Language)
  • DDL (Data Definition Language)
  • DML (Data Manipulation Language)

Design Tools:

  • ER Diagram modeling
  • Database normalization techniques
  • Schema visualization tools

Documentation:

  • Markdown for repository documentation
  • SQL scripts with detailed comments

Database Entities

The system manages the following core entities:

1. Tourists

  • Personal information and contact details
  • Booking history and preferences
  • Payment records

2. Destinations

  • Location details and descriptions
  • Available attractions
  • Travel advisories and seasonal information

3. Hotels

  • Hotel details and ratings
  • Room types and availability
  • Pricing and amenities

4. Tour Packages

  • Package descriptions and itineraries
  • Pricing and inclusions
  • Duration and group sizes

5. Bookings

  • Reservation details
  • Payment status
  • Cancellation records

6. Transportation

  • Transport modes (flights, buses, trains)
  • Schedules and availability
  • Pricing and routes

7. Tour Guides

  • Guide profiles and specializations
  • Language proficiency
  • Availability and ratings

Entity Relationship Model

                    [Tourists]
                        |
                        | (1:N)
                        v
                    [Bookings] --------+
                        |              |
            +-----------+              |
            |           |              |
            v           v              v
       [Hotels]   [Transportation]  [Tour Packages]
            |                            |
            v                            v
       [Rooms]                    [Tour Guides]
                                       |
                                       v
                                 [Destinations]
                                       |
                                       v
                                 [Attractions]

Database Schema (Sample Tables)

Tourist Table

  • tourist_id (PK)
  • first_name
  • last_name
  • email
  • phone
  • date_of_birth
  • nationality
  • registration_date

Booking Table

  • booking_id (PK)
  • tourist_id (FK)
  • package_id (FK)
  • hotel_id (FK)
  • transport_id (FK)
  • booking_date
  • total_amount
  • payment_status

Hotel Table

  • hotel_id (PK)
  • hotel_name
  • destination_id (FK)
  • rating
  • address
  • contact

Tour Package Table

  • package_id (PK)
  • package_name
  • duration_days
  • base_price
  • destination_id (FK)
  • guide_id (FK)

Destination Table

  • destination_id (PK)
  • name
  • country
  • description
  • best_visit_season

Project Structure

Tourism-Management-System-Database-Design/
│
├── schema/
│   ├── create_tables.sql          # All CREATE TABLE statements
│   ├── insert_sample_data.sql     # Sample data for testing
│   └── constraints.sql            # Foreign keys and constraints
│
├── queries/
│   ├── basic_queries.sql          # Common SELECT queries
│   ├── advanced_queries.sql       # JOINs and aggregations
│   └── stored_procedures.sql      # Business logic procedures
│
├── documentation/
│   ├── ER_diagram.png             # Visual ER diagram
│   ├── schema_design.md           # Design decisions
│   └── normalization.md           # Normalization process
│
└── README.md                      # Project documentation

Sample Queries

Find All Bookings for a Specific Tourist

SELECT b.booking_id, t.first_name, p.package_name, b.booking_date
FROM Bookings b
JOIN Tourists t ON b.tourist_id = t.tourist_id
JOIN TourPackages p ON b.package_id = p.package_id
WHERE t.email = 'tourist@example.com';

Top 5 Most Booked Destinations

SELECT d.name, COUNT(b.booking_id) AS booking_count
FROM Destinations d
JOIN TourPackages p ON d.destination_id = p.destination_id
JOIN Bookings b ON p.package_id = b.package_id
GROUP BY d.destination_id
ORDER BY booking_count DESC
LIMIT 5;

Calculate Total Revenue by Hotel

SELECT h.hotel_name, SUM(b.total_amount) AS total_revenue
FROM Hotels h
JOIN Bookings b ON h.hotel_id = b.hotel_id
WHERE b.payment_status = 'Completed'
GROUP BY h.hotel_id
ORDER BY total_revenue DESC;

Normalization Approach

The database design follows Third Normal Form (3NF) principles:

First Normal Form (1NF)

  • All columns contain atomic values
  • No repeating groups
  • Each row uniquely identifiable

Second Normal Form (2NF)

  • Meets 1NF requirements
  • All non-key attributes fully dependent on primary key
  • No partial dependencies

Third Normal Form (3NF)

  • Meets 2NF requirements
  • No transitive dependencies
  • All attributes depend only on primary key

This normalization eliminates data redundancy and ensures data integrity throughout the system.


Installation and Setup

Prerequisites

  • MySQL 8.0 or higher (or any compatible RDBMS)
  • MySQL Workbench or similar SQL client
  • Basic understanding of SQL

Setup Steps

  1. Clone the repository:
git clone https://github.com/MuhammadYasir85a/Tourism-Management-System-Database-Design-.git
cd Tourism-Management-System-Database-Design-
  1. Open MySQL Workbench (or your preferred client)

  2. Create a new database:

CREATE DATABASE tourism_management;
USE tourism_management;
  1. Run the schema scripts in order:
mysql -u root -p tourism_management < schema/create_tables.sql
mysql -u root -p tourism_management < schema/constraints.sql
mysql -u root -p tourism_management < schema/insert_sample_data.sql
  1. Test with sample queries:
mysql -u root -p tourism_management < queries/basic_queries.sql

Use Cases

  • Educational reference for database design courses
  • Foundation for a complete tourism management application
  • Template for relational database projects
  • Demonstration of normalization principles
  • Practice for SQL query optimization
  • Reference for ER diagram creation

Future Enhancements

  • Web-based front-end interface (PHP, Node.js, or Django)
  • REST API layer for mobile app integration
  • Real-time booking system with payment gateway
  • Customer review and rating system
  • Multi-language support
  • Reporting and analytics dashboard
  • Integration with external travel APIs (flights, hotels)
  • Geographic mapping integration

Learning Outcomes

Through this project, the following concepts were strengthened:

  • Entity-Relationship modeling for complex domains
  • Database normalization techniques (1NF, 2NF, 3NF)
  • SQL query optimization and indexing
  • Stored procedure development
  • Foreign key constraints and referential integrity
  • Schema design for real-world business requirements
  • Documentation of database design decisions

Project Status

Status: Completed

The database schema, sample data, and queries are fully implemented and tested. The project serves as a comprehensive reference for tourism management database design.


Academic Information

Field Detail
Course Database Management Systems
Institution Namal University Mianwali
Project Type Academic Project

Author

Muhammad Yasir

Computer Science Undergraduate at Namal University Mianwali
Aspiring AI and Computer Vision Engineer


Acknowledgments

  • Namal University Mianwali for academic guidance
  • DBMS course instructors for foundational knowledge
  • MySQL documentation and open-source community
  • Database design textbooks and reference materials

License

This project is licensed under the MIT License.


About

A web-based Tourism Management System with a fully normalized MySQL database, built using Flask. Features include destination search, hotel and restaurant listings, user reviews, bookings, travel history, and admin controls. Designed for scalability with a responsive interface and future expansion in mind.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors