M
M
MaxSemenov2021-08-03 15:26:17
Database design
MaxSemenov, 2021-08-03 15:26:17

How to correctly implement the delivery of an order to different addresses?

Good afternoon everyone, tell me how to correctly implement the delivery of an order to different addresses, the database architecture is of interest, my option is:
Table orders
user_id in case of a registered user
payment_method
, etc.
Table user_shipping_address
order_id
post_code
shipping_address
, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2021-08-03
@MaxSemenov

I would not strive for normalization and kept all the information in the order. In case the user changes the data - so that the data in the orders does not change. Well, or prohibit changing, only adding addresses. And so - the list of addresses can be attached to the user in a separate plate so as not to wool, and let him choose what to substitute in the order (if he didn’t substitute anything and filled it in with his hands, then create a new record when creating the order).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question