Monday, July 7, 2008

How many databases do you need?

When been asked, how many databases do you have in your system? One, is it enough?
“Well, my system is small, one should be enough…”

Yeah, I use to think like that too. But not after I encounter this issue in my ex-company, I totally understand how important a good design can help is some critical situation.

But what I mean by good database design? Well you should throw all those ‘table design’, ‘normalize’, and ‘relational table’ things behind first. We just touch the basic, but it’s critical to your application.

For a simple application, you won’t run away from an Application module which interact with the users and a Report module that generates all the report.













One significant problem that countered in this design is, it took minutes for a page to load a report. Of course you won’t see this symptom in the beginning. But after the program runs for some time, enough records populated in the database, then that is when your nightmare begins. (lol)

So what alternative we have here?

Although it makes your application looks sophisticated, but it has its value.
  • Then application performance will not be affected by the report extraction.
  • Reports are extracted by an engine, which should be scheduled to do so accordingly.
  • The extracted report will be saved in another database. Displaying of the report is basically a simple database query. (very fast)
Logically, this design will run longer than the previous one. Next time an IT consultant proposing a system to you, ask for how the put their database. :)
Good to know.

No comments: