V
V
Vadim2018-02-10 13:57:53
SQL
Vadim, 2018-02-10 13:57:53

Which database schema to choose for a product catalog?

There is a catalog of goods: mattresses, beds, pillows, bed linen. Foolishly, I made everything in separate tables, since the sets of characteristics are different.
Like tables like this:

МоделиМатрасов (фото, базовые характеристики: высота, состав, производитель – FK, ...)
ВнешнийВидМатрасов (вариации с пружинными блоками (FK) и чехлами (FK) и FK на Модель)
ВариантыМатрасов (Вид, Размер – FK, цена)

About the same with the beds, but there are other characteristics and photos for each. Appearance is separate.
How can I generalize all these goods, use json / jsonb? Will it be convenient to search by filters in the catalog? And how to work with this in the Doctrine (or abandon it in this case?)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
novrm, 2018-02-11
@novrm

You need this schema for the database.
PMFTUskGQsCLnwYL7hUBTA.jpeg

M
Maxim Fedorov, 2018-02-10
@Maksclub

You need specs separately. make goods separately ...
Here's just a one-on-one example to make it convenient to work with the filter and that the plates were with a small number of columns:
Do 1 large table or split it into parts?
If it is not very clear - write questions, I will help to understand

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question