Hi, I am trying to understand why this statement in the book is wrong: "given a C entity, there is at most one related A entity and at most one related B entity". Is it that it doesn't apply to a specific kind of relationship?? So, if I have an example of a student who is in attendance to a course with a type of subject. The entities are student, attendance, course and subject. Student makes attendance in a room. Also, a student can make attendance for a subject. Does this example apply to the statement?

Thanks for your time.

Recommended Answers

All 10 Replies

The statement you refer to is meaningless without context. Which book? Subject? Etc.

You then go on to site an example which only has meaning within its own scope. The data you use isn't normalised. Was the original example referring to normalised, hierarchical data?

Need more details please.

The subject is database systems, and I am learning about Ternary Relationships in the Entity Relationship Model. So, I just want to know about the three entities. So, my quote is asking about the relationship, and I just need someone to clarify the statement with an example? I am trying to understand it, but I don't get what it is trying to say. Thanks.

I think the problem is the word "most" it should be "least"...

best regards

I think the problem is the word "most" it should be "least"...

best regards

really? Cause it says that it has to be most, that's the part I'm confused about, can you clarify why it should be least? Thanks

I think the 'MOST' should be changed to '0 or more'.

In a hierarchical relationship A -> B -> C

If A had at MOST 1 B entity, and B had at MOST 1 C entity, then A; B and C would share a 1 to 1 relationship and should, in a normalised database, be rolled up into A.

If A had 0 or more B entities, and B had 0 or more C entities then A -> B -> C are in a true hierarchical relationship.

hello, I'm not very comfortable talking about relations (I missed some class's on the subject)

Please take a look at the following image
http://osm7.cs.byu.edu/OSA/images/relset3.gif

In a Ternary Relationship it makes no sense to have less then one relations. You can't have a Date without all the other entity's Person and Degree. And so on... It simply doesn't make sense at all (at least for me :) )

From my point of view you can't have a 0 connections on an Ternary Relationship

Best regards.. and post the solution as soon as you find it ;)

In the example shown all of these entities have existence without necessarily being related to the other two.

Degrees are defined prior to people being awarded them.

People start courses without necessarily being awarded degrees

Dates exist without being linked to people & degrees.

It is only when you are considering the specific instance of a degree awarded to a person on a date that these relationships have meaning.

And get to more of your classes and then you'll understand the questions you're asked. :(

well.. probably you are right.... I shouldn't miss classes :)

first of all... the original post was edited... and now we are speaking of a different thing.

second: Isn't true that you build relations in order to avoid having duplicated data on a table? That is learned on he first day of classes.

If so... you shouldn't create one entity on a relation if don't intend to used it. That is wrong ...

By so in a ternary relation an entity must have at least one relation...
The term "at most" allows the entity to have a 0 (zero / none) relations what is wrong in a Ternary Relationship...
The term "at most" don't allow multiple relations on an entity discarding the possibility of an associative entity and that is also wrong because you need one.

All entities exist by them self, but if they are a part of a relation (2 ways, 3 ways.. etc,) logically and considering the databasing good practices it has to have at least one relation within the ternary relation. If not that entity is not part of a the relation.
In order to establish a ternary relation you need a associative entity, and this entity need to have more than one relation.

TigerGirl:
one student attends to courses (1-N)
a course has several subjects (1-N)
a course has several student's (1-N)
a subject can be a part of several courses (1-N)
What is your associative entity?
In your example you need a model with several associative entities and by so you are not talking about a Ternary Relationship

Well this is my opinion.. and I admit that I can be wrong.. but this is a forum and by so I think this is a discussion place.. and I think that every one is in title of showing ones opinion..

best regards

I have just spoken with a friend of mine and we discussed this subject and here is the conclusion:

The statement on your book is correct!

On a ternary relationship you have 1 associative entity + 3 entities. The ternary relationship is established between an associative entity and 3 other entities that can also be associative entities or not (your A,B and C).
A, B and C can't have more or less connections than one - if this appends it is not a ternary relationship.

On my pots I have been considering that the associative entity is considered as an entity, but is not (my bad). The associative entity is the base so it doesn't count for the ternary relationship.

So... in a ternary relationship all entities have one and only one relationship. And that relationship is established between the associative entity and an entity (A,B or C)

By so and considering all of the above if you have a C entity you need to have 2 more related entities (A and B, or Z and X, or 1 and 2.. and so on) to establish an ternary relationship.

As I said before all entities exist by them self's. But in order for them to be in a ternary relation they have to have a relation with the associative and there must be 2 other entities also connecting to the associative entity.

I have said before to change the "at most" for "at least" this was considering that and associative entity is an entity on the relationship.
I was wrong!
even if we consider that "at most" allow a 0 (zero / none) relations, this automatically excludes an entity from the ternary relationship.
And by so your book is right.

What your book is saying is that you cant have more or less then 3 entities on a ternary relationship..... If your a 1 entity you need 2 other's in order to have a ternary relationship.

Now that I've gone back to your (edited) first post I have to agree with Migcosta. However a ternary relationship, by its name implies a special relationship between three associated items.

It might have been better to insert your changed query within the flow of the thread rather than edit the original query. I don't often re-read everything in a thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.