MySQL Forums
Forum List  »  Performance

Is better to use a big table for storing all products data or use a table for each store products
Posted by: Wisam Mways
Date: August 22, 2018 01:19PM

Hello

I am developing a Shopify like commerce hosting web application.
So I have a schema like this:

Users
Stores
Products
Attributes
Orders
Carts

So i would do queries like:
SELECT * FROM products WHERE store_id=23
SELECT * FROM Orders WHERE store_id=23

or should I have to use a different set of table for each store like this:

Users
Stores
Products_23
Attributes_23
Orders_23
Carts_23
Products_24
Attributes_24
Orders_24
Carts_24

So i would do queries like this:
SELECT * FROM Products_23 WHERE store_id=23
SELECT * FROM Orders_23 WHERE store_id=23

What are the cons and pros of each scheme.

Thanks!

Options: ReplyQuote


Subject
Views
Written By
Posted
Is better to use a big table for storing all products data or use a table for each store products
1067
August 22, 2018 01:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.