Tuesday, January 27, 2004

I've been on a real software philosophy kick lately.  Here's more of my thoughts (which are subject to change).

I've spent alot of my time trying to develop methodologies and code to help me write database independent code.  Invariably, I run across problems, some caused by a db with a crappy internal type system (Oracle), some caused by a broken unification model (ADO.net), and others caused by poorly implemented providers.

I ran across a heated discussion on another blog (which I can't find now, or I'd reference it) on whether database independent code should be something to give up on.  After all, even though they compete for business, Oracle was designed for something very different than SqlServer, or MySQL was designed for.  They each have unique features, different SQL syntax, stored procedure concepts, etc that keep there from being a universal API for database access.

So there are two common approaches to take (excluding giving up):

  1. Implement to the lowest common denominator.  Solutions for this exist already.  ODBC, JDBC, OLEDB, all fit this model.
  2. Move the unification layer inside your application, so you are implementing a unified API for your application.  This allows you to focus on the functionality you need and use object oriented techniques and patterns to reduce redundancy and increase maintainability.

I first approached ADO.net as the answer to #1, for which it is woefully inadequate.  I now realize it is an enabler for #2, defining concepts that databases share (which make them databases).  This gives you some commonality between implementations without forcing you to the lowest common denominator like previous attempts.  Besides, most applications are targeted to a specific db anyway and don't benefit from that approach.

ADO.net is not without it problems, but viewing it in that light makes it a much more satisfying tool...for me anyway.

posted on Tuesday, January 27, 2004 2:21:40 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
Related posts:
LinqToStdf now on CodePlex
Image Slicer for Deep Zoom in Silverlight 2
Silverlight limitations and Constrained Callvirt in IL
What are the generic Delegates in the framework for?
What is System.__Canon and why is it on my stack?
Adding support for .ashx-based views in ASP.net MVC
Tracked by:
"diet fastin overnight pill" (diet fastin overnight pill) [Trackback]
"used tractor" (used tractor) [Trackback]
"round folding tables" (round folding tables) [Trackback]
"pc troubleshooting" (pc troubleshooting) [Trackback]
"arkansas state parks" (arkansas state parks) [Trackback]
"Plavix Side Effects Reactions" (Plavix Side Effects Reactions) [Trackback]
"south carolina lottery" (south carolina lottery) [Trackback]
"sunn mixer" (sunn mixer) [Trackback]
"suunto kb 77" (suunto kb 77) [Trackback]
"piattaforma elevatrice" (piattaforma elevatrice) [Trackback]
"soluzione resident evil" (soluzione resident evil) [Trackback]
"chemical safety" (chemical safety) [Trackback]
"foto gallery prof troie" (foto gallery prof troie) [Trackback]
"pine chest of drawers" (pine chest of drawers) [Trackback]
"war pictures" (war pictures) [Trackback]
"deed search" (deed search) [Trackback]
"gean smith oil on canvas" (gean smith oil on canvas) [Trackback]
"antique garden tools" (antique garden tools) [Trackback]
"adhd children repeating a grade" (adhd children repeating a grade) [Trackback]
"paragon luggage" (paragon luggage) [Trackback]
"volo nichelino" (volo nichelino) [Trackback]
"eye candy for after iso download warez" (eye candy for after iso download warez... [Trackback]
"elliott claims group%2C llc" (elliott claims group%2C llc) [Trackback]
"wholesale tanning bed" (wholesale tanning bed) [Trackback]
"Biography Frederick Douglass" (Biography Frederick Douglass) [Trackback]
"adderall no rx" (adderall no rx) [Trackback]
"nitenpyram ingredients" (nitenpyram ingredients) [Trackback]
"back pain remedy" (back pain remedy) [Trackback]
"enterprise ozark community college" (enterprise ozark community college) [Trackback]
"oakland community college" (oakland community college) [Trackback]
"Kit Car Manufacturers" (Kit Car Manufacturers) [Trackback]