Skip to content

Phoenix489/Movie-Database-SQLite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This project is a Movie Ratings Database built using Python and SQLite. The purpose of this program is to gain hands-on experience integrating software with a relational database. As a software engineer, my goal with this project was to understand how to store, retrieve, and manipulate structured data efficiently using SQL commands inside a Python program.

The software creates a SQLite database containing users, movies, and ratings. It allows for inserting, updating, deleting, and querying data in a simple and transparent way. After running the program, the database is automatically built, populated with sample data, and queried to display results directly in the console. The program also calculates the average movie ratings using an SQL aggregate function.

Purpose:
This project helps strengthen my understanding of how back-end systems connect to relational databases and how SQL commands can be executed dynamically from within a Python script. The experience gained here provides a foundation for future projects that require persistent data storage such as inventory systems, media libraries, or user-based applications.

Software Demo Video


Relational Database

The database used in this project is SQLite, a lightweight and file-based relational database engine. It is ideal for small to medium applications and is integrated directly into Python via the sqlite3 library.

Database Structure

The program creates three tables that are related through foreign keys:

  1. Users

    • user_id (Primary Key)
    • username
    • email
  2. Movies

    • movie_id (Primary Key)
    • title
    • release_year
    • genre
  3. Ratings

    • rating_id (Primary Key)
    • user_id (Foreign Key → Users)
    • movie_id (Foreign Key → Movies)
    • rating

The Ratings table links users to the movies they have rated. The program demonstrates the ability to perform JOIN operations between these tables and uses the AVG() aggregate function to compute the average rating for each movie.


Development Environment

  • Tools Used: Visual Studio Code, SQLite
  • Programming Language: Python
  • Libraries:
    • sqlite3 (built-in Python library for working with SQLite databases)

The program was developed and tested in a Windows environment using Python’s command-line interface to execute and verify database operations.


Useful Websites


Future Work

  • Add a timestamp column to the Ratings table to track when ratings are submitted.
  • Create a user input interface that allows adding new users, movies, and ratings dynamically.
  • Implement filtering and sorting (e.g., show top-rated or most recent movies).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages