Entities to Relations Multivalued Attributes

If an entity has a multivalued attribute (e.g. a_levels) then create a relation for it (e.g. stud_alvl).

The new relation has a single value attribute (a_level) "equivalent" to the multivalue one and another attribute (e.g. s_id) that links (i.e. foreign key) to the owning relation.

These two attributes form the new relation's primary key set.

Note that for each element in the original multivalued attribute, there exists a single tuple in the new relation.

 

CREATE TABLE Student

( id_num char(10) PRIMARY KEY, …)

 

CREATE TABLE stud_alvl

(s_id_num char(10), # fk-std.id

a_level char(10),

PRIMARY KEY (s_id_num, a_level))

kaizenlogadmin (2863 Posts)

I am Peter, a blogger, SEO and social media person who has an interest in E-commerce, ERP and CMS systems. You can contact me by e-mail: kaizenlog@gmail.com