> So I'm curious, what do you much more experienced DB guys do
> in such a case? Solve it with a stored procedure? Use a boolean
> field in the Person table for "all food eaters"? Or is there
> an actual way to model this with a field in the PersonFood table?

I would argue that this problem falls outside the boundary of relational
database design for the most part, and instead falls within business logic.
To the best of my knowledge, there's no correct answer to this specific to
database design. In similar cases, I've simply added the Boolean field to
the primary table as you described, and relied on other logic within stored
procedures or application code to deal with keeping the intersection table
updated as appropriate.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to