Multivalued Attributes to Database Schema
For Complete YouTube Video: Click Here
In this class, we will convert Multivalued Attributes to Database Schema.
We have already covered the concepts on the conversion of one-to-one relationships into a database schema.
Multivalued Attributes to Database Schema
The image below is the database schema obtained so far.
In the above image, the ‘locations’ attribute of the department table is multivalued.
Multivalued attributes are not allowed.
To understand this, we will consider the department table, as shown below.
In the process of conversion, we have to separate the multivalued attributes into another table.
The image below is the table for Dept_locations.
The above table has the Dlocations and the Dnumber columns.
The Dnumber column will be there in the Dept_locations table because the locations are from the department table.
What is the primary key for the above table?
The combination of dnumber and dlocations will bring uniqueness among the values in the table.
So, the primary key is the combination of dnumber and dlocations.
The dnumber of the Dept_locations is referencing the dnumber of the department table.
The database schema, including the dept_locations, is as shown below.