Table ADDRESS
This table contains address information for customers, staff, and stores. The table primary key appears as a foreign key in the CUSTOMER, STAFF, and STORE tables.
Columns
This table contains 8 columns.
ADDRESS_ID
-
INTEGER
·NOT NULL
A surrogate primary key used to uniquely identify each address in the table.
ADDRESS
-
VARCHAR(50)
·NOT NULL
The first line of an address.
ADDRESS2
-
VARCHAR(50)
·DEFAULT NULL
An optional second line of an address.
DISTRICT
-
VARCHAR(20)
·NOT NULL
The region of an address, this may be a state, province, prefecture, etc.
CITY_ID
-
INTEGER
·NOT NULL
A foreign key pointing to the CITY table.
POSTAL_CODE
-
VARCHAR(10)
·DEFAULT NULL
The postal code or ZIP code of the address (where applicable).
PHONE
-
VARCHAR(20)
·NOT NULL
The telephone number for the address.
LAST_UPDATE
-
TIMESTAMP
·NOT NULL
·DEFAULT CURRENT_TIMESTAMP
When the row was created or most recently updated.
Primary key
This table has a primary key.
ADDRESS
-
ADDRESS_ID
Foreign keys
This table has one foreign key.
FK_ADDRESS_CITY
-
CITY_ID
»CITY (CITY_ID)
·ON UPDATE CASCADE
·ON DELETE NO ACTION
Indices
This table has 3 indices.
FK_ADDRESS_CITY
-
CITY_ID
IDX_ADDRESS_FK_CITY_ID
-
CITY_ID
RDB$PRIMARY2
-
ADDRESS_ID