A few questions about the Design of data Table in Trading Program

the demand is like this. After the seller publishes the product, the buyer buys it, and the buyer confirms it after completion.

do you want to create two data tables for buyers and sellers to store order data?

because once the buyer deletes the order data, neither the buyer nor the seller can see it, isn"t that troublesome?

or soft deletion can be used to change the status of a field in the data table after the order is deleted!
the seller can see all orders (including deleted)

and buyers can only see those that have not been deleted!

which way is better?

Jul.11,2021

Public information (commodity information, order number, etc.) is placed in a table
seller order table to store seller visible information, and associated public information table
buyer order table to store buyer visible information, and associated public information table

the seller deletes the order, just delete the seller order table data
the buyer deletes the order, just delete the buyer order table data


must be the second way of soft deletion. For this kind of e-commerce project, if you really don't know how to design the table, you can refer to the table structure design of shopnc or ecshop. It is available on the Internet, and you can download a copy of it.


I think an order table is sufficient. Not only buyers and or sellers do fake deletions of order data, using different fields. If you really delete the order, how will you reconcile the account with the payment?


in e-commerce-related design, to ensure a principle, "data integrity", all data can not be completely deleted. Why not?

1. To ensure data integrity, there is a way to find out when you encounter problems
2. Ensure data integrity and scientific analysis of users' purchase preferences
3. Ensure data integrity and track user actions

so you'd better use soft deletion.

Menu