Database Overview

Live snapshot of all tables, data coverage, and relationships. This is made to identify gaps and plan charts.

Neon PostgreSQL Database

  • Primary Datastore: Primary source of truth for up-to-date watch history, title ratings, and metadata records for website caching.
  • Serverless PostgreSQL: High-performance relational backend hosting custom materialized views and stats tables to feed the website's frontend and api.
  • Nightly Sync Pipeline: Aggregated view data and stats tables recompiled automatically via GitHub Actions.
  • Granular Metrics: Calculated by personal ratings of titles throughout the years to determine affinity based stats to use in rankings and charts.

Cloudflare D1 & Edge Workers

  • Instant Search Index: SQLite database pre-compiled offline for edge distribution, executing ultra-fast queries, completely bypassing cold starts that would normally happen in Neon.
  • Secure Edge Proxy: Serves search endpoints and proxies TMDB requests, protecting private API credentials on the server side.
  • Abuse Protection: Implemented edge rate limiting restricts client searches to a maximum of 3 requests per 10 seconds.
  • Live Scrobbling API: Receives real-time playback payloads at minute-based intervals or event triggers from my streaming platform MemoStream to power the live Now-Playing state.

Database Maintenance

Control buttons to use after synchronisation between my streaming application and the database, they work locally as the hosting provider Vercel does not let runtime of functions more than 10 seconds.

Update buttons make a full scan of all attributed tables to update data to the latest state from TMDB.

Update from history button is used for finding the records that are added to history table but failed on updating canonical tables when MemoStream sends scrobble loads. It runs targeted update for those missing movie and show titles.

Enrich buttons fill the empty fields of the tables using the data from TMDB one by one as the appended endpoints for updating from TMDB does not provide some data that I use in this website.

Data Coverage

movies

⚠️ 1 Unrated
1662 rows
My Rating
1661/1662100%
TMDB Rating
1662/1662100%
Poster
1660/1662100%
Backdrop
1633/166298%
Overview
1659/1662100%
IMDB ID
1641/166299%
Date
1661/1662100%
Runtime
1662/1662100%
Collection
640/166239%

shows

⚠️ 4 Unrated
207 rows
My Rating
203/20798%
TMDB Rating
207/207100%
Poster
207/207100%
Backdrop
206/207100%
Overview
207/207100%
IMDB ID
207/207100%
Date
207/207100%
Seasons
207/207100%
Episodes
207/207100%

people

75933 rows
Poster
53901/7593371%
IMDB ID
60586/7593380%
Birth Date
32056/7593342%
Popularity
75929/75933100%
Gender
67251/7593389%
Deceased Date
3670/759335%

episodes

10582 rows
Date
10547/10582100%
Runtime
10537/10582100%

Sample Rows

One row from each core table showing all column names.

movie Sample

The Lord of the Rings: The Fellowship of the Ring
ColumnValue
titleThe Lord of the Rings: The Fellowship of the Ring
imdb_idtt0120737
runtime179
tmdb_id120
overviewYoung hobbit Frodo Baggins, after inheriting a mysterious ring from his uncle Bilbo, must leave his home in order to keep it from falling into the hands of its evil creator. Along the way, a fellowship is formed to protect the ringbearer and make sure that the ring arrives at its final destination: Mt. Doom, the only place where it can be destroyed.
media_keymovie:120
my_rating10
created_at2026-04-24T21:42:25.818+00:00
poster_path/6oom5QYQ2yQTMJIbnvbkBL9cHo6.jpg
tmdb_rating8.4
release_date2001-12-18
backdrop_path/a0lfia8tk8ifkrve0Tn8wkISUvs.jpg
collection_id119
original_titleThe Lord of the Rings: The Fellowship of the Ring
release_languageen
original_languageen

show Sample

Person of Interest
ColumnValue
namePerson of Interest
imdb_idtt1839578
tmdb_id1411
overviewJohn Reese, former CIA paramilitary operative, is presumed dead and teams up with reclusive billionaire Finch to prevent violent crimes in New York City by initiating their own type of justice. With the special training that Reese has had in Covert Operations and Finch's genius software inventing mind, the two are a perfect match for the job that they have to complete. With the help of surveillance equipment, they work "outside the law" and get the right criminal behind bars. 
media_keyshow:1411
my_rating10
created_at2026-04-24T21:28:37.223+00:00
poster_path/f8aIvYk5h7Z8EP3dinCmVgQFYow.jpg
tmdb_rating8.1
backdrop_path/zKFuboGOXA2qs1SJ5JD5zJA2aBS.jpg
original_namePerson of Interest
first_air_date2011-09-22
release_languageen
number_of_seasons5
original_languageen
number_of_episodes103

person Sample

Laura Vandervoort
ColumnValue
nameLaura Vandervoort
gender1
imdb_idnm0888882
tmdb_id43286
deathdaynull
birth_date1984-09-22
popularity2.94
profile_path/y3geQGnFG8Sbr7smthUTa84fv9v.jpg
place_of_birthToronto, Ontario, Canada
known_for_departmentActing

Relational Tables

TableRowsUnique LeftUnique RightDetails
watch_history10783166191221661 movies, 9122 episodes, 1698 rated
movie_cast640371662385256654 lead, 9499 supporting, 47884 minor
movie_crew16859165077441747 directors
show_cast561662073698156166 with ep count
show_crew879220646793135 directors/creators
movie_genres4503165619
show_genres70620617
movie_countries2479163859
show_countries27020522
seasons714207—
collections300——
collection_movies10173001017
genres23——
countries173——
networks65——
production_companies2636——
show_networks24720665
movie_production_companies567116182320
show_production_companies662198435
person_countries3364133329172

Relationship Map

How core entities connect through junction/relational tables.

movies→watch_historytmdb_id → tmdb_id (movie)
episodes→watch_historytmdb_id → tmdb_id (episode)
shows→episodestmdb_id → show_tmdb_id
shows→seasonstmdb_id → show_tmdb_id
movies→movie_casttmdb_id → movie_tmdb_id
movies→movie_crewtmdb_id → movie_tmdb_id
shows→show_casttmdb_id → show_tmdb_id
shows→show_crewtmdb_id → show_tmdb_id
people→movie_casttmdb_id → person_tmdb_id
people→movie_crewtmdb_id → person_tmdb_id
people→show_casttmdb_id → person_tmdb_id
people→show_crewtmdb_id → person_tmdb_id
movies→movie_genrestmdb_id → movie_tmdb_id
shows→show_genrestmdb_id → show_tmdb_id
genres→movie_genresid → genre_id
genres→show_genresid → genre_id
movies→movie_countriestmdb_id → movie_tmdb_id
shows→show_countriestmdb_id → show_tmdb_id
countries→movie_countriesiso → country_iso
countries→show_countriesiso → country_iso
countries→person_countriesiso → country_iso
people→person_countriestmdb_id → person_tmdb_id
collections→moviestmdb_id → collection_id
collections→collection_moviestmdb_id → collection_tmdb_id
networks→show_networkstmdb_id → network_tmdb_id
shows→show_networkstmdb_id → show_tmdb_id
production_companies→movie_production_companiestmdb_id → company_tmdb_id
production_companies→show_production_companiestmdb_id → company_tmdb_id
movies→movie_production_companiestmdb_id → movie_tmdb_id
shows→show_production_companiestmdb_id → show_tmdb_id

Genre Data Coverage

Number of movie and show entries associated with each genre. Combined TMDB genres (like "Sci-Fi & Fantasy") are flagged with a warning if they contain records.

Genre IDGenre NameMoviesShowsTotal WatchesDistributionStatus
28Action75389842
45%
Active
18Drama526158684
37%
Active
53Thriller6100610
33%
Active
12Adventure43089519
28%
Active
878Science Fiction370117487
26%
Active
35Comedy36124385
21%
Active
80Crime30139340
18%
Active
14Fantasy216117333
18%
Active
27Horror2280228
12%
Active
10749Romance2000200
11%
Active
9648Mystery15642198
11%
Active
10751Family79786
5%
Active
10402Music55055
3%
Active
16Animation47653
3%
Active
10752War45651
3%
Active
36History46046
2%
Active
10770TV Movie38038
2%
Active
37Western24125
1%
Active
99Documentary18119
1%
Active
107681Politics066
0%
Active
10764Reality022
0%
Active
10762Kids011
0%
Active
10766Soap011
0%
Active

Unrated Movies or Shows

0 movies and 4 shows to rate. Click to open on TMDB.