Listing 1. create_db.sql

drop table if exists customer;
create table customer(
  id int unsigned not null auto_increment,
  forename varchar(64) not null,
  surname varchar(64) not null,
  created_on timestamp not null,
  primary key(id)
);

drop table if exists address;
create table address(
  id int unsigned not null auto_increment,
  customer_id int unsigned not null,
  street varchar(64),
  house_number varchar(16),
  postal_code varchar(16),
  city varchar(64),
  state char(2),
  primary key(id),
  foreign key (customer_id) references customer(id)
    on delete cascade
);