The business
database contains the following tables:
The staff
table contains information about all staff members described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each staff member in the table. | |
The staff member's first name. | |
The staff member's last name. | |
A foreign key identifying the address of the staff member in the address table. | |
A photograph of the employee. | |
The staff member's e-mail address. | |
The staff member's "home store". The employee can work at other stores but is generally assigned to the store that is listed. | |
Indicates whether the staff member is an active staff member. Setting this to | |
The username used by the staff member to access the rental system. | |
The password used by the staff member to access the rental system. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the table_staff
table:
The store
table contains information about all the stores described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each store in the table. | |
A foreign key identifying the manager of this store in the staff table. | |
A foreign key identifying the address of the store in the address table. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the store
table:
The rental
table contains information about each rental of each inventory item described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each item in the table. | |
The date and time at which the item was rented. | |
A foreign key identifying the physical film being rented in the inventory table. | |
The customer who rents the film. | |
The date and time at which the film was returned. | |
The staff member who processed the rental. | |
The most recent row update. It has not been used in this book. |
The following screenshot shows the rental
table:
The payment
table contains information about each payment made by a customer, with information such as the amount and the rental being paid for (when applicable), described as follows:
Column |
Description |
---|---|
A primary key used to uniquely identify each payment in the table. | |
A foreign key that identifies the customer making the payment in the | |
A foreign key that identifies the staff member who processed the payment in the | |
The rental that the payment is being applied to. This is optional because some payments are for outstanding fees and may not be directly related to a rental. | |
The amount of the payment. | |
The date on which the payment was processed. | |
The most recent row update. It has not been used in this book. |