Movie Ticket Booking

Admin-Panel

Admin Panel

MovieHomePage

Home Page

MovieProjectRun

Project Run

MovieOutputPage

Output Page

Project Details

Introduction

The Movie-Ticket-Booking initiative is a basic project utilizing JSP/Servlet, Java, and PostgreSQL. It features two login pages: one for administrators and one for users. Administrators can manage movies and schedules, while users can select movies, book seats, and purchase tickets (silver, gold, platinum). Four database tables have been created: Admin, User, Movie, and Show.

Tables

Here are the SQL queries to create the tables for this project:

Admin

CREATE TABLE admin (
  id BIGINT NOT NULL,
  name VARCHAR(20),
  email VARCHAR(50),
  password VARCHAR(20),
  PRIMARY KEY (id)
);

User

CREATE TABLE users (
  id SERIAL NOT NULL,
  name VARCHAR(20) NOT NULL,
  email VARCHAR(50) NOT NULL,
  country VARCHAR(50) DEFAULT 'USA',
  password VARCHAR(20) NOT NULL,
  PRIMARY KEY (id)
);

Movie

CREATE TABLE movie (
  id SERIAL NOT NULL,
  title CHAR(80) DEFAULT NULL,
  genre CHAR(20) DEFAULT NULL,
  duration INT DEFAULT NULL,
  director CHAR(50) DEFAULT NULL,
  PRIMARY KEY (id)
);

Show

CREATE TABLE shows (
  id SERIAL NOT NULL,
  MId INT DEFAULT NULL,
  screen INT DEFAULT NULL,
  slot INT DEFAULT NULL,
  booked INT DEFAULT NULL,
  PRIMARY KEY (id),
  CONSTRAINT shows_ibfk_1 FOREIGN KEY (MId) REFERENCES movie (id) ON DELETE CASCADE
);

Screens / Pages

1. Home Page

  • Task 1: Create User Login
  • Task 2: Display table shows info with radio select options (Select, Movie, Show Slot, Duration, Screen No., Available)
  • Task 3: Book Movie Box/Form with info (No. of seats dropdown, radio select options (Silver 100, Gold 150, Platinum 200), Book Now button)
  • Task 4: Book Now button will navigate to a servlet which will check for availability and show "Shows Full" or "Tickets Booked" and Paid amount
  • Task 5: Consider variables like total=100, 200, etc., to calculate available capacity by total-booked

2. Admin Login

  • Task 1: Admin page after login will have 3 boxes: Add Movie, Schedule Movie, and Delete Movie
  • Task 2: Add Movie (Movie name, genre, duration, director) - will add to the movie table
  • Task 3: Schedule Movie (Movie ID, Screen No., Slot No.) - will add to the shows table
  • Task 4: Delete Movie (Movie name) - will remove from the movie table
  • Task 5: Display updated movie info (Movie ID, Title, Genre)

SuccessFully Completed....