I think ORM diagrams contain unnecessary information

S

Saint Stephen

Learning ORM for my 70-300 test.
It seems to me that ORM constraints contain unnecessary symbollogy.
This is the way I understand it (ignoring symmetrical pictures):

1. (no constraint stated)
----- -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

2. (zero or more ... zero or more)
----- <-----> -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

3. (zero or one ... zero or more)
----- <-> -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

4. (exactly one ... zero or more)
----- <-> -----
| | ------- | |
| A X----| | |----| B |
| | ------- | |
----- -----

5. (one or more ... zero or more)
----- -----
| | ------- | |
| A X----| | |----X B |
| | ------- | |
----- -----

First of all, do I understand the symbollogy correctly.

An "inner arrow" (> in the middle [#3], not on the far right [#2]) is
drawn when "one" appears in the second term (uniqueness)
(shown in #3 and #4).

A "dot" (X) is drawn when "one" appears in the first term
(mandatoriness) (shown in #4 and #5).

The Outer arrows and rays appear to be use haphazardly and
inconsistently, and convey no information. I would simplify
the diagrams thusly:

1b. (no constraint stated)
----- -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

2b. (zero or more ... zero or more)
----- -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

3b. (zero or one ... zero or more)
----- > -----
| | ------- | |
| A |----| | |----| B |
| | ------- | |
----- -----

4b. (exactly one ... zero or more)
----- > -----
| | ------- | |
| A X----| | |----| B |
| | ------- | |
----- -----

5b. (one or more ... zero or more)
----- -----
| | ------- | |
| A X----| | |----X B |
| | ------- | |
----- -----

I see no point in distinguishing between #1 and #2 at all.
And none of my diagrams contain any less information that
the "accepted forms."

What do you think? Am I misunderstanding them? If I am,
please correct my ignorance.
 
S

Saint Stephen

5. (one or more ... zero or more)
----- -----
| | ------- | |
| A X----| | |----X B |
| | ------- | |
----- -----

Whoops, forgot what I was doing while I was editing this post.
Obviously the "X" near "B" on the far right is incorrect in #5
and #5b. Ignore it.
 
S

Saint Stephen

5. (one or more ... zero or more)
----- -----
| | ------- | |
| A X----| | |----| B |
| | ------- | |
----- -----

This one is incorrect anyway. It should be this:

----- <-----> -----
| | ------- | |
| A X----| | |----| B |
| | ------- | |
----- -----

But that doesn't change my basic assertion: only the presence of an inner
arrow means anything. It seems to me the following algorithm can be used
to draw a constraint:

1. Draw the entities and the relation.
2. If no constraint is stated, stop.
3. If all entities are "...or more", draw a full arrow over the whole
relation.
4. Otherwise, draw a "partial arrow" over the parts which are "..or one",
and leave blank the space over the "...or more" parts. (If everything is
"...or one", draw a partial arrow over all parts).
5. Draw dots on each entity which is "one or..."

It's the inconsistent treatment of "...or more" in #3 and #4 which
confuses me. Am I missing some important reason why sometimes an "...or
more" has a line over it and sometimes it doesn't?

Each combination of n instances chosen from n entities is *always* unique.
It's meaningless to assert this uniqueness (the #3 case).

Help me if I totally missing it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top