E
E
Eugene2017-04-02 12:04:38
PHP
Eugene, 2017-04-02 12:04:38

Structure of the universal data catalog?

Good afternoon!
There was a need to file the mechanism of universal directories, with the ability to create / change directories, their sections and properties of elements. I have experience with Bitrix and its infoblocks, and quite a bit of experience with nodes and CCK in Drupal.
I would like to know if there are other solutions to this problem. Perhaps these are some bundles for Symfony, or plugins in Composer. If there are none, then advice on the structure of the database will be very helpful:
1. Is it worth separating elements from different directories into separate tables, or storing them in one, as Bitrix does
2. where to place the properties of elements that will be created by the user through some interface (separate tables with property values ​​(Bitrix infoblocks), adding new columns to the table of elements (highload blocks in Bitrix), if separate tables, is it optimal to make them for each properties separately (as in Drupal))
3. ...
It is desirable that such a structure could work with a large number of elements (for example, 200+ thousand) without a strong creak and cod, make a selection with filtering and pagination for pagination in one request .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Koryukov, 2017-04-02
@MadridianFox

Wanguyu - right now people will come running with advice like "yuzai mongodb" ...
In general, you can use EAV. This is when entity attributes are not stored horizontally (columns in the table), but vertically (one attribute - one row). Additionally, tables are needed that will store a list of entity types, a list of attribute types, and relationships between entity types and attribute types.
But I warn you - there is a noticeable subsidence in terms of speed, and working with this may not be so convenient.
In the case when it is necessary to build a repository for the same type of entities with optional attributes, for example, a product catalog, where everything is a product, but the refrigerator has power, and the smartphone has the right number of megapixels.
So, in this case, filtering performance is achieved through the creation of a separate index, maybe even using separate software, such as Sphinx.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question