K
K
Konstantin2018-12-15 03:08:11
MySQL
Konstantin, 2018-12-15 03:08:11

Do I need an additional field in the database table?

The database has tables Orders and an associated table Orders_Products . Also shops . The Orders
table stores information on the order and the identifier of the person who made the order ( User ). I ran into a problem when I need to display all orders for a given store. Currently, this can only be done through the Orders_Products table , because the Orders table does not store the store identifier. Should I add such a shop_id field to the Orders table ? Does this violate the principles of normalization?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2018-12-15
@Junart1

you didn’t even cover the subject area with relations, but you are already thinking about normalization) yes. add

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question