public.customer
Documentation | Pagila |
Schema | public |
Name | customer |
Module | Customer Data |
Stores customers data
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | customer_id | integer | Default: nextval('customer_customer_id_seq'::regclass) | A surrogate primary key used to uniquely identify each customer in the table. | ||||
A surrogate primary key used to uniquely identify each customer in the table. Default: nextval('customer_customer_id_seq'::regclass) |
||||||||
2 | store_id | smallint | public.store | A foreign key identifying the customer's “home store.” Customers are not limited to renting only from this store, but this is the store they generally shop at. | ||||
A foreign key identifying the customer's “home store.” Customers are not limited to renting only from this store, but this is the store they generally shop at. References: public.store |
||||||||
3 | first_name | character varying(45) | The customer's first name. | |||||
The customer's first name. |
||||||||
4 | last_name | character varying(45) | The customer's last name. | |||||
The customer's last name. |
||||||||
5 | character varying(50) | The customer's email address. | ||||||
The customer's email address. |
||||||||
6 | address_id | smallint | public.address | A foreign key identifying the customer's address in the address table. | ||||
A foreign key identifying the customer's address in the address table. References: public.address |
||||||||
7 | activebool | boolean | Default: true | Indicates whether the customer is an active customer. Setting this to FALSE serves as an alternative to deleting a customer outright. | ||||
Indicates whether the customer is an active customer. Setting this to FALSE serves as an alternative to deleting a customer outright. Default: true |
||||||||
8 | create_date | date(0) | Default: ('now'::text)::date | The date the customer was added to the system. | ||||
The date the customer was added to the system. Default: ('now'::text)::date |
||||||||
9 | 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() |
||||||||
10 | active | integer | Indicates whether the customer is an active customer. | |||||
Indicates whether the customer is an active customer. |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
public.customer | public.address | public.customer.address_id = public.address.address_id | customer_address_id_fkey Foreign key constraint referencing address.address_id |
|
public.customer.address_id = public.address.address_id Name: customer_address_id_fkeyForeign key constraint referencing address.address_id |
||||
public.customer | public.store | public.customer.store_id = public.store.store_id | customer_store_id_fkey Foreign key constraint referencing store.store_id |
|
public.customer.store_id = public.store.store_id Name: customer_store_id_fkeyForeign key constraint referencing store.store_id |
||||
public.payment | public.customer | public.payment.customer_id = public.customer.customer_id | payment_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment.customer_id = public.customer.customer_id Name: payment_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_01 | public.customer | public.payment_p2007_01.customer_id = public.customer.customer_id | payment_p2007_01_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_01.customer_id = public.customer.customer_id Name: payment_p2007_01_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_02 | public.customer | public.payment_p2007_02.customer_id = public.customer.customer_id | payment_p2007_02_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_02.customer_id = public.customer.customer_id Name: payment_p2007_02_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_03 | public.customer | public.payment_p2007_03.customer_id = public.customer.customer_id | payment_p2007_03_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_03.customer_id = public.customer.customer_id Name: payment_p2007_03_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_04 | public.customer | public.payment_p2007_04.customer_id = public.customer.customer_id | payment_p2007_04_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_04.customer_id = public.customer.customer_id Name: payment_p2007_04_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_05 | public.customer | public.payment_p2007_05.customer_id = public.customer.customer_id | payment_p2007_05_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_05.customer_id = public.customer.customer_id Name: payment_p2007_05_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
public.payment_p2007_06 | public.customer | public.payment_p2007_06.customer_id = public.customer.customer_id | payment_p2007_06_customer_id_fkey Foreign key constraint referencing customer.customer_id |
|
public.payment_p2007_06.customer_id = public.customer.customer_id Name: payment_p2007_06_customer_id_fkeyForeign key constraint referencing customer.customer_id |
||||
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 |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
customer_pkey | customer_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.customer
|
Used by
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25