Seriously, Your Website Doesn't Need MySQL To Run

While definitely they are the popular choice for developing websites, full-blown Relational Database Management Systems like MySQL or PostgreSQL can be an overkill for relatively small websites.

There is a common view amongst local web designers & web developers that, by default, a site's data should be saved in a full-blown Relational Database Management System like MySQL or PostgreSQL. I am deliberately ignoring simple HTML pages for this post. Perhaps, because WordPress & Joomla are the go-to choices of CMS for most. But is MySQL the only storage option best suited for every website? Not at all. Let's see the factors that make a fully blown RDBMS an overkill for your little website:

  1. Database Server requirements. Ever seen a WordPress site kick up a "Could not connect to database" error? That is when the database server is down or non-existent. With a full RDBMS there is usually a database server separate from the application's server. If the server goes down your MySQL-backed website won't work. Sorry.
  2. No need for concurrency in information updates. Seriously, your site like most online has only one to a few editors/admins who actually update the content. Most traffic that hits your site is from visitors who are reading your content. In such a situation - a situation where the number of updates are few in comparison to the number of reads - a full RDBMS is an overkill.
  3. Big Data anyone? Your site won't handle even a terabyte of data in its entire lifetime. Just admit it.

So what should you use if you do not want to handle all this complexity? Not files since you do not want to push around files or run fopen() operations everytime. Enter SQLite. SQLite can offer all the advantages plus much more. And it is faster than normal fopen() file operations. SQLite saves everything in a database file. All it's operations follow SQL standards - SQL queries and all. Everything is so darn simple with it. No need to worry about database downtimes or latency problems through the network.

However, if your site will handle many concurrent users updating the site, is a high traffic site, or you foresee hitting greater than 140TB of data in the near future, or one where you want to separate the database from your application's server then SQLite is not for you.


Written by twinspark on Wednesday November 14, 2018

Permalink - Entry Category: web development

« How To Get A Good Web Design That You Are Proud Of - Clients From Hell: It's No Good Invalidating Some of the Users' Stories »

Don't have a website?
There is no bad time to get one