0% found this document useful (0 votes)
6 views

CSC project

The document outlines a Computer Investigatory Project titled 'Movie Hub Management' created by Tharini S.B. at RD International School, Erode, under the guidance of Mrs. Caroline Pauline. The project aims to develop a user-friendly system using Python and MySQL for managing movie details, user profiles, and wishlists, incorporating role-based access control for users and admins. It includes sections on project objectives, requirements, coding, and acknowledgments, demonstrating a comprehensive approach to database management and software development.

Uploaded by

Braque
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

CSC project

The document outlines a Computer Investigatory Project titled 'Movie Hub Management' created by Tharini S.B. at RD International School, Erode, under the guidance of Mrs. Caroline Pauline. The project aims to develop a user-friendly system using Python and MySQL for managing movie details, user profiles, and wishlists, incorporating role-based access control for users and admins. It includes sections on project objectives, requirements, coding, and acknowledgments, demonstrating a comprehensive approach to database management and software development.

Uploaded by

Braque
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 36

`

RD INTERNATIONAL SCHOOL, ERODE.

COMPUTER INVESTIGATORY PROJECT

MOVIE HUB MANAGEMENT

Guided by: Mrs. CAROLINE PAULINE.I, PGT

(Computer Science)

Done by: THARINI S.B XII - B


`

CERTIFICATE
`

CERTIFICATE

This is to certify that the project entitled “MOVIE HUB

MANAGEMENT” is a record of bonafide work carried out by THARINI

S.B. of XII-B. In partial fulfillment of the requirements in COMPUTER

SCIENCE prescribed by CBSE for 2024 – 2025 in RD INTERNATIONAL

SCHOOL, GATEPUDUR, ERODE.

DATE PRINCIPAL

INTERNALEXAMINER EXTERNALEXAMINER
`

ACKNOWLEDGEMENT
`

ACKNOWLEDGEMENT

We wish to express our sincere thanks to our beloved Founder Chairman

Dr.D.SENTHIL KUMAR, our Chairman Mr.S.RAGHUL, our Principal

Mr.R.SHANKAR and our institution RD International school, Erode for

guiding and providing facilities towards the successful outcome of this project

work.

We wish to express our deep and profound sense of gratitude to our guide

teacher Mrs.CAROLINE PAULINE.I, PGT (Computer science), for her

expert help, valuable guidance, comments and suggestions.

We express my heartfelt gratitude to my parents for constant

encouragement while carrying out this project.

We also express our sincere gratitude to one and all who directly or

indirectly, have lent their helping hand in this venture.


`

CONTENTS
`

CONTENTS

S.NO TOPIC PAGE


NO

1 AIM 1

2 3
INTRODUCTION TO PYTHON

3 INTRODUCTION TO PROJECT 6

4 REQUIREMENTS 8

5 PROJECT ANALYSIS 10

6 CODING 12

7 OUTPUT 20

8 SUGGESTED
IMPROVEMENTS 26

9 BIBLIOGRAPHY 28
`

AIM
`

AIM

This project is to create a “Movie Hub Management” System using


Python and MySQL. The system demonstrates essential concepts such as Role-
Based Access Control (RBAC), where users and admins have different levels of
access to features. Users can create accounts, manage their profiles, browse
movies, and add them to their wishlists, while admins have additional
privileges, such as adding, removing, and updating movie details. The project
integrates MySQL as the database to handle all the data operations like storing
user information, movie details, and wishlist statuses. Through this project,
students will gain hands-on experience in database management, understanding
CRUD operations, and how to create interactive menu-based applications.

The software is user-friendly. There will not be any difficulties to the user
to handle the data by this software. And that is my main motive, to present data
in an organized manner.

1
`

INTRODUCTION TO PYTHON
`

INTRODUCTION TO PYTHON

Python is a widely used general-purpose, high level programming language.


It was initially designed by Guido van Rossum in 1991 and developed by
Python Software Foundation. It was mainly developed for emphasis on code
readability, and its syntax allows programmers to express concepts in fewer
lines of code. It is used for
 Web development(server-side),
 Software development,
 Mathematics,
 System scripting.

BENEFITS OF PYTHON:

 Python can be used on a server to create web applications.

 Python can be used alongside software to create workflows.

 Python can connect to database systems. It can also read and modify files.

 Python can be used to handle big data and perform complex mathematics.

 Python can be used for rapid prototyping, or for production-ready


software development.

 Python works on different platforms (Windows, Mac, Linux, Raspberry


Pi ,etc).

 Python has a simple syntax similar to the English language.

 Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.

3
`

 Python runs on an interpreter system, meaning that code can be executed


as soon as it is written. This means that prototyping can be very quick.

 Python has syntax that allows developers to write programs with fewer
lines than some other programming languages.

 Python runs on an interpreter system, meaning that code can be executed


as soon as it is written. This means that prototyping can be very quick.

 Python can be treated in a procedural way, an object-orientated way or a


functional way.

 The most recent major version of Python is Python 3, which we shall be


using in this tutorial. However, Python 2, although not being updated
with anything other than security updates, is still quite popular.

 In this tutorial Python will be written in a text editor. It is possible to


write Python in an Integrated Development Environment, such as
Thonny, Pycharm, Netbeans or Eclipse which are particularly useful
when managing larger collections of Python files.

 Python was designed for readability, and has some similarities to the
English language with influence from mathematics.

 Python uses new lines to complete a command, as opposed to other


programming languages which often use semicolons or parentheses.

 Python relies on indentation, using whitespace, to define scope; such as


the scope of loops, functions and classes. Other programming languages
often use curly-brackets for this purpose.

4
`

INTRODUCTION TO THE PROJECT


`

INTRODUCTION TO THE PROJECT

INTRODUCTION:

This project MOVIE_HUB MANAGEMENT has been developed on Python and


MySQL. The main aim of this project is to manage all the details about personal
profiles, view available movies, and maintain a wishlist and authority to add, update,
and delete movies, as well as manage user accounts etc. Plus, we aim to reduce
human effort.

OBJECTIVES OF THE PROJECT IS TO

 Create and Manage Accounts.


 Movie Management (Admin Only).
 Wishlist Management (User Only).
 Profile Management.
 Role-Based Functionalities.
 Database Integration.
 Improved User Experience.
 Security Features.
 Learning and Applying CRUD Operations (Create, Read, Update, Delete).

6
`

REQUIREMENT
`

REQUIREMENTS

HARDWARE REQUIRED:

 Processor :PENTIUM(ANY)

 RAM :512MB+

 Hard disk : SATA 40 GB ORABOVE

 MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0RMSI


K9MM-V VIA K8M800+8237R PLUS
 CD/DVD r/w multi drive combo: (If back uprequired)

 FLOPPY DRIVE 1.44 MB : (If Backuprequired)

 MONITOR 14.1 or 15 -17inch

 Key board andmouse


 Printer : (if print is required – [Hard copy])

SOFTWARE REQUIRED:

 Operating system : WINDOWS 7 ANDABOVE

 Python

8
`

PROJECT ANALYSIS
`

PROJECT ANALYSIS

 The Movie Hub Management System is a Python-based project that interfaces


with a MySQL database to manage and handle operations related to movies, users,
and movie preferences.
 The main aim of this project is to create an interactive platform where users can
create accounts, view and manage their movie preferences, while administrators
can manage the movie database, add or remove movies, and maintain user
information.
 Database:
Movie hub
 Tables:
 user: This table stores information about the users, including their names,
ages, genders, and passwords. Each user can also have a role (either "user"
or "admin").
 movie: Contains details about the movies available on the platform, such as
movie name, genre, description, and duration.
 Wishlist: Tracks the movies that users wish to watch, along with their
current status (completed or not completed).
 Key Features:
 User Role Management.
 Movie Browsing and Management.
 User Preferences Management.
 Login and Signup System.

10
`

CODINGS
`

zz
CODINGS

import mysql.connector as m
con = m.connect(host="localhost",user="root",password="root")
cur = con.cursor()

print("-" * 100)
print("Welcome to Movie hub")
print("-" * 100)
print("Hi guzz...<3")
print("Hope your doing good")
print("Yup!!! shall we start !?")
print("Lezz go.......")

cur.execute("use Moviehub")
def create_acc():
cur.execute("select max(UID)from user")
data = cur.fetchone()
if data[0] is None:
UID = 1
else:
UID = data[0] + 1
name = input("Enter your name:")
age = int(input("Enter your age:"))
gender = input("Enter your gender(m/f):")
password = input("enter your password:")
conpass = input("Enter the password again:")
role = "user"
if password == conpass:
cur.execute("insert into user values({},'{}',{},'{}','{}','{}')".format(UID, name, age,
gender,password, role))
con.commit()
print(name, "have successfully create an account")
else:
print("the password have mismatched")

def login():
while True:
username = input("Enter username:")
password = input("Enter your password:")

12
`

cur.execute("Select password from user where Name='{}'".format(username))


data = cur.fetchone()

if data == None:
print("password not found retry")
elif data[0] == password:
print()
print("Successfully logined")
print()
cur.execute("Select UID from user where Name='{}'".format(username))
UID = cur.fetchone()
return UID[0]
break
else:
print("Something went wrong")

def display_movie():
cur.execute("Select * from movie")
data = cur.fetchall()
for i in data:
print(i)

def view_profile(UID):
cur.execute("select * from user where UID={}".format(UID))
data = cur.fetchone()
print()
print(data)
print()

def edit_personal_profile(UID):
name = input("Enter your name:")
age = int(input("Enter your age:"))
gender = input("Enter your gender (m/f):")
cur.execute("update user set Name='{}',age={},gender='{}' where
UID={}".format(name, age, gender, UID))
con.commit()
print("The data's has been updated")

13
`

def add_wishlist(UID):
while True:
cur.execute("select * from movie")
data = cur.fetchall()
for i in data:
print(i)

MID = int(input("Enter the movie id you wish to add to your wishlist:"))


cur.execute("select Mname from movie where MID={}".format(MID))
data = cur.fetchone()[0]
if data[0] is None:
print("data is not found for your MID")
else:
status = input("Enter the status (completed/not completed):")
cur.execute("insert into wishlist value({},{},'{}','{}')".format(MID, UID, data,
status))
con.commit()
print(data, "has been added successfully")
break

def remove_wishlist():
while True:
MID = int(input("Enter MID of the movie to be removed:"))
cur.execute("select * from wishlist where MID={}".format(MID))
print(cur.fetchone())
conf = input("is the data select correct(y/n):")
if conf == "n":
continue
elif conf == "y":
cur.execute("Delete from wishlist where MID={}".format(MID))
print(MID, "data's are removed from wishlist")
break

def update_status():

while True:
MID = int(input("Enter Mid of the movie status to be update:"))
cur.execute("select * from wishlist where MID={}".format(MID))
data = cur.fetchone()

14
`

if data[0] == None:
continue
else:
status = input("Enter new status:")
cur.execute("update wishlist set status = '{}' where MID={}".format(status, MID))
print("Updated")
break

def update_pass():
UID= login()
n_password = input("Enter new password:")
cur.execute("update user set password ='{}' where UID={}".format(n_password,UID))
print("password updated successfully")

def add_movie():
cur.execute("select max(MID) from movie")
data = cur.fetchone()
print(data)
if data[0] == None:
MID = 1
else:
MID = data[0] + 1
print(MID)
Mname = input("Enter movie name:")
genre = input("enter genre:")
description = input("Enter description:")
duration = input("Enter duration (nhm(minutes)):")
cur.execute(
"insert into movie values(MID,Mname,genre,description,duration)".format(MID,
Mname, genre, description, duration))
con.commit()
print(Mname, "add successfully")

def remove_movies():
while True:

15

MID = int(input("Enter MID:"))


`

cur.execute("select * from movie where MID={}".format(MID))


print(cur.fetchone())
ch = input("Enter is this the movie to be removed (y/n):")
if ch == "n":
continue
elif ch == "y":
cur.execute("Delete from movie where MID={}".format(MID))
con.commit()
print("Successfully removed")
if input("do you want to continue removing (y/n): ") == "n":
break
else:
continue

def update_movie():
while True:
MID = int(input("Enter the MID to be updated:"))
cur.execute("select * from movie where MID={}".format(MID))
print(cur.fetchone())
ch = input("Enter is this the movie to be made change(y/n):")
if ch == "n":
continue
elif ch == "y":
Mname = input("Enter movie name:")
genre = input("Enter movie genre:")
description = input("Enter description:")
duration = input("Enter duration:")
cur.execute("update movie set
Mname='{}',genre='{}',description='{}',duration='{}' where MID={}".format(MID))
con.commit()
print("Updated successfully")
break

def view_user_account():
cur.execute("select * from user")
data = cur.fetchall()
for i in data:
print()

16

print(i)
`

def main():
print("started")
while True:
m1 = int(input("Enter your choice\n [1] create account \n [2] login \n [3] quit \n
[login to proceed after creating account]\n enter your choice:"))
if m1 == 1:
create_acc()
elif m1 == 2:
UID = login()
while True:

cur.execute("select role from user where UID={}".format(UID))


role = (cur.fetchone())[0]
if role == "user":
m2 = int(input("Enter your choice \n [1] view_profile \n [2] display movies \
n [3] edit_personal_profile \n [4] add_wishlist \n [5] remove_wishlist \n [6]
update_wishlist_status \n [7] update_pass \n [8] back \n enter your choice:"))
if m2 == 1:
view_profile(UID)
elif m2 == 2:
display_movie()
elif m2 == 3:
edit_personal_profile(UID)
elif m2 == 4:
add_wishlist(UID)
elif m2 == 5:
remove_wishlist()
elif m2 == 6:
update_status()
elif m2 == 7:
update_pass()
elif m2 == 8:
break
else:
continue
elif role == "admin":
a1 = int(input("Enter your choice\n [1] add movie \n [2] remove move \n [3]
update movie \n [4] view user account \n [5] update password \n [6] back\n Enter your
choice:"))

17

if a1 == 1:
`

add_movie()
elif a1 == 2:
remove_movies()
elif a1 == 3:
update_movie()
elif a1 == 4:
view_user_account()
elif a1 == 5:
update_pass()
elif a1 == 6:
break
else:
continue
elif m1 == 3:
print("Thank you for visiting")
break
else:
continue
if __name__ =="__main__":
main()

18
`

OUTPUT
`

OUTPUT

----------------------------------------------------------------------------------------------------
Welcome to Movie hub
----------------------------------------------------------------------------------------------------
Hi guzz...<3
Hope you're doing good
Yup!!! shall we start !?
Lezz go.......

Enter your choice


[1] create account
[2] login
[3] quit
[login to proceed after creating account]
Enter your choice: 1

Enter your name: John


Enter your age: 25
Enter your gender (m/f): m
Enter your password: john@123
Enter the password again: john@123
Enter role (user/admin): user

John has successfully created an account with the role: user.


Enter your choice
[1] create account
[2] login
[3] quit
[login to proceed after creating account]
Enter your choice: 2
Enter username: John
Enter your password: john@123

Successfully logged in.

Enter your choice


[1] view_profile
[2] display movies
[3] edit_personal_profile
[4] add_wishlist

20
`

[5] remove_wishlist
[6] update_wishlist_status
[7] update_pass
[8] back
Enter your choice: 1

(1, 'John', 25, 'm', 'john@123', 'user')


Enter your choice: 2

(1, 'Inception', 'Sci-Fi', 'A thief who steals corporate secrets.', '148min')
(2, 'Titanic', 'Romance', 'A love story that transcends tragedy.', '195min')
(3, 'Avengers', 'Action', 'Earth's mightiest heroes unite.', '143min')
Enter your choice: 3

Enter your name: Johnny


Enter your age: 26
Enter your gender (m/f): m

The data's have been updated.


Enter your choice: 4

(1, 'Inception', 'Sci-Fi', 'A thief who steals corporate secrets.', '148min')
(2, 'Titanic', 'Romance', 'A love story that transcends tragedy.', '195min')
(3, 'Avengers', 'Action', 'Earth's mightiest heroes unite.', '143min')

Enter the movie id you wish to add to your wishlist: 2


Enter the status (completed/not completed): not completed

Titanic has been added successfully.


Enter your choice: 5

Enter MID of the movie to be removed: 2


(2, 1, 'Titanic', 'not completed')
Is the data selected correct (y/n): y

2 data's are removed from wishlist.


Enter your choice: 6

Enter MID of the movie status to be updated: 1


Enter new status: completed

21
`

Updated.
Enter your choice: 7

Enter username: John


Enter your password: john@123

Successfully logged in.

Enter new password: newpassword@123

Password updated successfully.


Enter your choice: 1

Enter your name: Admin John


Enter your age: 30
Enter your gender (m/f): m
Enter your password: admin@123
Enter the password again: admin@123
Enter role (user/admin): admin

Admin John has successfully created an account with the role: admin.

Enter your choice: 2

Enter username: Admin John


Enter your password: admin@123

Successfully logged in.

Enter your choice


[1] add movie
[2] remove movie
[3] update movie
[4] view user account
[5] update password
[6] back
Enter your choice: 1

22
`

Enter movie name: Interstellar


Enter genre: Sci-Fi
Enter description: A journey through space and time.
Enter duration (nhm(minutes)): 169min

Interstellar added successfully.


Enter your choice: 2

Enter MID: 3
(3, 'Avengers', 'Action', 'Earth's mightiest heroes unite.', '143min')
Is this the movie to be removed (y/n): y

Successfully removed.
Do you want to continue removing (y/n): n
Enter your choice: 3

Enter the MID to be updated: 2


(2, 'Titanic', 'Romance', 'A love story that transcends tragedy.', '195min')
Is this the movie to be updated (y/n): y

Enter movie name: Titanic - The Epic


Enter movie genre: Romance/Drama
Enter description: The timeless love story aboard a doomed ship.
Enter duration: 200min

Updated successfully.
Enter your choice: 4

(1, 'John', 25, 'm', 'newpassword@123', 'user')


(2, 'Admin John', 30, 'm', 'admin@123', 'admin')
Enter your choice: 5

Enter username: Admin John


Enter your password: admin@123

Successfully logged in.

Enter new password: adminpassword@123

23
`

Password updated successfully.


Enter your choice
[1] create account
[2] login
[3] quit
[login to proceed after creating account]
Enter your choice: 3

Thank you for visiting.

24
`

SUGGESTED IMPROVEMENTS
`

SUGGESTED IMPROVEMENT

 The interface can be made more user-friendly and visually appealing.

 Adding features like charts, reports, or tutorials can help students

better understand the system. Including support for multiple languages

and making the project accessible to all users ensures inclusivity.

 Regular updates, feedback mechanisms, and options for collaborative

use can further enhance its educational value and usability.

 Including support for multiple languages and making the project

accessible to all users ensures inclusivity.

 And to make the usage of the software at more ease and inclusion of

Graphic User Interface (GUI) for more elegant and interactive

software experience.

26
`

BIBLIOGRAPHY
`

BIBLIOGRAPHY

BOOKS REFERRED:

Computer science With Python -ClassXII By :SumitaArora

WEB SITES REFERED:

Website : https://www.python.org
Website : https:// www.google.com
Website : https://www.mysql.com
Website : https://code.visualstudio.com

28

You might also like