Entity relationship diagrams doubt

In summary, if you have an entity with books and magazines as subclasses, then you could define shared attributes in the publication entity. Otherwise, you would have to define individual attributes for books and magazines.
  • #1
colt
22
0
I am doing a project of an entity relationship model and a doubt came: Should repeated attributes of the entities be shared? Or I must reproduce these to every entity? In another words, if two of my entities are books and magazines, shall I have a single publisher attribute, or one for each?
 
Technology news on Phys.org
  • #2
colt said:
I am doing a project of an entity relationship model and a doubt came: Should repeated attributes of the entities be shared? Or I must reproduce these to every entity? In another words, if two of my entities are books and magazines, shall I have a single publisher attribute, or one for each?
What if you have some other entity, such as publication, with books and magazines as subclasses (or subentities)?

Whatever attributes that both books and magazines have in common could be defined in the publication entity, and the attributes that books and magazines don't share would go in one or the other of these entities.

That's just my take...
 
  • #3
Mark44 said:
What if you have some other entity, such as publication, with books and magazines as subclasses (or subentities)?

Whatever attributes that both books and magazines have in common could be defined in the publication entity, and the attributes that books and magazines don't share would go in one or the other of these entities.

That's just my take...

True, that's a better solution. On a side note, anyone here has any experience using yuml? If someone does, the problem is that I don't know uml, so I tried to make my diagram through modifications of given samples in the yuml website. But I wasn't able to combine the two geometric shapes that I wish simultaneously. That's because a rectangular box is available in the Class Diagram Samples and the oval shape is available in the Use Case Diagram. But both doesn't work simultaneously in any of the two kinds of diagrams Example: (Register)>(Confirm Registration) is in the "Use case diagram" and [Customer]->[Billing Address] is in the "draw class diagram"
 

FAQ: Entity relationship diagrams doubt

What is an Entity Relationship Diagram (ERD)?

An Entity Relationship Diagram (ERD) is a visual representation of the relationships between different entities (objects or concepts) in a system. It is used to design and understand the structure of a database.

Why are ERDs important in database design?

ERDs are important in database design because they help to ensure that all necessary entities and their relationships are identified and properly defined. This can prevent data redundancy, inconsistencies, and other design flaws in the database.

What are the components of an ERD?

The main components of an ERD include entities (represented by rectangles), attributes (represented by ovals), and relationships (represented by diamonds). There may also be additional components such as primary and foreign keys, cardinality, and participation constraints.

What is the difference between a one-to-one and a one-to-many relationship in an ERD?

A one-to-one relationship means that one instance of an entity is associated with only one instance of another entity. A one-to-many relationship means that one instance of an entity can be associated with multiple instances of another entity. This is typically represented by a line between the entities with the number "1" on one end and the infinity symbol (∞) on the other end.

Are there any limitations to using ERDs?

ERDs have certain limitations, such as not being able to fully represent complex relationships, not being able to capture all data constraints, and not being able to show the flow of data in a system. However, they are still a useful tool for visualizing and designing databases.

Similar threads

Replies
3
Views
2K
Replies
48
Views
10K
Replies
22
Views
2K
Replies
1
Views
1K
Replies
23
Views
2K
Replies
36
Views
4K
Replies
1
Views
1K
Back
Top