Creating vertical partitions
In the video, you learned about vertical partitioning and saw an example.
For vertical partitioning, there is no specific syntax in PostgreSQL. You have to create a new table with particular columns and copy the data there. Afterward, you can drop the columns you want in the separate partition. If you need to access the full table, you can do so by using a JOIN clause.
In this exercise and the next one, you'll be working with the example database called pagila. It's a database that is often used to showcase PostgreSQL features. The database contains several tables. We'll be working with the film table. In this exercise, we'll use the following columns:
film_id: the unique identifier of the filmlong_description: a lengthy description of the film
Latihan ini adalah bagian dari kursus
Database Design
Latihan interaktif praktis
Cobalah latihan ini dengan menyelesaikan kode contoh berikut.
-- Create a new table called film_descriptions
___ ___ ___ (
___ INT,
___ ___
);
-- Copy the descriptions from the film table
___ ___ ___
SELECT ___, ___ FROM ___;