The inventory
database contains the following tables:
The film
table contains a list of all films (logical information), not necessarily in stock. The stock information (physical copy) is in the table inventory described as follows:
An example of the film
table is shown in the following screenshot:
The category
table contains a list of all the categories that can be assigned to a film. More than one category can be assigned to a film. A many-to-many relationship is performed by the film_category
table. The columns and values of the category
table are as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each category in the table. | |
The name of the category. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the category
table:
The film_category
table described as follows is used to support a many-to-many relationship between films and categories:
Column |
Description |
---|---|
A foreign key identifying the film. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the film_category
table:
The language
table contains columns that may be used to identify the language ID and the original language of the film, described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each language in the table. | |
The English name of the language. | |
The most recent row update. It has not been used in this book. |
The actor
table contains information about all the actors in the films. More than one actor can be assigned to a film. A many-to-many relationship is performed by the film_actor
table described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each actor in the table. | |
The actor's first name. | |
The actor's last name. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the actor
table:
The film_actor
table is used to support a many-to-many relationship between films and actors described as follows:
Column |
Description |
---|---|
A foreign key identifying the film. | |
A foreign key identifying the actor. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the film_actor
table:
Each row in the inventory
table represents a physical copy of a film in a store, described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each item in the table. | |
A foreign key identifying the film. | |
A foreign key identifying the store that the physical copy of a film is in. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the inventory
table:
The film_text
table provides a detailed description of the films. This table is a summary of the film
table. It is read only, as described:
Column |
Description |
---|---|
A primary key used to uniquely identify each film summary in the table. | |
The title of the film. | |
A short description or plot summary of the film. |
The following screenshot shows the film_text
table: