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 NULLA surrogate primary key used to uniquely identify each address in the table.
ADDRESS-
VARCHAR(50)·NOT NULLThe first line of an address.
ADDRESS2-
VARCHAR(50)·DEFAULT NULLAn optional second line of an address.
DISTRICT-
VARCHAR(20)·NOT NULLThe region of an address, this may be a state, province, prefecture, etc.
CITY_ID-
INTEGER·NOT NULLA foreign key pointing to the CITY table.
POSTAL_CODE-
VARCHAR(10)·DEFAULT NULLThe postal code or ZIP code of the address (where applicable).
PHONE-
VARCHAR(20)·NOT NULLThe telephone number for the address.
LAST_UPDATE-
TIMESTAMP·NOT NULL·DEFAULT CURRENT_TIMESTAMPWhen 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