loading...
Cover image for To use or not to use a database

To use or not to use a database

ari_o profile image Arika O ・1 min read

Recently I started building a website to showcase some of the illustrations I make in my free time. Because I don't know much about back-end, I thought it would be a good time to take some SQL classes, the final step being to connect my website to a MySQL database. While the learning process has been fun and rewarding, I couldn't stop asking myself: does my website really need a database?

The code was already pretty bloated because I decided to use React so I can practice concepts I wasn't very familiar with, so I had the feeling that adding MySQL to the mix would be too much.

A good rule of thumb is that if the website you're building is working with large sets of data that need to be stored and retrieved at a later point, a database makes sense. A good example for this would be a site that uses e-commerce heavily, one which stores the user's login details or one with dynamic content, that changes daily. And these are only a few use cases.

A database is not necessary for building a fully functional website and since my personal site was basically a portfolio, I only needed to store only a few images and some text. The database wasn't really justified so I gave up on the idea of integrating one in my project.

Until my website will contain enough information to store on a server, my SQL learning journey continues and hopefully I'll start writing about it right here.

Discussion

pic
Editor guide