Anyone got any suggestions for books on how to translate OO design to DB
design?  Take baseball for instance.  A pitcher is a player, but they have
more stats, so I might model this with a Player object, and have a Pitcher
object that is derived from Player.

Well that works great in OO, but how to model that to a relational DB?
Obviously putting all the extra stats for a Pitcher in the Player table
would fail the test for 2NF.  So how would you lay it out?  I'm debating
having a table for Positions that just has an identity(the primary key)
and a position name.  The Player table would then have a foreign key
constraint that has to match one of the keys in the Positions table.  That
way, if the Position for a player was ever "pitcher", then I know there
should be a corresponding entry in the Pitcher table that lists the extra
data.

But this just doesn't feel clean to me.  Any suggestions or links/books
anyone can point me to?

Reply via email to