Are these two ERDs the same? Do they represent the same thing? [Weak entities and multi-valued attributes]

erd

What I want to create is a table in a database for employees in a company.

Each employee has a unique identifier ID and a name. Each employee also has a list of skills, the skills are represented as a string (i.e. "Cashier", "Manager", etc.).

Multiple employees can have the same skill, for example, John is a Cashier and a Manager and Bob is also a Cashier.

I thought of two ways to represent this using an ERD:

  1. Using a multi valued attribute connected to the Employee entity:

multi valued attribute

  1. Using a weak entity with the following cardinalities:

weak entity

What I'm asking is, are these two implementations the same, cardinality and all?

Best Answer

These two diagrams look significantly different to me.

You should have a table for employees, a second table for skills, and a third table mapping each employee to each skill they have.

Related Question