
Postgres -Another ride with an Elephant
Table of Contents
Postgres Docs by Neon
I have been Neon for a quite while now and I am feeling the need to get deeper insights on PG.
So, going the docs and will list out some important things I encounter.
Geospatial database
Really cute isn’t it!
PostgreSQL with the PostGIS extension supports geospatial databases for geographic information systems (GIS).
Database:
Okay so the docs is about to start with a sample database of DVD rental store with:
15 tables
- Table I know, collection of related column
1 trigger
- Triggers docs
7 views
8 functions
1 domain
13 sequences
You can create a local pod in Podman for PG, read here or look for “Create Postgres Pod” around November 30, 2023 blog.
If you have a local pod of PG then you need to upload the .rar file to PGAdmin.
Database has been loaded.
The Index
Here I want first see about Joins
Joins
PostgreSQL join is used to combine columns from one (self-join) or more tables based on the values of the common columns between related tables. The common columns are typically the primary key columns of the first table and the foreign key columns of the second table.
Inner Join
Left Join
In the left join context, the first table is called the left table and the second table is called the right table.
Right Join
Full outer join
The full outer join or full join returns a result set that contains all rows from both left and right tables, with the matching rows from both sides if available.