Skip to content

About

Originally a course project for Database Systems and modified later

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Space Tourism Management System

A comprehensive database application for managing commercial space travel bookings, customers, agencies, and experiences. Built with Oracle Database and Streamlit for demonstrating modern DBMS concepts.

Project Description

This project implements a complete space tourism management system that handles:

  • Customer Management: Track travelers, medical status, and emergency contacts
  • Space Agencies: Manage partner agencies (SpaceX, Blue Origin, ISRO, Virgin Galactic, etc.)
  • Travel Packages: Create and manage destination packages with pricing and seat availability
  • Bookings System: Process reservations with payment and medical clearance tracking
  • Experience Modules: Optional add-on experiences led by certified instructors
  • Advanced DB Features: Triggers for automated business logic, stored procedures for refunds, and functions for seat availability

Perfect for learning:

  • Database schema design and normalization
  • SQL queries, triggers, and stored procedures
  • Foreign key relationships and constraints
  • Web application integration with enterprise databases

Tech Stack

  • Database: Oracle XE 21.3.0 (containerized)
  • Backend/Frontend: Streamlit (Python)
  • ORM/Driver: python-oracledb
  • Data Processing: Pandas
  • Containerization: Docker & Docker Compose with custom Dockerfile for fast startup
  • Python Version: 3.10

Prerequisites

  • Docker Desktop (includes Docker and Docker Compose) - Download here
  • Windows, macOS, or Linux with ports 1521, 8080, and 8501 available
  • At least 4GB available RAM for Oracle container

Installation & Setup

  1. Clone or download this repository to your local machine.

  2. Navigate to the project directory:

    cd path/to/Space_Tourism_System
  3. Start Docker Desktop on your system (if not already running).

  4. Launch the application:

    docker-compose up -d --build

    On first run, this will:

    • Download required Docker images (~2-3 GB)
    • Build a custom Python image for instant Streamlit startup
    • Initialize the Oracle database
    • Load sample data (customers, agencies, packages, bookings)
    • Start the Streamlit web interface in the background

    ⏳ First startup takes 2-3 minutes as the database initializes and the Python image builds. Subsequent starts will be almost instantaneous. Wait for the message: Streamlit app is running at http://localhost:8501

Usage

Once running, open your browser and navigate to:

Main Application: http://localhost:8501

Navigation Menu (Sidebar)

  • Dashboard: View summary metrics (total customers, packages, bookings) with quick data previews
  • View Tables: Browse complete data from any table (customers, agencies, packages, instructors, experiences, bookings, payments)
  • Remaining Seats: Check available seats for a travel package in real-time
  • Run Custom SQL: Execute your own SELECT queries directly (for analysis and testing)

Database Access

  • Oracle Database Web Console: http://localhost:8080
    • Username: system or appuser
    • Password: password123 or appuser123

Sample Data

The database comes pre-loaded with:

  • 7 space agencies (SpaceX, ISRO, Blue Origin, Virgin Galactic, ESA, etc.)
  • 8 experienced instructors (Zero-G Adaptation, Survival Protocols, Orbital Mechanics, etc.)
  • 10+ customers with medical and insurance information
  • 5+ travel packages ranging from sub-orbital hops to Mars expeditions
  • Business rules enforced via triggers (auto-status updates, overbooking prevention)

Stopping the Application

Press Ctrl+C in your terminal to stop the containers. To completely remove containers and volumes:

docker-compose down -v

Project Structure

.
├── docker-compose.yml      # Container orchestration
├── Dockerfile              # Custom image build for Streamlit app
├── README.md               # This file
├── app/
│   ├── app.py              # Streamlit application
│   └── requirements.txt    # Python dependencies
└── init/
    ├── init.sql            # Database schema (tables, triggers, procedures)
    ├── seed.sql            # Sample data
    └── queries.sql         # Reference queries

Key Database Features

Tables

  • customers: Travelers with medical and insurance information
  • space_agencies: Partner companies for space travel
  • travel_packages: Destinations, pricing, and seat limits
  • instructors: Certified experts for training
  • experiences: Optional add-ons for packages
  • bookings: Reservations with payment and clearance status
  • payments: Transaction records and refunds

Business Logic

  • Triggers: Automatically update booking status when medical + insurance checks pass
  • Trigger: Prevent overbooking by validating seat availability
  • Procedure: process_refund() - Handle cancellations and refunds
  • Function: get_remaining_seats() - Calculate available capacity per package

Troubleshooting

"Database is initializing" message persists

  • Wait 2-3 minutes longer
  • Check Docker Desktop is running
  • Restart: docker-compose down then docker-compose up

Cannot connect to database

  • Ensure Docker Desktop is running
  • Check ports 1521, 8080, 8501 are not in use: netstat -an | findstr :1521
  • Try rebuilding: docker-compose up --build

Port already in use

  • Stop other services on ports 1521, 8080, or 8501
  • Or modify docker-compose.yml to use different host ports

Out of memory

  • Increase Docker Desktop allocated memory (Settings > Resources > Memory)
  • Close other applications

Learning Resources

This project demonstrates:

  • ER diagram concepts (entities, relationships, cardinality)
  • Normalization (BCNF, avoiding anomalies)
  • Constraints (PK, FK, CHECK, UNIQUE)
  • DML and DDL operations
  • Complex queries (JOINs, aggregations, subqueries)
  • PL/SQL programming (triggers, procedures, functions)
  • Application integration with enterprise databases

License

Free to use for educational purposes.

About

Originally a course project for Database Systems and modified later

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages