MySQL Design member form course form after the user buys the course, is there a member_course form that requires an Order form?

specifically, there are user member table, course course table, user purchase record member_course table, but you need to pay after purchase, so is it necessary to create another Order table to record users" purchases? If necessary, why?

my idea is that if you don"t need it, the purchase record member_course table can be considered an Order table, and whether or not to pay and the amount can be attached to this table.

I hope you will not begrudge me. Thank you very much.

Mar.04,2021

your idea is fine, but there is no expansibility. If you need to add new products in the future that are not part of the course, you need to connect more tables when looking for an order. It is best to consider three paradigms when building a table. Unless the business needs to query quickly, it is best not to add extra fields to the table

.
Menu