Skip to content

Instantly share code, notes, and snippets.

@ashen007
Created April 26, 2025 06:42
Show Gist options
  • Save ashen007/32b67d0dc32f56961dbc3cac39b21d18 to your computer and use it in GitHub Desktop.
Save ashen007/32b67d0dc32f56961dbc3cac39b21d18 to your computer and use it in GitHub Desktop.

Revisions

  1. ashen007 created this gist Apr 26, 2025.
    40 changes: 40 additions & 0 deletions ex_2.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    """
    film table column descriptions:
    film_id: Unique identifier for each film
    title: Name of the film
    description: Brief synopsis of the film's plot
    release_year: Year the film was released
    language_id: ID of the film's primary language
    original_language_id: ID of the film's original language (if different)
    rental_duration: Standard rental period in days
    rental_rate: Cost to rent the film
    length: Duration of the film in minutes
    replacement_cost: Fee charged if the film is not returned or damaged
    rating: Film's rating (e.g., G, PG, R)
    special_features: Additional content or formats available
    last_update: Timestamp of the most recent update to the record
    inventory table column descriptions:
    inventory_id: Unique identifier for each inventory item
    film_id: Foreign key referencing the film table, indicating which film this inventory item is
    store_id: Identifier of the store where this inventory item is located
    last_update: Timestamp of the most recent update to this inventory record
    payment table column descriptions:
    payment_id: Unique identifier for each payment transaction
    customer_id: Foreign key referencing the customer who made the payment
    staff_id: Foreign key referencing the staff member who processed the payment
    rental_id: Foreign key referencing the associated rental transaction
    amount: The payment amount
    payment_date: Date and time when the payment was made
    last_update: Timestamp of the most recent update to this payment record
    rental table column descriptions:
    rental_id: Unique identifier for each rental transaction
    rental_date: Date and time when the rental was made
    inventory_id: Foreign key referencing the specific inventory item rented
    customer_id: Foreign key referencing the customer who rented the item
    return_date: Date and time when the item was returned (null if not yet returned)
    staff_id: Foreign key referencing the staff member who processed the rental
    last_update: Timestamp of the most recent update to this rental record
    """