最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

data modeling - How to draw an ER diagram where there are 2 entities with exactly same attributes - Stack Overflow

programmeradmin0浏览0评论

Each appliance is classified as either: Kitchen appliances, Entertainment appliances, and it’s important to keep track of their type.

Kitchen appliances and Entertainment appliances have details about weight and dimensions. But, for entertainment appliances also store details about power consumption and display size.

Some appliances, called Smart appliances, have both kitchen and entertainment features.

Draw an ER diagram for this. What I am confused about is how to model Entertainment appliances and Smart appliances because both of them would be having the same attributes.

Each appliance is classified as either: Kitchen appliances, Entertainment appliances, and it’s important to keep track of their type.

Kitchen appliances and Entertainment appliances have details about weight and dimensions. But, for entertainment appliances also store details about power consumption and display size.

Some appliances, called Smart appliances, have both kitchen and entertainment features.

Draw an ER diagram for this. What I am confused about is how to model Entertainment appliances and Smart appliances because both of them would be having the same attributes.

Share Improve this question edited Feb 2 at 12:48 OutOfBounds asked Feb 2 at 11:05 OutOfBoundsOutOfBounds 971 silver badge8 bronze badges 4
  • Based on your description, the two entities would have similar, but not the same attributes. In terms of drawing the diagram: just draw two entities as usual. The real question will come when modelling these relationships in your database. – Shadow Commented Feb 2 at 11:19
  • There are three entities here though - Kitchen appliances, Entertainment appliances and smart appliances. Can you pls elaborate why you mentioned 2 entities? – OutOfBounds Commented Feb 2 at 12:03
  • Each appliance falls into one of the 2 categories: Kitchen appliances, Entertainment appliances - explain where the third comes from. Perhaps you should rewrite your question to be clearer. – Shadow Commented Feb 2 at 12:20
  • I have edited, can you pls have a look now. it does not start 2 explicitly. but when u read the question, then u will notice there is a third category that is a hybrid of both. – OutOfBounds Commented Feb 2 at 12:49
Add a comment  | 

1 Answer 1

Reset to default 0

Honestly, i'd just make one entity and then add an extra attribute called "type"

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论