hashtags table

The hashtags table in the Social Media Database Schema schema has 4 columns, keyed by id. 1 column in post_hashtags references it.

Stored once, lowercased. usage_count is a cache that drives trending.

Columns (4)

Columns of the hashtags table
ColumnTypeConstraintsDescription
iduuidprimary key
tagvarchar(100)unique, not null
usage_countintegernot null
created_attimestamptznot null

Indexes (1)

  • (usage_count)

Relationships