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
1630 rows
My Rating
1629/1630100%
TMDB Rating
1630/1630100%
Poster
1628/1630100%
Backdrop
1606/163099%
Overview
1629/1630100%
IMDB ID
1620/163099%
Date
1629/1630100%
Runtime
1630/1630100%
Collection
639/163039%

shows

⚠️ 3 Unrated
203 rows
My Rating
200/20399%
TMDB Rating
203/203100%
Poster
203/203100%
Backdrop
202/203100%
Overview
203/203100%
IMDB ID
203/203100%
Date
203/203100%
Seasons
203/203100%
Episodes
203/203100%

people

74819 rows
Poster
53446/7481971%
IMDB ID
60023/7481980%
Birth Date
31588/7481942%
Popularity
74818/74819100%
Gender
66308/7481989%
Deceased Date
3659/748195%

episodes

10494 rows
Date
10459/10494100%
Runtime
10478/10494100%

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_history10714162990851629 movies, 9085 episodes, 1630 rated
movie_cast632791630379436553 lead, 9401 supporting, 47325 minor
movie_crew16578162775531723 directors
show_cast556582033652455658 with ep count
show_crew876720246553129 directors/creators
movie_genres4461162619
show_genres69920316
movie_countries2454161659
show_countries26620121
seasons683203—
collections299——
collection_movies10122991012
genres23——
countries173——
networks58——
production_companies2609——
show_networks23520258
movie_production_companies563015962296
show_production_companies657195430
person_countries3315632846172

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
28Action75388841
46%
Active
18Drama524158682
37%
Active
53Thriller6090609
33%
Active
12Adventure42988517
28%
Active
878Science Fiction369117486
27%
Active
35Comedy35824382
21%
Active
80Crime30138339
18%
Active
14Fantasy216117333
18%
Active
27Horror2270227
12%
Active
9648Mystery15642198
11%
Active
10749Romance1980198
11%
Active
10751Family79786
5%
Active
16Animation47653
3%
Active
10752War45550
3%
Active
36History46046
3%
Active
10770TV Movie37037
2%
Active
10402Music32032
2%
Active
37Western24125
1%
Active
99Documentary11011
1%
Active
107681Politics055
0%
Active
10762Kids011
0%
Active
10764Reality011
0%
Active
10766Soap011
0%
Active

Unrated Movies or Shows

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