Zemzela
Zemzela

Reputation: 3080

tags in database, relational or NoSQL

I have e following schema

PRODUCT(ID,Name,Description) TAG(ID,Label)

Product will have about 1000000 records, Tag will have 100 records. If I do it with relational database I'll make many-to-many relation and in that table will be 10000000+ records, so I'm afraid it will be a bit slow. I don't have any experience in NoSQL databases and was wandering will I have any benefits for making this schema in NoSQL.

Thanks in advance.

Upvotes: 4

Views: 1096

Answers (1)

DevDelivery
DevDelivery

Reputation: 447

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

Upvotes: 5

Related Questions