related_subreddits table

The related_subreddits table in the Reddit Clone Database Schema schema has 5 columns, with 2 foreign keys to subreddits.

Both moderator-curated and algorithmic neighbours in one table, distinguished by source, so the sidebar and the recommender can read the same rows without arguing about precedence.

Columns (5)

Columns of the related_subreddits table
ColumnTypeConstraintsDescription
subreddit_iduuidnot null, references subreddits.id
related_subreddit_iduuidnot null, references subreddits.id
sourcerelation_sourcenot null
scoredoublenot null
computed_attimestamptznot null

Relationships