liveBook · Manning

Database

As explained in Just Use Postgres!

A database is a named collection of database objects such as schemas, tables, views, and indexes.

A database is the top-level named collection of database objects. It contains schemas, which organize tables, views, functions, triggers, and other objects under logical names. section 2.1

Use separate databases to isolate datasets and application workloads. Tables in different schemas within one database can be queried together; tables in different databases cannot be joined directly through ordinary SQL. section 2.1

Connect to the default database

With a Postgres container running, execute `docker exec -it postgres psql -U postgres`. This connects to the default `postgres` database through the container’s local socket; use `\q` to exit. section 1.4

Listing 1.3 Connecting with psql
docker exec -it postgres psql -U postgres

Open the command listing for a runnable connection example. section 1.4

How Just Use Postgres! covers it

How deep it goes
Defines databases through schemas, tables, and object boundaries, but stops short of detailed administration or deployment guidance.
Examples
Uses the default postgres database, a Postgres container, and psql commands for connection and object inspection.
What you can do after
Operate/configure it by connecting with psql and recognize the scope of queries across databases and schemas.
How it connects
Connects databases to schemas, tables, SQL queries, transactions, data integrity, functions, triggers, and roles.

Also explained in

Compare how 24 books explain database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Just Use Postgres!. The section links point to the parts of the book it draws on.