Re: Help with this db design
Re: Help with this db design
- Subject: Re: Help with this db design
- From: Gustavo Pizano <email@hidden>
- Date: Sun, 23 Mar 2008 00:02:30 -0500
Hi well the person can be in may convocations, yes, but only once per
convocation.
Gus
On Mar 22, 2008, at 11:58 PM, Guido Neitzer wrote:
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