5.1.13 The payment Table

The payment table records each payment made by a customer, with information such as the amount and the rental being paid for (when applicable).

The payment table refers to the customer, rental, and staff tables.

Columns
  • payment_id: A surrogate primary key used to uniquely identify each payment.

  • customer_id: The customer whose balance the payment is being applied to. This is a foreign key reference to the customer table.

  • staff_id: The staff member who processed the payment. This is a foreign key reference to the staff table.

  • rental_id: 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.

  • amount: The amount of the payment.

  • payment_date: The date the payment was processed.

  • last_update: The time that the row was created or most recently updated.