public.city
Documentation | Pagila |
Schema | public |
Name | city |
Module | Customer Data |
Stores the city names
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | city_id | integer | Default: nextval('city_city_id_seq'::regclass) | A surrogate primary key used to uniquely identify each city in the table. | ||||
A surrogate primary key used to uniquely identify each city in the table. Default: nextval('city_city_id_seq'::regclass) |
||||||||
2 | city | character varying(50) | Name of the city. | |||||
Name of the city. |
||||||||
3 | country_id | smallint | public.country | A foreign key identifying the country that the city belongs to. | ||||
A foreign key identifying the country that the city belongs to. References: public.country |
||||||||
4 | 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.city | public.country | public.city.country_id = public.country.country_id | city_country_id_fkey Foreign key constraint referencing country.country_id |
|
public.city.country_id = public.country.country_id Name: city_country_id_fkeyForeign key constraint referencing country.country_id |
||||
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 |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
city_pkey | city_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.city
|
Used by
Name |
---|
public.city
|
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25