Tags in a database, relational or NoSQL

I have the following diagram

PRODUCT (ID, name, description) TAG (ID, labels)

The product will have about 1,000,000 entries, the tag will have 100 entries. If I do this with a relational database, I will make a many-to-many relationship and there will be 10,000,000+ entries in this table, so I'm afraid it will be a little slower. I have no experience with NoSQL databases, and I wandered, getting any advantages to create this schema in NoSQL.

Thanks in advance.

+4
source share
1 answer

2 ^ 24 = 16777216, so as long as you index the mapping table, the relational database will find the tags for this product identifier in less than 24 steps of a simple binary tree search. This should not be slow.

+5
source

All Articles