N
N
Nikolay_Smeh2016-06-14 10:05:57
Database
Nikolay_Smeh, 2016-06-14 10:05:57

Which DB is best for storing relevance?

Which of the databases is best suited for storing the degree of correspondence between products? Roughly speaking, it is planned to store the id in the database, what products it is associated with and how high the degree of correspondence with this or that product is. The number of links is not limited. The read speed is more important than the write speed, but the write will also go constantly.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Anatoly, 2016-06-14
@taliban

In principle, in your case, most likely any nosql database will do, you can easily store an object with an array of related products for each product + each array will be an object with fields about the degree of correspondence.
The thing is, how will you choose them, one at a time, or by the condition of the connection? If by connection, then this is, in principle, a resource-intensive operation, then it is better to choose a relational database, there will be a label id, link_id, level
. In this case, you can safely choose by the level of connection, for example.
It’s better to choose a database not by “how best to store”, but by “how easier it is to choose”, and here the question already arises, by what criteria will you choose?

A
Artemy, 2016-06-14
@MetaAbstract

Judging by the data model, the selection will be from the product to its analogues, sorted by the strength of the relationship in descending order. Accordingly, with the correct model and indexes, the answer will be almost instantaneous on the SQL server. If the load grows, divide the read-write databases through replication.

D
Dimonchik, 2016-06-14
@dimonchik2013

you can start in Neo4J, but in the end there is nothing better than relational (better than Postgres)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question