public.rental
Documentation | Pagila |
Schema | public |
Name | rental |
Module | Business |
Stores rental data
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | rental_id | integer | Default: nextval('rental_rental_id_seq'::regclass) | A surrogate primary key that uniquely identifies the rental. | ||||
A surrogate primary key that uniquely identifies the rental. Default: nextval('rental_rental_id_seq'::regclass) |
||||||||
2 | rental_date | timestamp without time zone(6) | The date and time that the item was rented. | |||||
The date and time that the item was rented. |
||||||||
3 | inventory_id | integer | public.inventory | The item being rented. | ||||
The item being rented. References: public.inventory |
||||||||
4 | customer_id | smallint | public.customer | The customer renting the item. | ||||
The customer renting the item. References: public.customer |
||||||||
5 | return_date | timestamp without time zone(6) | The date and time the item was returned. | |||||
The date and time the item was returned. |
||||||||
6 | staff_id | smallint | public.staff | The staff member who processed the rental. | ||||
The staff member who processed the rental. References: public.staff |
||||||||
7 | last_update | timestamp without time zone(6) | Default: now() | The time that the row was created or most recently updated. | ||||
The time that the row was created or most recently updated. Default: now() |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
public.rental | public.customer | public.rental.customer_id = public.customer.customer_id | rental_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.rental.customer_id = public.customer.customer_id Name: rental_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.rental | public.inventory | public.rental.inventory_id = public.inventory.inventory_id | rental_inventory_id_fkey Foreign key constraint referencing inventory.inventory_id |
|
public.rental.inventory_id = public.inventory.inventory_id Name: rental_inventory_id_fkeyForeign key constraint referencing inventory.inventory_id |
||||
public.rental | public.staff | public.rental.staff_id = public.staff.staff_id | rental_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.rental.staff_id = public.staff.staff_id Name: rental_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment | public.rental | public.payment.rental_id = public.rental.rental_id | payment_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment.rental_id = public.rental.rental_id Name: payment_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_01 | public.rental | public.payment_p2007_01.rental_id = public.rental.rental_id | payment_p2007_01_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_01.rental_id = public.rental.rental_id Name: payment_p2007_01_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_02 | public.rental | public.payment_p2007_02.rental_id = public.rental.rental_id | payment_p2007_02_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_02.rental_id = public.rental.rental_id Name: payment_p2007_02_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_03 | public.rental | public.payment_p2007_03.rental_id = public.rental.rental_id | payment_p2007_03_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_03.rental_id = public.rental.rental_id Name: payment_p2007_03_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_04 | public.rental | public.payment_p2007_04.rental_id = public.rental.rental_id | payment_p2007_04_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_04.rental_id = public.rental.rental_id Name: payment_p2007_04_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_05 | public.rental | public.payment_p2007_05.rental_id = public.rental.rental_id | payment_p2007_05_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_05.rental_id = public.rental.rental_id Name: payment_p2007_05_rental_id_fkeyForeign key constraint referencing rental.rental_id |
||||
public.payment_p2007_06 | public.rental | public.payment_p2007_06.rental_id = public.rental.rental_id | payment_p2007_06_rental_id_fkey Foreign key constraint referencing rental.rental_id |
|
public.payment_p2007_06.rental_id = public.rental.rental_id Name: payment_p2007_06_rental_id_fkeyForeign key constraint referencing rental.rental_id |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
rental_pkey | rental_id | Primary key. | |
Primary key. |
Triggers
Key name | When | Description | |
---|---|---|---|
last_updated | Before Update | The last_updated trigger sets last_update column of table to the current timestamp. | |
The last_updated trigger sets last_update column of table to the current timestamp. |
Uses
Name |
---|
public.rental
|
Used by
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25