film_category
| Documentation | Sakila |
| Name | film_category |
| Module | Inventory |
The film_category table is used to support a many-to-many relationship between films and categories. For each category applied to a film, there will be one row in the film_category table listing the category and film.
The film_category table refers to the film and category tables using foreign keys.
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | film_id | unsigned smallint(5, 0) | film | A foreign key identifying the film. | ||||
| A foreign key identifying the film. References: film |
||||||||
| 2 | category_id | unsigned tinyint(3, 0) | category | A foreign key identifying the category. | ||||
| A foreign key identifying the category. References: category |
||||||||
| 3 | last_update | timestamp | Default: CURRENT_TIMESTAMP | The time that the row was created or most recently updated. | ||||
| The time that the row was created or most recently updated. Default: CURRENT_TIMESTAMP |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| film_category | category | film_category.category_id = category.category_id | fk_film_category_category Foreign key constraint referencing category.category_id |
|
|
film_category.category_id = category.category_id Name: fk_film_category_categoryForeign key constraint referencing category.category_id |
||||
| film_category | film | film_category.film_id = film.film_id | fk_film_category_film Foreign key constraint referencing film.film_id |
|
|
film_category.film_id = film.film_id Name: fk_film_category_filmForeign key constraint referencing film.film_id |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| PRIMARY | film_id, category_id | Primary key. | |
| Primary key. | |||
Exported: 2018-10-12 17:43, Last imported: 2018-08-06 10:44
