0
What has better performance (or how best to do) in a Mysql database, multiple tables, for example 'purchases_cliente_01, purchases_cliente_02' or a 'purchase_clients' table with the client ID ?
Example:
I have a system where I can register a customer and register purchases made by that customer. There is no product registration, only customer(name, Cpf, email...), and purchases(product, quantity, value...).
My question is whether I create a 'shopping' table for each customer example 'comprads_01' for the customer with ID 01, or if I create a 'shopping' table and put a 'ID_CLIENTE' column'.
Normally I would do the second way creating a 'shopping' table with the column 'ID_CLIENTE', but the question arose whether the queries will be faster if I do using a table for all purchases or a table of purchases per customer.
Ps.: You will not have many customers, but many purchases.
It’s a simple question, you don’t need more details, if you need to use the comments I answer, just leave -1 without adding anything doesn’t help.
– Augusto
Augusto, everything depends on what you do with the data. Contextualize your problem. P.S.: Não dei
-1
;)– David
@David, thank you. I put a clearer example.
– Augusto