Hey I've been coding from a young age, I've just recently turned 18 I want to create an application for me and my friends to use, it scans a folder and from that folder it gains the movie information based on their backed up movies filename, I have a method of obtaining artwork and movie information to display in the application, I basically want it to save all the information to a local database on the first load of that file but I am unsure of how or what database would be the best for this particular project.

Any input would be appreciated.

Scott

Dani AI

Generated

For a portable, per‑PC catalog the simplest, most robust choice is SQLite: it is serverless, single‑file, cross‑platform and available from Python without extra installs (SQLite home, sqlite3 docs). Since needs a local portable DB, a server install (as suggested earlier by ) is overkill. SQLite gives ACID transactions, indexes and optional WAL mode for better concurrency — good for a local media index.

Keep the schema simple and practical: one movies table for basic fields and a JSON/text column for fetched metadata. Store artwork as image files in a dedicated folder and save paths in the DB (blobs make the DB grow and slow backups). Record checksum (sha1/md5) and mtime for each file so your scanner only adds/updates changed items. If you need richer relations (genres, actors) normalize into lookup tables; otherwise a JSON column is fine.

A tiny Python example to get started:

import sqlite3, json, time
conn = sqlite3.connect('movies.db')
cur = conn.cursor()
cur.execute('''
CREATE TABLE IF NOT EXISTS movies (
  id INTEGER PRIMARY KEY,
  title TEXT, year INTEGER, filename TEXT UNIQUE,
  path TEXT, metadata_json TEXT, artwork_path TEXT,
  checksum TEXT, mtime REAL, last_scanned REAL
)
''')
conn.commit()

Alternatives: TinyDB (pure Python JSON DB) is handy for very simple projects (TinyDB docs). For filename parsing use GuessIt (guessit docs); for metadata/artwork call OMDb or TMDb APIs (watch API keys/rate limits) rather than scraping. Tips: batch inserts inside transactions for speed, generate thumbnails for UI, and keep regular backups of the single DB file.

Recommended Answers

All 5 Replies

He, is this all about illegal downloads, or am I dreaming this up?

No the files are backed up from movies they have purchased, I'm merely making a media application that shows artwork and movie plots :p

BUMP

You can download SQL Server Express free from Microsoft

I can't use that, it needs to be a portable db system because it'll be used to store all movie information on each users unique pc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.