Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||
|---|---|---|---|---|---|---|---|---|---|---|
| rental_id | INT | 10 | √ | null |
|
|
||||
| rental_date | DATETIME | 26 | null |
|
|
|||||
| inventory_id | MEDIUMINT UNSIGNED | 8 | null |
|
|
|||||
| customer_id | SMALLINT UNSIGNED | 5 | null |
|
|
|||||
| return_date | DATETIME | 26 | √ | null |
|
|
||||
| staff_id | TINYINT UNSIGNED | 3 | null |
|
|
|||||
| last_update | TIMESTAMP | 26 | CURRENT_TIMESTAMP |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | rental_id |
| idx_fk_customer_id | Performance | Asc | customer_id |
| idx_fk_inventory_id | Performance | Asc | inventory_id |
| idx_fk_staff_id | Performance | Asc | staff_id |
| rental_date | Must be unique | Asc/Asc/Asc | rental_date + inventory_id + customer_id |