Reputation:
I have designed an er-diagram and have an entity without any attributes. I need this entity (Item) to create a many-to-many relationshop but I guess there is a way to make this more efficient and getting rid of the entity without attributes.
ER DIAGRAM:
Thanks
Upvotes: 3
Views: 8148
Reputation: 10065
ITEM
should have at least one attribute - an identifier. A supertype's primary key can be reused as a foreign primary key in its subtypes.
Upvotes: 1
Reputation: 5534
As I can see from your diagram your Item
isn't just entity without attributes. It's a base type for your BAGEL
and DRINK
(you can think of this relationship as inheritance
in OOP languages).
There are some techniques to work with inheritance in database world. So this Item
is not a problem for ER-diagram
.
Upvotes: 2