M
M
Maksim862019-08-19 23:04:41
Database design
Maksim86, 2019-08-19 23:04:41

How is the organization of the online store catalog implemented?

I'm making a store in yii2. I would like to know the opinion of experienced people on how to properly organize the catalog of an online store. Those. how it should be composed: it is one table, a tree or several related tables for storing categories, subcategories and products (names)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
epst, 2019-08-21
@epst

Tree, in the simplest case id, pid, name. More complicated nested set.
The product has a category_id field where the main category is placed and an additional product-category table if the product can be in several categories

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question