categories table

The categories table in the E-commerce Database Schema schema has 5 columns, keyed by id, with 1 foreign key to categories. 1 column in product_categories references it.

Self-referencing tree. parent_id null means a top-level department.

Columns (5)

Columns of the categories table
ColumnTypeConstraintsDescription
iduuidprimary key
parent_iduuidreferences categories.id
namevarchar(120)not null
slugvarchar(140)unique, not null
positionintegernot null

Relationships