S
S
svilkov872017-04-23 19:14:54
SQL
svilkov87, 2017-04-23 19:14:54

What is the best way to build a database architecture if you plan to search for several types/types of goods?

Good afternoon!
It is planned that in the project the assortment of goods will be from at least 15 areas ...
- bricks, mixtures, roofing, insulation, etc. - and so on up to 15, at least.
The search results should display:
id, name.
A question - to make on each group of goods the table and fields id, name and selection to do with UNION ALL?
Or make one table for all product groups and select id and name only in it? But in this case there will be a lot of fields in this table. After all, each nomenclature has a description, detailed characteristics, etc. And some fields will be empty, because. a brick, for example, has such characteristics that a roof does not have ...
I hope the essence of the question is clear, I will be grateful for an answer.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2017-04-23
@Nipheris

You are faced with the standard task of building a catalog - sets of characteristics for heterogeneous objects, and as I understand it, new types of objects can constantly appear. This task is solved either with EAV , if you stay within relational databases, or by storing the directory in a documentbase like MongoDB . Also consider using JSON/XML columns in your RDBMS, if supported.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question