Roles, databases, and schemas
Clusters, databases, and schemas
Understand PostgreSQL’s hierarchy so a role, database, schema, and table do not blur into one concept.
8 minute lesson
~~~
One PostgreSQL server instance manages a cluster of databases. A connection enters one database at a time.
Roles belong to the cluster, so the same role name is visible from every database. Tables do not: each table belongs to one schema inside one database.
Inside a database, schemas group objects such as tables and functions. public is the familiar default schema, not a separate database.
Lesson completed