Articles
49 articles covering Node.js, JavaScript, backend development, and more.
Aggregate Functions in SQL
So far we've learned how to get individual rows from a table. But sometimes you don't want individual rows — you want a **summary** of the data. Like "how many Read more
Foreign Keys and Referential Integrity
In a previous post we learned about JOINs — how to combine data from two tables using a common column. But there's a problem: nothing stops you from creating "orphan" Read more
Understanding JOINs
In the previous post we learned how to store, read, update, and delete data from a single table. But in real applications, data is usually spread across multiple tables. In Read more
Removing Duplicates with DISTINCT
Sometimes when you query a database, you get duplicate values in the results. For example, if you want to see all the cities where your users live, the same city Read more
Sorting and Limiting Results
So far when we've used `SELECT`, the results come back in whatever order the database decides. But often you want results in a specific order — like showing posts from Read more
Filtering with IN and BETWEEN
In the first post we learned how to filter data using `WHERE` with simple conditions like `=` or `>`. But sometimes you need to check against a list of values Read more
Working with NULL Values
In SQL, **NULL** means "no value" or "unknown". It's not the same as zero or an empty string — it literally means the data is missing. Understanding how to work Read more
Introduction to Databases
At some point we need to store the data to some place - that place is a database. In this post we will go through basics of what databases are Read more
Database in NodeJS
Now that we know the basics of SQL we can actually use it in our existing project. ### Preparation ### Parts of an SQL database When working with SQL, it Read more
API routes naming conventions
Now its time to talk about REST API routes naming convention. People usually get lost on how to name their routes especially when multiple models are in play for the Read more