By using this site, you agree to our Privacy Policy and our Terms of Use. Close

Forums - General - Entity Relationship Diagrams help.

Ok we're doing some ER stuff in class and I'm confused on specialization.

Lets say we have an entity A which has a disjoint specialization into A1 and A2. Another entity B has a relationship 'has', B has one A1 and B has any number of A2.

How on earth do I draw that?



Around the Network

Bump. Help on this would really be appreciated, I'm confused as hell.



I'd like to help you, but to be honest I haven't actually created a formal ERD since my second year of university (about 8 years ago)



Fair enough =P

I'm guessing it isn't actually that extensively used in the industry given that there is bugger all about it on the internet.



Bump



Around the Network
Rath said:
Fair enough =P

I'm guessing it isn't actually that extensively used in the industry given that there is bugger all about it on the internet.

ERDs and UML diagrams are used, but few people inside the industry could really tell you how to use them properly ...

The best analogy I could use is imagine that the ERDs and UML they teach you in school is old English and the ERDs and UML that most developers use regularly is gansta-slang. Most often you use and ERD or UML diagram to white-board an idea, and almost all of the detail that they teach you in school is left out of the diagrams.



I'd love to help you but damn I haven't done those in a year. I just remember that the line from B to A1 has to have a 1 and from B to A2 has to have an N. Also you should do a unity of A1 and A2 symbol that turns into a double line going to A. I think that's how it basically but I'm sure there's some oddities in there.



My problem is with the connection from the relationship to the two entities. Should there by one relationship for each or a single relationship that somehow splits?



Rath said:
My problem is with the connection from the relationship to the two entities. Should there by one relationship for each or a single relationship that somehow splits?

well what you have is 2 parallel lines coming out of A, then draw a circle with a lowercase d, then 1 line heading out to A1 and one to A2. Midway along those 1 lines have a U, open towards the circle with the little d. It's funny i know, but that's what it is. If you were doing an overlap, nondisjoint, specialization then you would have a lowercase o in the little circle instead of a d.

 

Edit: If you meant the relationship of B then it's just the normal relationship notation from B to A1 and A2. You know, with a 1 and an N where they apply. Also this is not an ER, it's an extended ER. If you are supposed to do just a simple ER then you shouldn't have to do all this.



I get that it's a disjoint specialization, my problem is with the participation and cardinality.

I have a single relationship 'HAS_A' from 'B', however 'A1' and 'A2' both of which are related to B through 'HAS_A' have different cardinality and participation. Does this mean I have to create two 'HAS_A' relationships, one between B and A1 and one between B and A2 or is there some way to do it with a single relationship.