Thank you very much. Let me ask you a question about database design.What i am wondering about
As the title says.
Currently there is a table calledProducts. I'm wondering if we can divide this into two tables:Pre-purchase itemsandPurchase items.
By the way,Purchased productsis simply a data item with
buyer_idadded to theProducts before purchasecolumn.
buyer_idis NULL in the pre-purchase table
Search from the big table bother to search purchase history
buyer_iddoes not exist in the pre-purchase table
When searching the list of products, it is not necessary to search for useless lines. (The same goes for the purchase history list)
I did not come up with anything. In other words, will you clearly explain the difference between the two tables to the people in charge of View? . .
Purchased products are based on the premise that they can only be viewed by buyers and sellers, butpurchased products can also be referenced (buyer If there is an implicit understanding ofthat is usually, the question is resolved. How is it actually?
Answer # 1
Let's find out what kind of demand (try writing SQL).
If you want to get pre-purchase information and post-purchase information at the same time and there are many requests, it is better to stop because the performance is bad because you have to use UNION if you separate the table.
Answer # 2
Does the product before purchase look like a cart?
It would be better to divide it.
If you think that the table will not be erased after purchase, it will be frequently updated to the table that grows steadily.
- i want to judge whether the table element of the web screen is a tag with vba
- java - table search with jsp
- Add a field to the table in the MySQL command line (field name, whether it is empty, default value)
- Method for judging whether table or temporary table exists in SQL server
- PHP method to determine whether the table exists
- sql server determines whether the database, table, column, view exists
- Mysql determine whether a table field or index exists
- Determine whether a table or field exists before Oracle deletes the table or field