|  | Posted by Mladen Gogala on 06/20/35 11:46 
On Sun, 30 Apr 2006 20:20:33 -0300, Manuel Lemos wrote:
 > None of them provides database independence.
 
 Actually, nothing provides database independence. Database independence is
 a myth. Databases have different locking strategies, deal with connections
 in different ways, optimizers are vastly different and will produce
 different execution plans for the same query, on the same underlying
 physical strategies, some support things like local temporary tables, some
 call them cursors, some have bi-directional cursors, some do not, the
 procedural extensions differ from database to database, as do limitations
 of what you can do with triggers, in some cases readers block writers, in
 others do not, some databases support bitmap indexes, some do not etc,
 etc, etc. The term "relational database" practically means "supports SQL
 as defined in ANSI 92 standard". That's it. Databases are so different
 beasts that there is no way you can write a "database independent
 application". I saw several attempts to do so, by using Java and object
 relational mappers. General characteristics of such an application
 are:
 1) It tries to enforce business rules in the application and tries
 to disregard stored procedures and triggers of the underlying
 database. It's special fun when somebody else develops another
 application using the same data and understands the business rules in
 a different way. Logical corruption follows.
 2) It tries to create its own security mechanism, based on the application
 server and LDAP server. Not only does it duplicate the database
 mechanism, it's much more easily hacked as it is one layer closer to
 firewall then the database.
 3) It resolves concurrency problem by creating "services" which are
 essentially queues which perform certain type of transaction. This,
 usually, creates a bottleneck, so the whole thing is "scaled" by
 distributing the load over several servers. Now, we have deadlock
 problems, which are resolved by creating new "services". The whole
 vicious circle starts anew.
 
 In other words, the only database independent applications that I've ever
 seen suck equally on all underlying database. I do have considerable
 database experience. I am Oracle DBA for 17 years, I have experience with
 CICS DL/I, DEC RDB, PostgresSQL and SQL Server 6.5. Trust me, I've seen
 many amazing things in this world, but I haven't seen such a creature as
 "database independent application". If it exists, it must have been
 written by a Sasqwatch or Nessie, because I haven't seen it so far.
 
 --
 http://www.mgogala.com
  Navigation: [Reply to this message] |