tags:

views:

208

answers:

6

Modern Databases systems today come with loads of feature. And you would agree with me that to learn one database you must unlearn the concepts you learned in another database. For e.g. each database would implement locking differently than other. So to carry the concepts of one database to another would be a recipe for failure. And there could be other examples where two database would perform very very differently.

So while developing the database driven systems should the programmers need to know the database in detail so that they code for performance? I don't think it would be appropriate to have the DBA called for performance later as his job is to only maintain the database and help out the developer in case of emergency but not on a regular basis.

What do you think should be the extent the developer needs to gain an insight into the database?

Thanks.

+1  A: 

I think a developer should have a fairly good grasp of how their database system works, not matter which one it is. When making design and architecture decisions, they need to understand the possible implications when it comes to the database.

bcwood
+2  A: 

Personally, I think you should know how databases work as well as the relational model and the rhetoric behind it, including all forms of normalization (even though I rarely see a need to go beyond third normal form). The core concepts of the relational model do not change from relational database to relational database - implementation may, but so what?

Developers that don't understand the rationale behind database normalization, indexes, etc. are going to suffer if they ever work on a non-trivial project.

Jason Bunting
+2  A: 

I think it really depends on your job. If you are a developer in a large company with dedicated DBAs then maybe you don't need to know much, but if you are in a small company then it may be really helpful knowing more about databases. In small companies you may wear more than one hat.

It cannot hurt to know more in any situation.

Rob Bazinet
+1  A: 

If you are uncertain about how to best access the database you should be using tried and tested solutions like the application blocks from Microsoft - http://msdn.microsoft.com/en-us/library/cc309504.aspx. They can also prove helpful to you by examining how that code is implemented.

Christian Hagelid
+5  A: 

I think these are the most important things (from most important to least, IMO):

  • SQL (obviously) - It helps to know how to at least do basic queries, aggregates (sum(), etc), and inner joins
  • Normalization - DB design skills are an major requirement
  • Locking Model/MVCC - Its nice to have at least a basic grasp of how your databases manage row locking (or use MVCC to accomplish similar goals with optimistic locking)
  • ACID compliance, Txns - Please know how these work and interact
  • Indexing - While I don't think that you need to be an expert in tablespaces, placing data on separate drives for optimal performance, and other minutiae, it does help to have a high level knowledge of how index scans work vs. tablescans. It also helps to be able to read a query plan and understand why it might be choosing one over the other.
  • Basic Tools - You'll probably find yourself wanting to copy production data to a test environment at some point, so knowing the basics of how to restore/backup your database will be important.

Fortunately, there are some great FOSS and free commercial databases out there today that can be used to learn quite a bit about db fundamentals.

jsight
+2  A: 

It certainly can't hurt to be familiar with relational database theory, and have a good working knowledge of the standard SQL syntax, as well as knowing what stored procedures, triggers, views, and indexes are. Obviously it's not terribly important to learn the database-specific extensions to SQL (T-SQL, PL/SQL, etc) until you start working with that database.

I think it's important to have a basic understand of databses when developing database applications just like it's important to have an understanding of the hardware your your software runs on. You don't have to be an expert, but you shouldn't be totally ignorant of anything your software interacts with.

That said, you probably shouldn't need to do much SQL as an application developer. Most of the interaction with the database should be done through stored procedures developed by the DBA, I'm not a big fan of including SQL code in your application code. If your queries are in stored procedures, then the DBA can change the implementation of the stored procedure, or even the database schema, and so long as the result is the same it doesn't require any changes to your application code.

jrdn