Database design seems to take a much lower priority on a system architecture than it used to, and I can understand why…
These are my rather generalised stakeholder categorisations based on personal industry experience;
Customers are not interested in the boring table schema demo or SQL scripts in Agile projects, and who can blame them, why would they be when there is a flashy UI to look at when it come round to sprint reviews?
Project managers are not interested as it is not a demonstrable feature. How far does the statement ‘ we have developed a fully normalised and performance tuned database for you’ really go with a customer. The customer generally wants a fully functional system that looks good that they can show their manager. Main interest factors are cost and time overruns.
UI developers refer to it as a repository and don’t care what it looks like, as far as they are concerned it can be a stack of XML files. In actual fact, these days they only care about the service layer as the database is abstracted from their layer.
Service layer developers are generally happy if they don’t have to join one table to another table. So completely de-normalised tables can be quite common when developed by WCF developers. In fact if tables are completely de-normalised they rarely need to address joining tables or addressing foreign keys.
The only parties actually interested in a good database design are the database developer as they realise that they can write SQL that really performs, and the DBA as they can see the benefits of a scaleable system that is unlikely to bloat over time.
One thing we’ve noticed is that with all the layers involved in even medium-sized systems these days, most developers tend to specialise in either one or two of the layers. It’s tricky to find a SQL developer/DBA with good UI knowledge and vice versa. Most people pick the closest tier to their speciality and learn a little bit more about how it interacts with their own tier. This makes them more marketable and allows them to fully specialise with their own technology.
I’ve interviewed a lot of candidates over the last decade and there is a definite shift away from the data layer. I can see why…
- Good database architecture can be complex.
- Experience counts when normalising a database correctly.
- Understanding set theory is a must for good SQL.
- SQL itself is a fairly large language these days.
- UI work is much, much sexier !
We aren’t the only ones to have noticed this shift. Software Tools are starting to come out to address the lack of knowledge. Entity framework now has the option to ‘code first’ and generate a database layer from the service layer.
Whilst it’s great that there are tools and support out there for the lonely UI developer struggling to create a demo, and has little database knowledge. I get very disappointed about the number of these prototype systems which make it into production and are left for the DBA to sort out when performance starts to suck. It brings back memories of little MS Access database systems that got upgraded to SQL Server and shoved into a full business use. They generally grew and grew, degraded and degraded to the point of complete failure.
So what’s the answer? I wish I knew.
There is an excellent and diverse SQL Community out there willing to pass on knowledge; PASS, SQLBits, SQLServerCentral, SQLServerClub, and I still only look for recruits that have some decent database skills in their portfolio. I firmly believe that a database is the most important foundation in a system architecture.
But perhaps part of the problem is that creating a good data layer is that it is time consuming and can be costly when done correctly. If we can all find ways of building standards and perhaps abstracting the table design changes using template stored procedures then we may at least get the Service Layer guys more interested!
Until then spare a thought for where the application is going to end up. Don’t throw your ‘code first’ database at your Production DBA and run, try spending some time up front talking to them and actually try to design a database first. You will be much more marketable in future, although probably a lot less interesting to the rest of the project team…!