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.

One-to-One Relationships in ER Diagram to Database Schema 7
Multivalued Attributes to Database Schema

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.

Multivalued Attributes to Database Schema 1
Multivalued Attributes to Database Schema 1

In the process of conversion, we have to separate the multivalued attributes into another table.

The image below is the table for Dept_locations.

Multivalued Attributes to Database Schema 2
Multivalued Attributes Database Schema 2

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.

Multivalued Attributes to Database Schema 3
Multivalued Attributes Database Schema 3