in reply to Mapping objects to database tables
Maybe it's just me but I would design the db first and the object layer second - that way external tools (sql, report builders, etc) do not have to filter through your mapping.
So for your example, I would modify example 1 ... but add a third table called Person and pull the person data out of Death and Wedding:
Where groom_id and bride_id are foreign keys into Table:PersonTable:Death Table:Wedding Table::Person ----------- ------------- ------------- death_id wedding_id person_id person_id groom_id firstname short_obit bride_id surname obituary message_from_couple flowers details charities date_of_wedding date_of_death
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mapping objects to database tables
by clinton (Priest) on Nov 07, 2006 at 13:35 UTC | |
by derby (Abbot) on Nov 07, 2006 at 13:49 UTC | |
by clinton (Priest) on Nov 07, 2006 at 14:08 UTC | |
by pajout (Curate) on Nov 07, 2006 at 14:17 UTC | |
by clinton (Priest) on Nov 07, 2006 at 14:34 UTC | |
by pajout (Curate) on Nov 07, 2006 at 14:48 UTC |