Re: Generating values as part of a compound key
- From: "Mark" <news@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 15:45:40 +0100
> You are right, this table layout would not work with identity. However, I
> figure your table layout may not be optimal because you really have a n-m
> relationship between incidents and pupils. And as far as I can see
> there's no place to store information where there is just one piece per
> incident (for example date and time). With all that I know ATM I would
> have it as follows:
>
> table incidents with date, time, location whatever and incidentid
> (identity)
> table pupils with pupilid (identity), name, day of birth - whatever
> table pupils_in_incidend with incidentid, pupilid (both foreign keys)
>
> This seems the most normalized approach here.
>
> Kind regards
>
> robert
OF COURSE! I should have seen that it would be silly to duplicate all of the
incident information for every pupil involved in a given incident.
Thank you immensely for your help!
Mark.
.
- References:
- Generating values as part of a compound key
- From: Mark
- Re: Generating values as part of a compound key
- From: Robert Klemme
- Re: Generating values as part of a compound key
- From: Mark
- Re: Generating values as part of a compound key
- From: Robert Klemme
- Generating values as part of a compound key
- Prev by Date: Re: How to "undo" a delete with cascades
- Next by Date: SMC violating Microsoft license agreements?
- Previous by thread: Re: Generating values as part of a compound key
- Next by thread: SMC violating Microsoft license agreements?
- Index(es):