Friday 25 January 2013

Databases deserve a bit of respect

I've recently had the pleasure of being on a database administration course in Euston held at Learning tree, which by the way is still my favoured course provider since the quality of the presenters seems pretty high.

Anyway, the reason that I felt I had to make this post is that as a developer I always think about the code, what objects represent what aspects of the domain I am solving a problem for. I think about system performance, ease of maintenance, how readable the code is e.t.c. however since I almost always use an object relational framework of some kind not only am I mostly shielded from the way in which queries are constructed but I am almost totally separated from the actual fundamentals of the database itself.

One thing that a lot of care used to be given to was the design of a database, but now with very fast machines hard drives and all that stuff we can pretty much get away with slapping a load of tables together and let the database server handle it, and for the most part it does this very well and only in fringe cases does it require special attention but I think we/I should get back to basics from time to time and realise that the database behaves ok but could be spectacular thus relieving the rest of the system from quite so many performance enhancements that are there because unbeknown to me the database is underperforming.

The DBA on the course let slip a very simple sentence that interested me "when doing bulk imports in MSSQL Server you can greatly improve performance by switching to bulk_logging." This whole area spawn thoughts about the difference between log files and datafiles and how indexes are created and used and what the difference between an extent and a page is and how fragmentation can occur and be fixed. All these things are simple common sense to someone versed in databases but other than for academic purposes I've never had to look deeper than the surface, so think no is about time I did before I forget it all.

I have a dream, that one day all developers and database administrators will be treated equally.
 
Stack Overflow profile for Richard Johnson at Stack Overflow, Q&A for professional and enthusiast programmers