public.address
| Documentation | Pagila |
| Schema | public |
| Name | address |
| Module | Customer Data |
Stores address data for staff and customers
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | address_id | integer | Default: nextval('address_address_id_seq'::regclass) | A surrogate primary key used to uniquely identify each address in the table. | ||||
| A surrogate primary key used to uniquely identify each address in the table. Default: nextval('address_address_id_seq'::regclass) |
||||||||
| 2 | address | character varying(50) | The first line of an address. | |||||
| The first line of an address. |
||||||||
| 3 | address2 | character varying(50) | An optional second line of an address. | |||||
| An optional second line of an address. |
||||||||
| 4 | district | character varying(20) | The region of an address, this may be a state, province, prefecture, etc. | |||||
| The region of an address, this may be a state, province, prefecture, etc. |
||||||||
| 5 | city_id | smallint | public.city | Name of the city. | ||||
| Name of the city. References: public.city |
||||||||
| 6 | postal_code | character varying(10) | The postal code or ZIP code of the address (where applicable). | |||||
| The postal code or ZIP code of the address (where applicable). |
||||||||
| 7 | phone | character varying(20) | The telephone number for the address. | |||||
| The telephone number for the address. |
||||||||
| 8 | 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.address | public.city | public.address.city_id = public.city.city_id | address_city_id_fkey Foreign key constraint referencing city.city_id |
|
|
public.address.city_id = public.city.city_id Name: address_city_id_fkeyForeign key constraint referencing city.city_id |
||||
| 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.staff | public.address | public.staff.address_id = public.address.address_id | staff_address_id_fkey Foreign key constraint referencing address.address_id |
|
|
public.staff.address_id = public.address.address_id Name: staff_address_id_fkeyForeign key constraint referencing address.address_id |
||||
| public.store | public.address | public.store.address_id = public.address.address_id | store_address_id_fkey Foreign key constraint referencing address.address_id |
|
|
public.store.address_id = public.address.address_id Name: store_address_id_fkeyForeign key constraint referencing address.address_id |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| address_pkey | address_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.address
|
Used by
| Name |
|---|
|
public.address
|
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25
