[development] Extend database abstraction layer, to includetablecreation.

Pat Collins pat at linuxcolumbus.com
Sat May 13 20:27:39 UTC 2006


On Sat, 13 May 2006 13:06:53 -0400, "Khalid B" <kb at 2bits.com> wrote :


> For an alternate view on abstraction (that I do not fully support mind
> you, I think abstraction has merits), read Jeremy Zawodny's Database
> Abstraction Layers Must Die.
> 
> http://jeremy.zawodny.com/blog/archives/002194.html
> 
> His main points are:
> 
> 1. With abstraction layers, performance cannot be gained.
> 

If done right performance can be better.  


> 2. Changing databases is never easy for a large site.
> 

Changing databases can be trivial if the abstraction layer is designed to
take that into account.  

Things you must consider when designing a database abstraction layer:

1. Not all databases are equal.  

2 .You don't want to generalize so much that you can't use the powerful
features of a particular database.

3. Code generated SQL is limiting and error prone.

Personally, the only data abstraction I would like to see would be a way to
store optimized sql for a particular database vendor (or a generic default
statement), a way to address which sql statement you want to use, and a
function (or functions) to return either a cursor to iterate over, an array,
a single value, and error handling.

Pat


More information about the development mailing list