0

We know that if there's an multivalued attribute in any entity - A different new table must be created. My ER Diagram has an entity named 'Restaurant' which has 2 multivaued attributes - 1. Location 2. Contact_no

Restaurants may have more than one locations and every location/branch has more than one Contact_no.

How to create relational database for this? What will the primary keys of the table?

kfoozminus
  • 136
  • 9
  • Please illustrate the design with your multvalued "table", then illustrate the design after creating one new table, then illustrate the design after creating another new table. Then determine candidate keys for each table. Then pick one per table as primary key. Then see whether you have a question. PS [See this answer.](http://stackoverflow.com/a/37483508/3404097) – philipxy Dec 03 '16 at 08:12
  • I don't understand what you said :| – kfoozminus Dec 03 '16 at 13:49
  • you said for multivalued attribute, 2 tables will be created {A, D} and {A, E}. In my database, E also depends on D. So I have to take D in E's table. [Thus making the table {A, D, E}] So will I keep the {A, D} the table or drop it? :/ – kfoozminus Dec 03 '16 at 13:57
  • 1. You had location & contact_no, and presumably a restaurant column. Now you have A, D, E. Can you see that you are not being clear? This is why my last comment asked you edit your question to "illustrate", eg clearly fully describe your initial & other designs. 2 .It's odd that you have an ER diagram *and* a "multivalued attribute". ER methods produce n-ary relationships/associations, but not multivalued attributes. So please edit your question to describe which of those you are starting with and how you got it. 3. Do you mean, a location can have one or more contacts? And can it have 0? – philipxy Dec 04 '16 at 09:07

0 Answers0