User loginNavigation |
Database Abstraction Layers and Programming Languages
From time to time I like to return to the issue of database integration, only to once again remark that the difficulty in creating good database APIs (as opposed to simply embedding SQL) is the result of the poor programming facilities provided by most programming languages (e.g., no macros for syntax extension, no continuation or first class functions to handle control flow etc.).
Why return to this topic today? Jeremy Zawodny aruges on his blog that Database Abstraction Layers Must Die! Along the way he says,
Adding another layer increases complexity, degrades performance, and generally doesn't really improve things. Ouch! Why do we need an abstraction layer anyway?
The author uses an argument I hear all the time: If you use a good abstraction layer, it'll be easy to move from $this_database to $other_database down the road. Double ouch, but true enough. Databases are like women (can't live with them, can't live without), and getting rid of one can be as painful as divorce... So what's the solution? Surprise, surprise: use a libary. But isn't that an abstraction layer? Of course it is. What Jeremy advocates is plain old software engineering and design. Everyone should do it. I can't beleive anyone does anything else. But wait. I just told you it's hard to build such a library, since programming languages makes the design of such libraries hard (e.g., should you use iterators, cursors or return record buffers? should your library database access routine be as flexible as a select statement?) So we design libaries that aren't very good, but hopefully are good enough. And that's the question I put before you. We all know about coupling and cohesion. We all know about building software abstractions. Are our tools for building abstractions powerful enough for this basic and standard abstraction: the database access abstraction layer? |
Browse archives
Active forum topics |
Recent comments
23 weeks 2 days ago
23 weeks 2 days ago
23 weeks 2 days ago
45 weeks 3 days ago
49 weeks 5 days ago
51 weeks 3 days ago
51 weeks 3 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago