## Appendix J. Demo Database “Airlines”

This is an overview of a demo database for Postgres Pro. This appendix describes the database schema, which consists of eight tables and several views. The subject field of this database is airline flights in Russia. You can download the database from our website. See Section J.1 for details.

Figure J.1. Airlines in Russia

You can use this database for various purposes, such as:

- learning SQL language on your own

- preparing books, manuals, and courses on SQL

- showing Postgres Pro features in stories and articles

When developing this demo database, we pursued several goals:

- Database schema must be simple enough to be understood without extra explanations.

- At the same time, database schema must be complex enough to allow writing meaningful queries.

- The database must contain true-to-life data that will be interesting to work with.

This demo database is distributed under the PostgreSQL license.

You can send us your feedback to edu@postgrespro.ru.

## J.1. Installation

The demo database is available at edu.postgrespro.ru in three flavors, which differ only in the data size:

- demo-small.zip (21 MB) — flight data for one month (DB size is about 300 MB)

- demo-medium.zip (62 MB) — flight data for three months (DB size is about 700 MB)

- demo-big.zip (232 MB) — flight data for one year (DB size is about 2.5 GB)

The small database is good for writing queries, and it will not take up much disk space. The large database can help you understand the query behavior on large data volumes and consider query optimization.

The files include an SQL script that creates the `demo` database and fills it with data (virtually, it is a backup copy created with the pg_dump utility). Note that if the `demo` database already exists, it will be deleted and recreated! The owner of the `demo` database will be the DBMS user who run the script.