


Thick Database, Database-Centric…different words, same concept: leverage the power and performance of your database.
Over the past 20 years, I have seen a disturbing trend of organizations marginalizing the role of the database. It is quite surprising to see organizations spend 6 figures (or more depending on their size) on Oracle database licenses and then reduce it to a mere data repository. I’ve seen implementations that utilize only 5-10 percent of the capabilities provided by arguably the world’s best database. Why is this happening?
It all started in the mid-90s with a concept called ‘database independence’. There were a few reasons for this strange paradigm shift, but my favorite is that a database vendor wanted to get into an organization that was already using a competing database: “Don’t become dependent on that database, so I can sell you a license for our database”. Additional reasons included the high cost of database licenses (at that time) and COTS vendors wanting to write generic apps that could work with any database (to serve the COTS vendors' needs, not your needs).
To this day, I have never seen an organization decide to just switch out an Oracle database to some other vendor database. So why is this “database independence” still being perpetuated today? It's simple. Middle-tier developers have gotten used to not leveraging the database. The middle-tier SQL statements have been written generically (i.e. not efficiently) so that they can be sent to any database (but we’ve already established that they don’t really just pick up the system and switch to another database). So now this is just a bad habit (though some may call it technical laziness).
Today, we are seeing a reversal of the "database independence" trend. More commercially available database-centric products are on the market. Developers are now embracing the database. The database is not just for storing data, but also for processing business rules,and even better for rendering incredible user interfaces. Yes, I’m talking about serving up User Interfaces (UI) from the database. And I’m not talking about basic, simple HTML forms. I’m talking about advanced Web 2.0 applications(interactive, dynamic web applications utilizing JavaScript, AJAX, etc).
As noted by Dr Paul Dorsey, in his “database independence” article from July 2007:
There are two key features involved in "thick database thinking":
He goes on to state that “thick database” does not mean just dumping all the code in the database. Dr Dorsey provides the following example:
“For example, using a tool like Oracle’s Application Express that is itself stored in the database and generates HTML pages from the database is NOT an example of the thick database approach. The idea is that creating a thick database makes your application UI technology-independent. If most of your logic is implemented in database objects, changing from one UI architecture to another becomes much easier.”
He has several reasons that explain the advantages of the thick database approach, but what is key here is how you build out your full application rendering in the database. It requires a very well planned out architecture inside the database using specific packages for handling the UI, and other packages for handling the DML. A clearly defined structure allows for the UI code to easily be updated every time an exciting, new browser scripting language becomes available. And when done properly, it just requires dropping in the new UI code without changing any of the application logic or data processing code.
This lets you focus on the most stable piece of technology in the enterprise, the Oracle database, while providing flexibility to adopt and adapt to new UI technologies. Now go employ a “Thick Database” approach to marginalize the UI rather than the more important database.
Occam’s razor, attributed to the 14th-century English logician and Franciscan friar,William of Ockham (ca. 1285-1349), is the principle that "entities should not be multiplied unnecessarily".
The principle is often expressed in Latin as: entia non sunt multiplicanda praeter necessitatem and translates to: entities should not be multiplied beyond necessity.
Frequently used in science, it has inspired a variety of expressions including "parsimony of postulates", the"principle of simplicity", and my favorite, the "KISS principle" (Keep It Simple, Stupid).
In an increasingly complex world, we all have the tendency to over-analyze things, especially when trying to understand particular events, activities, or happenings. Unfortunately, as you might expect, excessive analysis can lead to less-than-perfect results. Occam’s Razor is always at the back of my mind because it reminds me that often we need to simplify our thinking. The simpler the explanation, the better.
A good example of Occam’s Razor at work is the design of Rich Web Apps. Just yesterday, I interviewed a software engineer candidate to help develop a Rich Web App. When interviewing candidates, I want to understand their own unique background and how they think about solutions, so I always ask the candidate to describe the system he/she is currently building/maintaining. Here is the system as this particular candidate described it:
· Unix server #1 running iPlanet for web server
· Unix server #2 running WebLogic for app tier and WebLogic integration tier
· Unix server #3 running Oracle database
Including the web browser, this makes it a 5-tier system! Web browser -> iPlanet -> WebLogic app -> WebLogic integration module-> Oracle database
I mentioned that the system seemed a bit "over-architected"and asked if it was designed this way to overcome some sort of performance issue and he just smiled and said some queries can take up to 20 seconds. 20 SECONDS! That is unacceptable. I asked how he would go about tuning the system to get it down to sub-1 second response. He said that wasn't possible because they have over 10 million records in the database.
I found that odd because we've implemented a TURBO Enterprise solution installed in an Oracle database that contained over 260 million records and was the backbone of our customer segmentation and marketing intelligence application. Our system featured far fewer tiers resulting in amazingly fast response times: Web browser -> Oracle HTTP Server -> Oracle database running TURBO Enterprise. Our client would have kicked us out if we delivered a solution that took20 seconds to return results.
So getting back to the point of Occam's Razor. Choose the simpler implementation. Embrace "Technology Efficiency" to deliver streamlined architectures with amazingly fast response times, rather than over-architected systems that seem geared more toward feeding an engineer's curiosity for trying a bunch of technologies instead of meeting the user's needs.
Needless to say, this candidate did not get the job…