Answer to Question #195343 in Databases | SQL | Oracle | MS Access for Israt Jerin

Question #195343

Suppose that you need to store information of ’Person’ having a multivalued attribute called ’hobby’. A person’s

hobbies can be reading, writing, gardening, soccer, cricket, movies, etc. At present, the database table Person

can store only one hobby! As a database programmer, what would you do to store these multi values f hobbies?

The Person table schema:

Person(id, name, position, hobby)


1
Expert's answer
2021-05-19T07:00:30-0400

For handling such cases of Multivalued attributes, we create another table .

In your case we have parent table Person with

Person( id, name, position, hobby)

so, this design is not good because it contains a multivalued attribute and this violates the single-value attribute rule.

For, solving this we will create table Hobbies with

Hobbies ( id, hobby)

here id is given to link the two tables, Person and hobbies

so, revised design would be


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS