categories table
The categories table in the Blog Database Schema schema has 6 columns, keyed by id, with 1 foreign key to categories. 2 columns in post_categories and seo_meta reference it.
Self-referencing tree, editorially curated. Categories are few and hierarchical; tags are many and flat.
Columns (6)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| parent_id | uuid | references categories.id | |
| slug | varchar(140) | unique, not null | |
| name | varchar(120) | not null | |
| description | varchar(500) | ||
| position | integer | not null |
Relationships
categories.parent_idreferencescategories.idpost_categories.category_idreferencescategoriesseo_meta.category_idreferencescategories