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: Fri, 21 Mar 2008 13:32:12 -0500
Ok this is what I did. hAving in mind what Jean and James suggested.
Attachment:
db.pdf
Description: Adobe PDF document
I know that there should be a middle table to avoid a many2many
relation, i tought that table could be PersonXConv, if no correct me
please.
I want to start from a good db design and UML desing, (I guess apply
for WO too), so I will not have "so many" problems later on.
Thank a lot
Gustavo
On Mar 21, 2008, at 12:46 PM, Jean-François Veillette wrote:
Assuming the relation between a Person and a Convocation is a many-
to-many with a qualified state, you already have your pk and fk,
just not marked appropriately.
In PersonXConvoc, both id_person _and_ id_convocation should be
primary key (as in ExpertiseXPerson).
In EOModeler, you probably do not want the many-to-many to be
modeled though (Person <<-->> Convocation), because if you do so,
you won't have access to your 'state' attribute.
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 also suspect that the Person id (the primary key) is meaningful
for the user (because you gave it a varchar(16) type), if so, try to
avoid whenever possible (99.99%) to have an attribute that is also a
primary key. Juste give a person a numeric pk (as in other
tables). Since that pk is used as foreign key in other table, you
will avoid trouble later on, when you start updating this attribute
(assuming it's mutable).
- jfv
Le 08-03-21 à 12:54, Gustavo Pizano a écrit :
Well, as you may see db design its not my best quality, I have done
a design here, but I have a problem at how to connect the
PersonXConv with the Person entity, dunno where to put the FK, any
help please? andy suggestion?
F= FK
P=PK
N=NOT NULL
if you need some more info about the model let me know..
Gustavo
PS I jsut wanna have the model well designed so the rest, (in
Hibernate and OFF COURSE in WO ) will be fine so I can show the
teacher the wonders of WO.
<db.pdf>
_______________________________________________
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
_______________________________________________
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