On 3/31/07, Rick DeNatale <rick.denatale / gmail.com> wrote:
> On 3/31/07, Clifford Heath <no / spam.please.net> wrote:
>> Yes. Relations are the right way to store data, objects are the right
>> way to manipulate them, but facts are the right way to conceive of
>> them, and hence to query them. Both ER and OO schemata are
>> absorptions of fact-based schemata to suit the physical
>> characteristics of disk storage and RAM storage/allocation
>> respectively. IOW they're both derived, to some extent contrived, for
>> different purposes. Neither can ever be the "one true way".
> And there's a fundamental tension between the driving ideas of a
> database and object oriented programming.

I don't think that there's a fundamental tension, but that's just me.

> Databases come from a philosophy of separating data and it's
> representation from the programs which operate on it. In the case of
> relational databases, that representation is encapsulated behind an
> interface defined by SQl.

This is not correct. Fabian Pascal would have a field day with this
statement. Databases come from a formalization of the need to store
data. Hierarchical databases (and, to a degree, object databases) store
the data in the same way that the programs which manipulate the data
represent the data.

Relational databases come from the realisation that more than one
program needs to work with a given set of data, you don't want to store
more than one copy of any given datum, and there should be a formal way
of modelling such things. Thus, you have the Relational Model of Data --
which, as I have mentioned several times, is a model that represents
tuples, attributes, and relations that can be queried using relational
algebra.

Mr Heath's assertion that ER modelling is about physical storage is
completely incorrect; there *is* a physical layer that can be modelled,
but it is *primarily* about the logical layer, and the physical
characteristics DO NOT MATTER at that logical layer. You continue that
false assertion and add another one, suggesting that SQL databases are
relational databases. They are not. They follow *portions* of the
relational model, but do not completely implement relational algebra and
have followed hype and fashions to incorporate more features of
hierarchical and object data modelts because developers are fickle
creatures who aren't given enough time to really understand most of the
technology that they are required to implement or use by people who
understand even less.

SQL is, at best, an approximation of the relational model and it is
generally a failure at that, because SQL doesn't let you think in
logical terms more often than not.

-austin
-- 
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca