Re: Relational-to-OOP Tax



Just for example, nearly nobody doing text
mining work uses relational databases

Many SQL vendors has text mining features. Oracle Text for example.

(or SQL databases -- which aren't
the same thing).

Indeed true.

Nearly everybody who works in this area attempts to use
a SQL database to start with, and switches to something else because
they have little real choice.

Most SQL database are designed for typical "enterprise scenarios".
Other areas like GIS and text mining are supported by many vendors,
but not all. The fact that one might chose a non-SQL database for such
areas is not because the relational model is flawed, but because the
availible DBMS implementations suffers.

SQL supports a fairly general version of basic, structured data, but the
minute you get into less-structured data, it tends to fall apart.

Can you prove this? Or do you have some examples?

As for the assertion that SQL isn't really relational, I'll defer to C.
J. Date: "As I've written elsewhere many times, the biggest problem with
SQL is precisely that it doesn't support the relational model."

Indeed correct. But still SQL is the best availible language. Date's
Tutorial D isn't availible in production databases.

Getting back to the original claim that relationalism is all that's
needed,

The origninal claim is that relations are the only data structure
needed. Classes is useful for other things like data types.

Date and Darwen addressed this quite thoroughly in: _Foundation
for Object/Relational Databases: The Third Manifesto_. Date summarizes
the relationship quite succinctly: "As Hugh Darwen and I have shown in
The Third Manifesto,2 object functionality and the relational model are
completely orthogonal to one another." He goes on to quote from the
third manifesto: "The relational model needs no extension, no
correction, no subsumption, and above all no perversion, in order [to
support object functionality]." All that's needed is to support
relational domains properly (which SQL never did)..."

If you would have continued to read you would have found that they
also states that classes should never be mapped to tables, only to
domains (datatypes). (Se http://www.dcs.warwick.ac.uk/~hugh/TTM/TTM-TheAskewWall-printable.pdf,
p 52-61, if you need a shorter version).
"We cann't accept the equation object class = relation" and
"object class = domain"

Date states that relations and objects are orthogonal, that means that
they should not be used for the same thing. If you already have the
data in a relational way, there are no need to transform it into a
network graph.

The relational model needs classes, but not as data structures. But
for defining dates, social security number, etc, they are very useful.

My recommendation for both of them would be to read _Database in Depth:
Relational Theory for Practitioners_ (by C.J. Date, 2005, published by
O'Reilly). Of course, they should also read the Third Manifesto, but
based on their writing, they need to do some other reading first.

Although I have only read parts of the book, I would recommend you to
read it too. When you would understand why O/R mapping is such stupid
thing to do.

/Fredrik

.



Relevant Pages

  • Re: SQL
    ... >The relational model, and SQL, were developed specifically for persistent ... Wrong, the Relational model was created for databases, persistent or ... Indeed, its purpose is data management, any data management. ...
    (comp.object)
  • Re: Common Lisp, SQL, NIL and null
    ... Non normalized databases are a necessary evil. ... SQL doesn't implement the relational model - it was simply inspired by ... SQL implements a bastard hybrid of relational set algebra, ...
    (comp.lang.lisp)
  • Re: Object/Relational Mapping is the Vietnam of Computer Sci
    ... interface defined by SQl. ... Databases come from a formalization of the need to store ... the data in the same way that the programs which manipulate the data ... you have the Relational Model of Data -- ...
    (comp.lang.ruby)
  • Re: Possible bridges between OO programming proponents and relational model
    ... often presented as being a differentiation of relational model where no ... [I added comp.object since we're talking about bridging and OOP]. ... "Intro to databases" definitions, they'll get a shock when they see ... ADT's in SQL 3. ...
    (comp.databases.theory)
  • Re: Databinding - Best Practice (object-oriented)
    ... >>relational model throughout your application severely restricts the ... The Relational Model is not SQL. ... difficult to persuade developers to ditch the database independance this ... What SQL domains should be but they are not. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)