The customer
table contains a list of all
customers.
The customer
table is referred to in the
payment
and
rental
tables and refers to the
address
and
store
tables using foreign keys.
Columns
customer_id
: A surrogate primary key used to uniquely identify each customer in the table.store_id
: A foreign key identifying the customer “home store.” Customers are not limited to renting only from this store, but this is the store at which they generally shop.first_name
: The customer first name.last_name
: The customer last name.email
: The customer email address.address_id
: A foreign key identifying the customer address in theaddress
table.active
: Indicates whether the customer is an active customer. Setting this toFALSE
serves as an alternative to deleting a customer outright. Most queries should have aWHERE active = TRUE
clause.create_date
: The date the customer was added to the system. This date is automatically set using a trigger during anINSERT
.last_update
: When the row was created or most recently updated.