PostgreSQL database diagram - Pagila

Pagila – online ER diagram

According to

Pagila is a port of the Sakila example database available for MySQL, which was originally developed by Mike Hillyer of the MySQL AB documentation team. It is intended to provide a standard schema that can be used for examples in books, tutorials, articles, samples, etc.

For more information visit

ERD example - PostgreSQL

HTML report / online ER diagram

Here you can find the ER diagram created by loading the database structure from the Pagila schema installed on PostgreSQL 13.

When you click on a database table in the online ER diagram, a new window opens where you can see the details of the table, including defined indexes and other details.

The Pagila database design includes definitions of tables, relationships, foreign keys, functions, triggers, domains and views.


Target database:
PostgreSQL 13

Diagram URL:

Luna Modeler project file:

How to:
Open *.dmm project file in Luna Modeler

About Luna Modeler: a desktop data modeling tool for MariaDB, MySQL, PostgreSQL and SQLite. It allows you to create ER diagrams of existing databases, generate SQL or schema creation scripts and produce PDF or HTML reports. A feature-limited trial version is available for Windows, macOS and Linux. For more information about Luna Modeler please visit

Pagila | Sample | ER diagram

If you have suggestions or comments, send us a message to dbdiagrams(at)