A
A
armizonov2014-10-16 21:12:35
MySQL
armizonov, 2014-10-16 21:12:35

How to properly design 4 db tables?

MySQL base. Knowledge on this part is close to 0.
There are 3 tables:
customer
Order
Item
Relationship is needed. Whether a question in that there is a sense to make communication in one table? For example:
Object.id order.id relation_type
1 1 Customer
1 1 Item
2 1 Customer
What solutions can there be? Pros and cons? Or another option? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mamkaololosha, 2014-10-16
@armizonov

https://ru.wikipedia.org/wiki/Normal_form
Usually 1-2-3 and joints are enough. You are going in the right direction and trying to do something like 3 forms.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question