2

I'm studying from "Database Design and Development: A Visual Approach" by Frost, Day, and van Slyke.

It presents relationships in Chapter 5 that indicate partial or total and disjoint or overlap specialization.

Unfortunately, I cannot figure out how to diagram such a thing in MySQL Workbench. A Google search doesn't turn up much either. I found a result about a person asking about them only in SQL to be told that "he doesn't understand the relational database model', which was really annoying.

My book gives examples where this can save diskspace and states that it's a perfectly valid part of the relational model. But it appears to be missing from Workbench.

How can I exhibit specialization in Workbench? The book uses "Student" and "Athlete" and "Councilmember" tables as their example, where a student can be an athlete, student council member, both, or none.

EDIT: Found some links to people asking more or less the same question. Here's the link to a person in the mysql forums. He got an annoying reply that basically ignored his question. Here's a link to the question at DevShed. He got no reply. I now suspect that the functionality does not exist in workbench, despite the name EER suggesting it does.

SO Stinks
  • 3,258
  • 4
  • 32
  • 37
  • did u find any solution to that problem cause i also facing it atm? I have seen that there are some different lines with O on one side and that means total participation but i cannot find where is that option in the workbench :/ – BugShotGG Jan 22 '13 at 13:12
  • I was just looking for an answer to your question as well. Unfortunately none of the folks who replied here understood what you're looking for. The reason is that Workbench's ER diagram features are meant only for LOGICAL database modeling, and the EER capabilities like specialization and generalization are really part of CONCEPTUAL data modeling. – ybull Nov 19 '13 at 20:24
  • "[In this stackoverflow answer](http://stackoverflow.com/a/12037398/145999) is a detailed explanation about the generalization/subtyping characteristics that need to be modeled." *(This comment is by [@LuiShadow84](http://stackoverflow.com/users/1493756/luishadow84), who does not have the required reputation to add comments yet)* – HugoRune Dec 17 '13 at 20:06

3 Answers3

2

Ok i think i have found the solution! If you click a line between two entities you ll see 2 boxes for each side of the connection that says Mandatory. This is total participation. At least it worked for me. You ll notice that total participation has no O on the side that participates but if you uncheck it you ll get a partial participation with O on the side of the entity.

BugShotGG
  • 5,008
  • 8
  • 47
  • 63
1

i'm also a beginner for SQL and I had similar problem before, but i think i've clearer mind now, so I'd like to share with you.

If I'm not taught wrong, specifications you mentioned (partial or total and disjoint or overlap specialization) can not be diagramed in ER diagram (ie, entity-relationship diagram), but mysql (and other well-known database softwares) does have this covered. Basically, you enforce this kind of constraints through trigger, check and assertation. And I'm also using mysql workbench, you can certainly create triggers.

If you want to know more about trigger, check and assertation, read jellomonkey's answer: what is the difference between triggers, assertions and checks (in database)

Community
  • 1
  • 1
JK ABC
  • 576
  • 5
  • 12
0

I believe that when you double click the entity at the bottom you can create indexes and foreign keys between entities. Once created the diagram updated showing lines representing the relationships between entities.

If you provide further details on the structure and relationships of the the table I could try to represent it for you.

Is it something like this you are after http://grab.by/ank7

Gabriel Spiteri
  • 4,896
  • 12
  • 43
  • 58
  • The example I'm trying to duplicate consists of a table STUDENT which is specialized by tables ATHLETE and "COUNCILMEMBER" (really student government member). The STUDENT table has an index as primary key and let's just say "first" and "last" name as fields. ATHLETE has STUDENT$id as foreign key and "eligibility" as a field. COUNCILMEMBER as STUDENT$id as primary key and "office" as field. How would a partial overlay relationship be with STUDENT as the supertype? – SO Stinks Jun 17 '11 at 08:28