Friday, March 30, 2007

Use SQLite not MySQL

When thinking of developing a new web site using PHP, it is a no brainer which database management system you will be using. MySQL has become the standard in developing web applications based on open source technologies even in the case of many enterprise Java projects. Some would prefer to use PostgreSQL due to its more complex features, yet MySQL still remains the king and a common denominator in most PHP web applications.

Although I have looked at SQLite with some interest in the past, yet I had never took it seriously as an option when creating a web application. Under "Situations Where SQLite Works Well" at the official SQLite web site, they mention the following:
SQLite usually will work great as the database engine for low to medium traffic websites ... . The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database. Generally speaking, any site that gets fewer than a 100000 hits/day should work fine with SQLite.
Not bad. Not bad at all.

Although such claims should still be verified, yet I just tend to believe them. Now if you are thinking BIG of your next killer web application which will attract millions of users, perhaps even in this case it would not hurt if you start out small at first with SQLite then switch later on to MySQL when you need to scale. As Getting Real suggest, it is better to start with a simple solution and then scale later.