CloudVision PostgreSQL MasteryLevel 1 · Foundations
postgres · 0 tables · 0 rows0/21 enrol to run
Mission & Theory

Creating Your First Database

Create a new database called school.

Objectives

  • Explain what a PostgreSQL database is
  • Create a database using SQL
  • Understand what happens internally when PostgreSQL creates a database

Learn

CREATE DATABASEPostgreSQL ClusterSystem CatalogVerification

Verification

Check with \l

Missions in this level

query.sql
localhost:5432 · db postgres · user postgres
Live Schema Map0 views · 0 indexes · 0 roles
No tables in postgres yet — run a CREATE TABLE to draw one.
ExecutorParse›Rewrite›Plan›Execute›Storageidle
Live Database Explorer
PostgreSQL Cluster
postgres (connected)
public
no tables
template0
template1

Command breakdown

CREATESQL keyword that tells PostgreSQL to create a new object.
DATABASESpecifies the object type to create.
schoolThe name of the new database.
;Ends the SQL statement.
CloudVision PostgreSQL — type SQL below and press ⌘/Ctrl+Enter (or the play button) to run it.