Databases: Sqlite, MySql or PostgreSql?

Most functional and large websites have databases. At the most basic level, you may use a database to store information (like username and password) about users.

As a web developer, you have plenty of options for databases. Django comes with SqlLite inbuilt, but this will not be powerful enough if your application takes off and your’e dealing with hundreds of thousands of customers. The good news is that as a beginner, you don’t have to worry about the installation of a database to begin with. You can start working with the inbuilt database right away and simply use the python manage.py makemigrations and python manage.py migrate commands to commit the changes you make in the models to the database. The other most popular options, and the ones you are most likely to come across are MySql and PostgreSQL.

The MySQL software delivers a very fast, multi-threaded, multi-user, and robust SQL (Structured Query Language) database server. MySQL Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software.

PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions.

I found this article which provides a nice comparison of all three, with key features, advantages and disadvantages. https://stackshare.io/stackups/mysql-vs-postgresql-vs-sqlite

How to install (say MySql) on your localhost.

Now that you’ve explored the alternatives, you need to know how to actually work with a database on your local host.

Since PHP and MySQL are both server-side languages, you will need a server to practice it.

To make a local host on your computer, you can install either XAMPP or WAMP.

You can download XAMPP here: https://www.apachefriends.org/download.html and another useful tutorial for working with MySql is here: https://www.mysqltutorial.org/install-mysql/

Leave a comment