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)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| tag | varchar(100) | unique, not null | |
| usage_count | integer | not null | |
| created_at | timestamptz | not null |
Indexes (1)
(usage_count)
Relationships
post_hashtags.hashtag_idreferenceshashtags