Re: Searching OO Associations with RDBMS Persistence Models



On 2006-05-29 03:05:04 -0500, "Alfredo Novoa" <alfredo_novoa@xxxxxxxxxxx> said:


Robert Martin ha escrito:

Ridiculous. OO and RDB coexist very nicely together. I've never heard
anyone suggest that searches aren't needed.

Relational databases have nothing to do with searches. This shows
profound ignorance about data management theory.

The big problem with OO and RDB is that people try to make them
represent each other. RDB is about data structure an OO is about
behavior structure.

No no no! RDB is about data management and OO is about application
programming.

That's what I said. This shows profound ignorance of Thesauri.

The DBMS must enforce all the business rules (data behavior). The OO
applications must enforce the presentation and communication behavior.

Nahhh. The DBMS must store the data, manage the queries, and enforce some integrity rules. Business rules are in the domain of the application. We don't want the business rules being done by the database. What if we replace the database vendor? Must we rewrite all the business rules?

The objects in the OO program should MANIPULATE the
data structures from the RDB.

Very wrong. The OO program should TRANSFORM the user input in orders
for the DBMS.

The OO program is an interface between the users and the DBMS. A
friendly substitute for the DBMS console.

No, a DBMS is a bucket of bits with some low level rules to manage those bits. An OO application provides the beavior that the customer wants to see. We can completely eliminate the DBMS and replace it with another of an entirely different form (non Relational for example) and still have all the business behavior we need.

The people who sell databases have sold you, and the industry, a misconception: that the database is the heart of the system. This is flawed. The heart of the system is the application code. The database is a detail to be decided at the last possible moment and kept in a position so flexible that it can be swapped out for another at a whim.


--
Robert C. Martin (Uncle Bob)  | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc.            | blog:  www.butunclebob.com
The Agile Transition Experts  | web:   www.objectmentor.com
800-338-6716                  |



.



Relevant Pages

  • Re: Data Layer architecture
    ... >>database theory are rather old, say, the 80-ies. ... A distributed DBMS might have parts located in the PCs, ... > foolish to implement the business rules in the applications. ... >>> Server is only an special kind of distributed system. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Data Layer architecture
    ... >database theory are rather old, say, the 80-ies. ... A distributed DBMS might have parts located in the PCs, ... I readed several books about business rules and all of then say the ... >> Server is only an special kind of distributed system. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: SQL
    ... The enforcement of business rules could happen in another ... user interface to the low-level code that talks to the database, ... >>other business rules, than the DBMS. ...
    (comp.object)
  • Re: Data Layer architecture
    ... >> learn that relational theory, e.g. the schema setup in your DBMS, is ... >> not a theory which states anything about business rules. ... Any DBMS must be able to enforce any business rule. ... there's more about a database than the relational model. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CBO influences
    ... > databases from 8i to 9i, and so have several copies of this database ... > generating an access plan that featured several hash joins, ... Initialization parms idendtical, data structure and volume ...
    (comp.databases.oracle.server)