public.film
Documentation | Pagila |
Schema | public |
Name | film |
Module | Inventory |
Stores films data such as title, release year, length, rating, etc
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | film_id | integer | Default: nextval('film_film_id_seq'::regclass) | A surrogate primary key used to uniquely identify each film in the table. | ||||
A surrogate primary key used to uniquely identify each film in the table. Default: nextval('film_film_id_seq'::regclass) |
||||||||
2 | title | character varying(255) | The title of the film. | |||||
The title of the film. |
||||||||
3 | description | text | A short description or plot summary of the film. | |||||
A short description or plot summary of the film. |
||||||||
4 | release_year | integer | The year in which the movie was released. | |||||
The year in which the movie was released. |
||||||||
5 | language_id | smallint | public.language | A foreign key pointing at the language table; identifies the language of the film. | ||||
A foreign key pointing at the language table; identifies the language of the film. References: public.language |
||||||||
6 | original_language_id | smallint | public.language | A foreign key pointing at the language table; identifies the original language of the film. Used when a film has been dubbed into a new language. | ||||
A foreign key pointing at the language table; identifies the original language of the film. Used when a film has been dubbed into a new language. References: public.language |
||||||||
7 | rental_duration | smallint | Default: 3 | The length of the rental period, in days. | ||||
The length of the rental period, in days. Default: 3 |
||||||||
8 | rental_rate | numeric(4, 2) | Default: 4.99 | The cost to rent the film for the period specified in the rental_duration column. | ||||
The cost to rent the film for the period specified in the rental_duration column. Default: 4.99 |
||||||||
9 | length | smallint | The duration of the film, in minutes. | |||||
The duration of the film, in minutes. |
||||||||
10 | replacement_cost | numeric(5, 2) | Default: 19.99 | The amount charged to the customer if the film is not returned or is returned in a damaged state. | ||||
The amount charged to the customer if the film is not returned or is returned in a damaged state. Default: 19.99 |
||||||||
11 | rating | USER-DEFINED | Default: 'G'::mpaa_rating | The rating assigned to the film. Can be one of: G, PG, PG-13, R, or NC-17. | ||||
The rating assigned to the film. Can be one of: G, PG, PG-13, R, or NC-17. Default: 'G'::mpaa_rating |
||||||||
12 | last_update | timestamp without time zone(6) | Default: now() | The time that the row was created or most recently updated. | ||||
The time that the row was created or most recently updated. Default: now() |
||||||||
13 | special_features | ARRAY | Lists which common special features are included on the DVD. Can be zero or more of: Trailers, Commentaries, Deleted Scenes, Behind the Scenes. | |||||
Lists which common special features are included on the DVD. Can be zero or more of: Trailers, Commentaries, Deleted Scenes, Behind the Scenes. |
||||||||
14 | fulltext | tsvector | Used PostgreSQL built-in fulltext searching for fulltext index.
FULLTEXT SEARCH --------------- In older versions of pagila, the fulltext search capabilities were split into a seperate file, so they could be loaded into only databases that support fulltext. Starting in PostgreSQL 8.3, fulltext functionality is built in, so now these parts of the schema exist in the main schema file. Example usage: SELECT * FROM film WHERE fulltext @@ to_tsquery('fate&india'); |
|||||
Used PostgreSQL built-in fulltext searching for fulltext index.
FULLTEXT SEARCH --------------- In older versions of pagila, the fulltext search capabilities were split into a seperate file, so they could be loaded into only databases that support fulltext. Starting in PostgreSQL 8.3, fulltext functionality is built in, so now these parts of the schema exist in the main schema file. Example usage: SELECT * FROM film WHERE fulltext @@ to_tsquery('fate&india'); |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
public.film | public.language | public.film.original_language_id = public.language.language_id | film_original_language_id_fkey Foreign key constraint referencing language.language_id |
|
public.film.original_language_id = public.language.language_id Name: film_original_language_id_fkeyForeign key constraint referencing language.language_id |
||||
public.film | public.language | public.film.language_id = public.language.language_id | film_language_id_fkey Foreign key constraint referencing language.language_id |
|
public.film.language_id = public.language.language_id Name: film_language_id_fkeyForeign key constraint referencing language.language_id |
||||
public.film_actor | public.film | public.film_actor.film_id = public.film.film_id | film_actor_film_id_fkey Foreign key constraint referencing film.film_id |
|
public.film_actor.film_id = public.film.film_id Name: film_actor_film_id_fkeyForeign key constraint referencing film.film_id |
||||
public.film_category | public.film | public.film_category.film_id = public.film.film_id | film_category_film_id_fkey Foreign key constraint referencing film.film_id |
|
public.film_category.film_id = public.film.film_id Name: film_category_film_id_fkeyForeign key constraint referencing film.film_id |
||||
public.inventory | public.film | public.inventory.film_id = public.film.film_id | inventory_film_id_fkey Foreign key constraint referencing film.film_id |
|
public.inventory.film_id = public.film.film_id Name: inventory_film_id_fkeyForeign key constraint referencing film.film_id |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
film_pkey | film_id | Primary key. | |
Primary key. |
Triggers
Key name | When | Description | |
---|---|---|---|
film_fulltext_trigger | Before Insert, Update | trigger for automatic update of tsvector column | |
trigger for automatic update of tsvector column | |||
last_updated | Before Update | The last_updated trigger sets last_update column of table to the current timestamp. | |
The last_updated trigger sets last_update column of table to the current timestamp. |
Uses
Name |
---|
public.film
|
Used by
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25