---
layout: article
title: Quick start
description: Create your first native PostgreSQL database in the Appwrite Console, run your first queries in the SQL editor, and connect with psql.
---

You can create a PostgreSQL database and run your first query in a few minutes.

# Create a database

1. In your project, go to **Databases**.
2. Click **Create database**.
3. Give your database a name, and optionally a custom database ID.
4. Under **Choose database type**, select **PostgreSQL** from the **Native databases** group.

![Create database type selection](/images/docs/products/databases/postgresql/create-database-type.avif)

5. Under **Specifications**, select your preferred tier.
6. Optionally configure **Read replicas** and **Point-in-time recovery (PITR)**. You can change both later.

![Database specifications](/images/docs/products/databases/postgresql/create-database-specs.avif)

7. Review the database summary and click **Create database**.

Your database starts provisioning and becomes ready shortly after. You land in the SQL editor once it is created.

# Run your first queries

![SQL editor](/images/docs/products/databases/postgresql/sql-editor-run.avif)

The **SQL editor** tab gives you an editor with formatting, query explain, and a results panel, without leaving the browser.

Create a table, insert a row, and read it back:

```sql
CREATE TABLE books (
    id SERIAL PRIMARY KEY,
    title TEXT NOT NULL,
    author TEXT NOT NULL
);

INSERT INTO books (title, author)
VALUES ('The Hitchhiker''s Guide to the Galaxy', 'Douglas Adams');

SELECT * FROM books;
```

# Get your connection details

To connect from outside the Console:

1. Open your database and click **Credentials**.
2. The **Details** tab shows the host, port, username, password, and database name.
3. The **DSN**, **.env**, **Prisma**, **Drizzle**, and **psql** tabs have ready-made snippets for each workflow.

# Connect with psql

Copy the command from the **psql** tab of the credentials dialog, or build it from the details:

```bash
psql -h <host> -p 5432 -U admin -d <database>
```

Enter the password when prompted. You can run the same queries from your terminal that you ran in the SQL editor, or connect from your application with any PostgreSQL driver. See [Connections](/docs/products/databases/postgresql/connections) for driver examples.

# Next steps

- [Connections](/docs/products/databases/postgresql/connections): Connect from your application with any PostgreSQL driver or ORM.
- [Extensions](/docs/products/databases/postgresql/extensions): Install PostgreSQL extensions like PostGIS and pgvector.
- [Backups](/docs/products/databases/postgresql/backups): Configure backup policies and point-in-time recovery.
- [Monitoring](/docs/products/databases/postgresql/monitoring): Watch compute, connections, storage, and workload metrics live.
