Re: Are circular relationships a bad thing in ER-modeling?

From: mAsterdam <mAsterdam_at_vrijdag.org>
Date: Mon, 03 May 2004 16:29:40 +0200
Message-ID: <40965762$0$574$e4fe514c_at_news.xs4all.nl>


xlazyx wrote:

> Hey!

Hi

>
> If I have the following theatre system:
>
> A theater sets up _shows_, which is based on
> a _manuscipt/play_ written by a _person_
> A show also has _persons_in differnent _roles_, based on the
> _manuscript_.
>
> And have the following entities:
>
> Theater(TheaterID, Name)
> Manuscript(ManuscriptID, Name, Year)
> Person(PersonID, Name)
> Show(ShowID, ManuscriptID, TheaterID, Date, Time)
> Role(RoleID, ManuscriptID, Name)
>
> How do I relate a Person to a show, so that a person can be an actor
> in a show, in multiple roles?

Maybe like so:
Performance(PersonID, TheatreID, ShowID, RoleID)

> And how do I relate a Person to a Manuscript, so that many people
> can write the same manuscript, and one person can write serveral
> manuscripts.

Author(ManuscriptID, PersonID)

> As I see it I would end up with something like:
>
> Person->Show->Manuscript->Person, which is a circle relationship.
> Isn't this bad? Or is it ok?

I don't think it's bad in general. Trees/hierarchies and networks are often represented by recursive associations (circle relationships). But I don't think such a thing is appropriate in your program-booklet application.

This Person->Show->Manuscript->Person cycle makes sense: A person performs in a show based on a manuscript by a person.

> Of course, there has to be an entity between Person and Show
> because of the N:N relationship, but that's not a problem right?

See above.

HTH Received on Mon May 03 2004 - 16:29:40 CEST

Original text of this message