update docs diagrams (#29394)

* update docs diagrams

* remove unused images
This commit is contained in:
Francesco Sansalvadore authored and GitHub committed 2024-09-19 15:51:45 +02:00
1 parent 97a38375f0
commit 73bbbb798d
21 files changed
+48 -6

No files matched your search

@@ -13,7 +13,14 @@ Postgres includes several built-in foreign data wrappers, such as [`postgres_fdw
Wrappers introduce some new terminology and different workflows.
![FDW](/docs/img/database/fdw-light.png)
<Image
alt="Foreign Data Wrappers (FDW)"
zoomable
src={{
dark: '/docs/img/database/foreign-data-wrappers/extracting-data.png',
light: '/docs/img/database/foreign-data-wrappers/extracting-data--light.png',
}}
/>
### Remote servers
@@ -105,7 +112,14 @@ select cron.schedule(
);
```
![FDW](/docs/img/database/fdw-qetl-light.png)
<Image
alt="FDW with pg_cron"
zoomable
src={{
dark: '/docs/img/database/foreign-data-wrappers/extracting-data-pgcron.png',
light: '/docs/img/database/foreign-data-wrappers/extracting-data-pgcron--light.png',
}}
/>
This process can be taxing on your database if you are moving large amounts of data. Often, it's better to use an external tool for batch ETL, such as [Fivetran](https://fivetran.com/) or [Airbyte](https://airbyte.io/).
@@ -69,7 +69,14 @@ Luckily Postgres provides us with `create index concurrently` which prevents blo
Here is a simplified diagram of the index we just created (note that in practice, nodes actually have more than two children).
![B-Tree index example in Postgres](/docs/img/b-tree-example.png)
<Image
alt="B-Tree index example in Postgres"
zoomable
src={{
dark: '/docs/img/database/managing-indexes/creating-indexes.png',
light: '/docs/img/database/managing-indexes/creating-indexes--light.png',
}}
/>
You can see that in any large data set, traversing the index to locate a given value can be done in much less operations (O(log n)) than compared to scanning the table one value at a time from top to bottom (O(n)).
+24 -3
View File
@@ -23,7 +23,14 @@ There are a few important differences from a spreadsheet, but it's a good starti
When creating a table, it's best practice to add columns at the same time.
![Tables and columns](/docs/img/guides/database/tables-columns.png)
<Image
alt="Tables and columns"
zoomable
src={{
dark: '/docs/img/database/managing-tables/creating-tables.png',
light: '/docs/img/database/managing-tables/creating-tables--light.png',
}}
/>
You must define the "data type" of each column when it is created. You can add and remove columns at any time after creating a table.
@@ -322,7 +329,14 @@ If you receive an error `FATAL: password authentication failed for user "postgr
Tables can be "joined" together using Foreign Keys.
![Foreign Keys](/docs/img/guides/database/foreign-keys.png)
<Image
alt="Foreign Keys"
zoomable
src={{
dark: '/docs/img/database/managing-tables/joining-tables.png',
light: '/docs/img/database/managing-tables/joining-tables--light.png',
}}
/>
This is where the "Relational" naming comes from, as data typically forms some sort of relationship.
@@ -393,7 +407,14 @@ create table performances (
Tables belong to `schemas`. Schemas are a way of organizing your tables, often for security reasons.
![Schemas and tables](/docs/img/guides/database/schema-tables.png)
<Image
alt="Schemas and tables"
zoomable
src={{
dark: '/docs/img/database/managing-tables/schemas.png',
light: '/docs/img/database/managing-tables/schemas--light.png',
}}
/>
If you don't explicitly pass a schema when creating a table, Postgres will assume that you want to create the table in the `public` schema.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 KiB