How to learn SQL and use a Database?

How to learn SQL and use a Database?

Oct 23, 2024

In my previous post, I was setting up a Postgresql database on a Fedora server. Colleague wants to learn how to write SQL statements and DB queries. I've learnt how to write SQL statements through college but found an interesting resource online that makes the learning a lot easier.

First, learn how to SQL with SQLBolt.com

SQLBolt is an amazing resource that gives you bite size learning bits with an interactive session to writing SQL statements in each lesson.

Next, spin up your own Database Instance

This can be any database but pick the one the is the easiest to set up. Sqlite is usually the easiest. But its much more preferred to set up the database in your own way and in your own project.

For example, use Python's sqlite3

Python has a built-in sqlite library that enables you to create the database file easily and shows how to connect and execute queries to it.

Or another example, use 🐳 Docker Database with preconfigured and filled in data

image

Like Pagila in my previous post, the README section shows that you can easily and quickly set up a Postgresql instance and fill it up with random tables and data for you to play around with.

Last but not least...

Practice, practice and practice some more

Can't get good if you don't practice.

image

And that can be done via pgAdmin or just run psql commands directly from terminal.

All the best!

Enjoy this post?

Buy Qoyyuum a coffee

More from Qoyyuum