update docs diagrams (#29394)
* update docs diagrams * remove unused images
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.
|
||||
|
||||

|
||||
<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(
|
||||
);
|
||||
```
|
||||
|
||||

|
||||
<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).
|
||||
|
||||

|
||||
<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)).
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||

|
||||
<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.
|
||||
|
||||

|
||||
<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.
|
||||
|
||||

|
||||
<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.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 825 KiB |
|
Before Width: | Height: | Size: 105 KiB |
|
Before Width: | Height: | Size: 194 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 497 KiB |
|
Before Width: | Height: | Size: 324 KiB |
|
Before Width: | Height: | Size: 476 KiB |