CineVerse is a database-driven theatre management and movie booking system built as a course project for the Database Management Systems (DBMS) curriculum. It demonstrates how core relational database features—such as tables, constraints, triggers, stored procedures, functions, and views—are integrated with a full-stack web application to handle real-world business requirements.
Note: As this course focuses purely on Database Management Systems and database principles without including frontend development in the syllabus, the React-based user interface was developed with the assistance of AI tools. This provides a modern, interactive presentation layer to visualize the underlying database routines in real-time.
The primary goal of this project is to implement robust business logic directly within the database engine rather than solely relying on application code. This enforces critical data integrity and prevents race conditions (such as double-bookings) at the database layer.
Key design principles demonstrated:
- Data Consistency: Using foreign keys, checks, and unique constraints to prevent invalid data states.
- Transactional Atomicity: Managing ticket purchases via stored procedures that lock relevant rows (
SELECT ... FOR UPDATE) to prevent concurrent allocation of the same seat. - Dynamic Updates: Automatically recalculating available seat counts using MySQL triggers.
- Separation of Concerns: Exposing data summaries through database views to simplify application queries.
The database schema is designed in Third Normal Form (3NF) to minimize redundancy and prevent anomalies.
The schema consists of eight main tables:
- theatre: Represents physical cinema locations.
- screen: Individual screen auditoriums inside theatres.
- movie: Catalog of movies including durations, ratings, genres, and release details.
- showtime: Specific instances of a movie showing on a screen at a date/time.
- customer: User account directory supporting both Administrator and Customer roles.
- booking: Customer transaction records indicating the show, seats booked, payment type, and status.
- seat_booking: Granular mapping of individual seats (e.g., A1, B2) reserved under a booking.
- staff: Employee list linked to specific theatres for administrative record-keeping.
Refer to REPORT.md for full descriptions of columns, data types, and index locations.
-
Triggers:
trg_showtime_before_insert: Automatically assigns the initialavailable_seatscount based on the parent screen's capacity when a new showtime is created.trg_booking_after_insert: Decrements theavailable_seatscount in theshowtimetable when a booking status is set to confirmed.trg_booking_after_update: Restores theavailable_seatscount and cancels individual seat records in theseat_bookingtable if a booking is cancelled or refunded.trg_booking_after_delete: Restores showtime seat capacity if booking records are removed.
-
Stored Procedures:
sp_book_ticket: Orchestrates ticket purchases. It executes a database transaction that locks the targeted showtime row, verifies seat availability, inserts the booking record, and returns the unique booking identifier.sp_get_total_revenue: Computes cumulative earnings from confirmed bookings over a defined date range.
-
Functions:
fn_show_revenue: Computes and returns the total revenue generated by a single showtime ID.
-
Views:
v_active_shows: Filters showtimes that are scheduled for today or later and still have empty seats.v_theatre_revenue: Aggregates booking revenue and transaction counts grouped by theatre.
The project is structured as a decoupled three-tier application:
-
Frontend (React + TypeScript):
- A single-page application built with Vite and styled using Tailwind CSS and components from Shadcn UI.
- Includes user authentication states, interactive show schedule browsers, and a graphic seat map selection tool.
- Accessible via local port
8080.
-
Backend (Flask + Python):
- Serves as a RESTful API containing endpoints for authentication, resource lookups, transaction processing, and dashboard statistics.
- Enforces session security via secure HTTP-only cookies and routes requests through a MySQL connection pool.
- Accessible via local port
5000.
-
Database (MySQL):
- Stores all application state and runs the procedures, triggers, views, and integrity checks.
Because CineVerse is designed as a local DBMS project, it requires a local database instance to be initialized and seeded with data to function.
- Show Schedule Window: The included generator script (
generate_shows.py) generates showtime records spanning an 8-month window (specifically from November 15, 2025 to July 15, 2026), seeding over 5,100 shows. - Initial Dataset: The database starts pre-seeded with 40 movies, 3 theatres, and 7 screens to provide a rich dataset for evaluating search filters, capacity checks, and triggers.
- Extending the Data: The system is designed to scale dynamically. Additional movies, screen configurations, or theatres can be appended to the SQL seed files, and the showtime database can be expanded to any duration by adjusting the target dates in
generate_shows.pyand running the script. The scheduling logic will automatically scale to match the updated parameters.
For detailed commands, database user permissions configuration, and troubleshooting steps to run the project on your machine, please refer to the Setup Guide.


