Skip to content

itsAsmaa/Cinema_DataBase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Cinema Management System

This is a web-based Cinema Management System built with Flask, Python, and MySQL. The system allows users to manage customers, movies, ticket bookings, and food items in a cinema environment. It also provides features for movie management, scheduling, and food item management.

Features

  1. Customer Management

    • Add, update, delete, and search customers.
    • Customer login and registration functionality.
    • Display a list of all customers.
  2. Movie Management

    • Add, update, delete, and search movies.
    • Display movie details and list of available movies.
    • Movie schedule and booking management.
  3. Ticket Booking

    • Book tickets for movies in different halls.
    • Check seat availability for movie shows.
  4. Food Management

    • Add, update, delete, and search food items available in the cinema.
    • Manage food inventory, prices, and quantities.
  5. Reporting and Analytics

    • View detailed reports such as:
      • Total customers and bookings.
      • Revenue breakdown by movies and genres.
      • Most popular movies, peak revenue days, and hall utilization rate.
  6. Admin and Cashier Login

    • Admin login to manage movies, customers, and food items.
    • Cashier login for handling food item management and transactions.

Technologies Used

  • Flask - Python-based micro web framework used to build the web application.
  • MySQL - Database used for storing data related to customers, movies, tickets, and food items.
  • SQLAlchemy - ORM for connecting and interacting with MySQL.
  • HTML, CSS, Bootstrap - Used for the frontend design and user interface.
  • Jinja2 - Template engine used with Flask to generate dynamic content.

Database Schema

The system uses the following database schema:

  1. Customer Table

    • customer_id (Primary Key)
    • customer_name
    • customer_phone
    • customer_feedback
    • customer_password
  2. Movie Table

    • MovieID (Primary Key)
    • MovieName
    • Director
    • Language
    • Genre
    • Release_Date
    • Duration
    • Movie_Description
    • PosterPath
    • Price
  3. Ticket Table

    • TicketID (Primary Key)
    • MovieID (Foreign Key)
    • CustomerID (Foreign Key)
    • HallID (Foreign Key)
    • ShowDate
    • ShowTime
    • Price
  4. Food Item Table

    • item_id (Primary Key)
    • Item_name
    • Quantity_Available
    • Price
  5. Hall Table

    • Hall_ID (Primary Key)
    • Hall_name
    • Capacity
  6. Movie Show Table

    • ShowID (Primary Key)
    • MovieID (Foreign Key)
    • HallID (Foreign Key)
    • ShowDate
    • ShowTime
  7. Hall Seat Table

    • SeatID (Primary Key)
    • ShowID (Foreign Key)
    • IsBooked
    • Seat_Row
    • Seat_Column

Installation and Setup

Prerequisites

  1. Install Python 3.7+ from Python's official website.
  2. Install MySQL from MySQL's official website.

Steps to Set Up

  1. Clone the repository:

    git clone https://github.com/your-repository/cinema-management-system.git
  2. Install the required Python packages:

    cd cinema-management-system
    pip install -r requirements.txt
  3. Set up the MySQL database:

    • Create a MySQL database called cinema:

      CREATE DATABASE cinema;
    • Import the schema (tables) for the system into the cinema database.

  4. Update the SQLALCHEMY_DATABASE_URI in your app.py file with your MySQL username and password:

    app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql+pymysql://root:your_password@localhost/cinema'
  5. Run the Flask application:

    python app.py
  6. Open the web application in your browser:

    http://127.0.0.1:5000/
    

Routes

Here are some important routes available in the application:

  1. / - Home page
  2. /next_operation - Page showing movies
  3. /add_customer - Add a new customer
  4. /list_customers - List all customers
  5. /delete_customer/<int:customer_id> - Delete a customer
  6. /update_customer/<int:customer_id> - Update customer details
  7. /search_customer - Search for a customer
  8. /Tlog - Ticket vendor login page
  9. /Tmanager - Ticket manager page
  10. /movie/<int:movie_id> - Movie details page
  11. /movie-schedule/<int:movie_id> - Movie schedule
  12. /food_item - Manage food items
  13. /report - View system reports

Contributions

Contributions are welcome! Please fork the repository, create a new branch, and submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published