Blog: https://meetgor.com
Newsletter: https://techstructively.substack.com/
If you are interested in software development then let's connect
I usually work with the backend side of things, I really love to play with databases, APIs and CLIs.
Expect content around python🐍 and golang🐭
I use Neovim BTW
Pretty good. It takes some iterations, some conscious reading and knowing the actual problems to solve.
Maybe AI coding is a skill, it gets better over time
Pretty good. It takes some iterations, some conscious reading and knowing the actual problems to solve.
Maybe AI coding is a skill, it gets better over time
We saw the basic example of www.meetgor.com/sqlog/sqlite... Relation in the second last post from this, there we just focused on the concept of the relation and not so much on the structure of the junction table.
Let's take a look at the schema again:
We saw the basic example of www.meetgor.com/sqlog/sqlite... Relation in the second last post from this, there we just focused on the concept of the relation and not so much on the structure of the junction table.
Let's take a look at the schema again:
Learning more SQL, some go and python.
Trying to replace doomscroll with reading article and books
www.meetgor.com/newsletter/t...
Learning more SQL, some go and python.
Trying to replace doomscroll with reading article and books
www.meetgor.com/newsletter/t...
I might missed this basic relationship model as I haven't really found it quite commonly used, but its still used in very specific examples.
That one relationship is one-to-one. As the name suggests, it maps one row to exactly one row.
I might missed this basic relationship model as I haven't really found it quite commonly used, but its still used in very specific examples.
That one relationship is one-to-one. As the name suggests, it maps one row to exactly one row.
We have seen www.meetgor.com/sqlog/sqlite... relationship and also the www.meetgor.com/sqlog/sqlite... relationship.
Let's extend it with many-to-many relationship. Here one row can refer to many other rows, but that other row can also be referred by multiple rows.
We have seen www.meetgor.com/sqlog/sqlite... relationship and also the www.meetgor.com/sqlog/sqlite... relationship.
Let's extend it with many-to-many relationship. Here one row can refer to many other rows, but that other row can also be referred by multiple rows.
In the last post, we had defined a one-to-many relation between the users table and the posts table.
Now, let's create a single table where we can define a one-to-many relationship.
In the last post, we had defined a one-to-many relation between the users table and the posts table.
Now, let's create a single table where we can define a one-to-many relationship.
I know it is a profound piece of technology but it will hurt humans in the longer run, brain rot, artless life.
I know it is a profound piece of technology but it will hurt humans in the longer run, brain rot, artless life.
Back to the question that we raised in the www.meetgor.com/sqlog/sqlite... post, "What would happen if there are more than one row in the primary table that references the same id in the foreign table?"
Back to the question that we raised in the www.meetgor.com/sqlog/sqlite... post, "What would happen if there are more than one row in the primary table that references the same id in the foreign table?"
Back to the question that we raised in the www.meetgor.com/sqlog/sqlite... post, "What would happen if there are more than one row in the primary table that references the same id in the foreign table?"
Back to the question that we raised in the www.meetgor.com/sqlog/sqlite... post, "What would happen if there are more than one row in the primary table that references the same id in the foreign table?"
Postgres added generated columns with virtual and as default in v18 (to be released September 2025)
There is still a lot to learn in SQL and adoption is still going on, even in the most used databases
Postgres added generated columns with virtual and as default in v18 (to be released September 2025)
There is still a lot to learn in SQL and adoption is still going on, even in the most used databases
Foreign Keys are the fundamentals of any relational databases, as they are the ones that make the connection or the relations among the tables in our database system.
Foreign Keys are the fundamentals of any relational databases, as they are the ones that make the connection or the relations among the tables in our database system.
The PRIMARY KEY constraint is not actually a column constraint, it is a table constraint. But in this section, we'll only learn about how to handle single column-level PRIMARY KEY.
The PRIMARY KEY constraint is not actually a column constraint, it is a table constraint. But in this section, we'll only learn about how to handle single column-level PRIMARY KEY.
sqlite.org/lang_createt...
This is a column constraint that allows us to define certain conditions that we want to evaluate before inserting the column for the row and populate it accordingly. In this post, we will check, what and when used.
sqlite.org/lang_createt...
This is a column constraint that allows us to define certain conditions that we want to evaluate before inserting the column for the row and populate it accordingly. In this post, we will check, what and when used.
The DEFAULT constraint in SQLite is used to specify a default value for a column, if not provided, then the column will be populated with the NULL value as the default value.
According to the docs:
The DEFAULT constraint in SQLite is used to specify a default value for a column, if not provided, then the column will be populated with the NULL value as the default value.
According to the docs:
The UNIQUE constraint ensures that a column in a table contains no duplicate values. Like, if you add an UNIQUE constraint to a column, then no two rows can have the exact/same value for that column.
The documentation is more nuanced.
The UNIQUE constraint ensures that a column in a table contains no duplicate values. Like, if you add an UNIQUE constraint to a column, then no two rows can have the exact/same value for that column.
The documentation is more nuanced.
What is NULL?
In SQLite, specifically, a NULL is a value indicating that a value is not known or just not there.
What is NULL?
In SQLite, specifically, a NULL is a value indicating that a value is not known or just not there.
We have seen the table creation with column types, we now need to look into the constraints or limitations that we can add to those columns, in order to make the data-model more robust and add some basic validations before doing any updation
We have seen the table creation with column types, we now need to look into the constraints or limitations that we can add to those columns, in order to make the data-model more robust and add some basic validations before doing any updation
The CREATE TABLE as the name suggest will create a table in a sqlite database. What is a table?
> set of relations
The CREATE TABLE as the name suggest will create a table in a sqlite database. What is a table?
> set of relations
.headers on
.header on
.headers on
.header on