Reputation: 105
Say that im building a DB of candy bars and one of the categories is "Flavor" say that a candy bar has more than 1 flavor, how do i represent that in phpmyadmin without creating a duplicate row?
Upvotes: 0
Views: 37
Reputation: 10947
You need a more complex model:
with this, a candy bar can have more than one flavour, and also a flavour can be associated with more than one candybar. This is a normal N-M relationship.
UPDATE:
If you are not familiar with this kind of issues, i recommend that you read some tutorials on how to model relational databases.
Upvotes: 1