post_views table

The post_views table in the Reddit Clone Database Schema schema has 4 columns, with 1 foreign key to posts.

Pre-aggregated per post per day, not one row per hit. Raw impression logs belong in an analytics pipeline, never in the table the site reads on every page load.

Columns (4)

Columns of the post_views table
ColumnTypeConstraintsDescription
post_iduuidnot null, references posts.id
viewed_ondatenot null
view_countintegernot null
unique_countintegernot null

Relationships