[thelist] DB Schema Design
Hassan Schroeder
hassan at webtuitive.com
Mon May 8 09:27:34 CDT 2006
Will Davidson wrote:
> On the contrary, this is very easy to maintain ... each function will be
> defined as roughly the same database query (might as well reuse code) with a
> different variable based on the function call, see the below example in
> php.
blech. OK, I realize the original question posited a PHP context,
so, well, whatever. :-)
In an OOP context, though, methods ("functions") don't exist in a
vacuum -- they belong to objects.
So Customer.getStatus() and Product.getStatus() would be entirely
different unless Customer and Product either had a super/subclass
relationship, or both extended another object with a getStatus()
method.
Regardless, mixing attributes of different "things" in one table,
simply because they have a common name, just feels wrong to me.
YMMV!
--
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com
opinion: webtuitive.blogspot.com
dream. code.
More information about the thelist
mailing list