• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Help with this db design
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with this db design


  • Subject: Re: Help with this db design
  • From: Guido Neitzer <email@hidden>
  • Date: Sat, 22 Mar 2008 22:58:29 -0600

On 22.03.2008, at 08:45, Gustavo Pizano wrote:

if I do that,  i understand you mean something like this, no?

<Picture 1.png>

if that's so. then I can have the following data.
id	id_person	id_convocation

1		01			1
2		01			1

which its not accepted because a person can't be twice in the same convocation.

Im checking the relationship of this 2 tables and don't see the m:n , im gonna make the relationships again and take care about that relationship.

As JVF said "You will have to model the middle table as an entity by itself, so give it a meaningful name (?Assignment?Meeting? Appointment?). You will end up with Person <-->> ?Appointment? <<--> Convocation."
I know that, but I though that middle table was PersonXConvocation.


Im not getting it there... :(

Gus

PS I changed the study_level_id to id_study_level already, just that its not reflected on the picture.

So, the problem is the following: you are modeling a m:n relationship with an additional attribute on it. So yes, if you don't want duplicates, you'll need to check for them. There are several ways doing this e.g. using a unique constraint on the database and catching errors, checking in the validateForSave method and so on.


It's just something you have to take care of. That's all.

With the current datamodel your person can have many convocations. Is that intended? If not, model a 1:n relationship and keep the state somewhere else. Or check for duplicates and avoid them in your application logic.

cug

--
http://www.event-s.net

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Help with this db design
      • From: Gustavo Pizano <email@hidden>
References: 
 >Help with this db design (From: Gustavo Pizano <email@hidden>)
 >Re: Help with this db design (From: Jean-François Veillette <email@hidden>)
 >Re: Help with this db design (From: Gustavo Pizano <email@hidden>)
 >Re: Help with this db design (From: Jean-François Veillette <email@hidden>)
 >Re: Help with this db design (From: Gustavo Pizano <email@hidden>)
 >Re: Help with this db design (From: Guido Neitzer <email@hidden>)
 >Re: Help with this db design (From: Gustavo Pizano <email@hidden>)

  • Prev by Date: WOPopUpButton queston
  • Next by Date: Re: Help with this db design
  • Previous by thread: Re: Help with this db design
  • Next by thread: Re: Help with this db design
  • Index(es):
    • Date
    • Thread