Movatterモバイル変換


[0]ホーム

URL:


You don’t need a vector database - just use Postgres for everything. Read the case study on switching from Pinecone to Neon
PostgreSQL Tutorial
PostgreSQL Tutorial
/Getting Started/PostgreSQL Sample Database

PostgreSQL Sample Database

Summary: in this tutorial, we will introduce you to a PostgreSQL sample database that you can use for learning and practicing PostgreSQL.

We will use the DVD rental database to demonstrate the features of PostgreSQL.

The DVD rental database represents the business processes of a DVD rental store. The DVD rental database has many objects, including:

  • 15 tables
  • 1 trigger
  • 7 views
  • 8 functions
  • 1 domain
  • 13 sequences

PostgreSQL Sample Database Diagram

The following diagram shows the structure of the DVD rental database:

DVD Rental Database ER Diagram

In the diagram, the asterisk (*), which appears in front of the field, indicates theprimary key.

PostgreSQL Sample Database Tables

There are 15 tables in the DVD Rental database:

  • actor – stores actor data including first name and last name.
  • film – stores film data such as title, release year, length, rating, etc.
  • film_actor – stores the relationships between films and actors.
  • category – stores film’s categories data.
  • film_category- stores the relationships between films and categories.
  • store – contains the store data including manager staff and address.
  • inventory – stores inventory data.
  • rental – stores rental data.
  • payment – stores customer’s payments.
  • staff – stores staff data.
  • customer – stores customer data.
  • address – stores address data for staff and customers
  • city – stores city names.
  • country – stores country names.

Download the PostgreSQL sample database

You can download the PostgreSQL DVD Rental sample database via the following link:

Download DVD Rental Sample Database

The database file is inzipformat (dvdrental.zip) so you need to extract it to dvdrental.tarbefore loading the sample database into the PostgreSQL database server.

Download printable ER diagram

Besides the sample database, we provide you with a printable ER diagram in PDF format. You can download and print the ER diagram for reference while practicing PostgreSQL.

Download the Printable ER Diagram

This tutorial introduced you to a PostgreSQL sample database named DVD Rental. We will use this database in our PostgreSQL tutorials, so make sureyou load it to your server.

Last updated on

Was this page helpful?
Thank you for your feedback!

[8]ページ先頭

©2009-2025 Movatter.jp