How to reinstall MySQL on MacOS ARM M1 (and not only)

Category: SQL :: Published at: 09.12.2024

If you have any issue with MySQL and you want to completely reinstall it on your machine.

This is a quick guide, how to do it:

Read more

The role of foreign keys in SQL database

Category: SQL :: Published at: 31.05.2023

5 rules, why we use Foreign Keys in our databases:

 

  1. Relationships establishment - we can create relations between tables, and even inner join relation within one table between two records
  2. Data Integrity - for example, you can create an order with client_id for client which does not exist in the database
  3. Data consistency and accuracy - when foreign key is defined, it restricts the values that can be inserted or updated in the referencing column
  4. Data querying - thanks to the foreign keys we can retrieve data from multiple tables faster and easier
  5. Data maintenance - it helps cascading updates and deletions, preventing locks mechanisms

How to download sql dump and import it into pg database on local env

Category: SQL :: Published at: 23.02.2023

This is the simple instruction on how to download the dump file with sql database and import it to the local postgreqsql database

Read more

How SQL Indexes work

Category: SQL :: Published at: 03.07.2022

In this article you will get the knowledge about very important function inside SQL databases.

We will talk about indexes.

Read more

How to add psql database and assign user

Category: SQL :: Published at: 27.05.2022

Here you can find quick tips, how to create a database in postgresql + you will also get the knowledge
about assigning user to the created database.

Read more

Conditional Statements in SQL - CASE, COALESCE, CAST

Category: SQL :: Published at: 31.12.2021

In this article you will get the knowledge about different conditional statements which are appearing in SQL language.

You will know how to execute SQL query only when some conditions are met.

Read more