create table ticket (
  t_id          int not null auto_increment,
  t_category    varchar(40) not null,
  t_detail      text,
  t_priority    smallint,
  t_user        varchar(10) not null,
  t_assignedto  varchar(10) not null,
  t_timestamp_opened    int,
  t_timestamp_closed    int,
  t_subject     varchar(255),
  t_department  varchar(25),
  t_watchers      text,
  primary key (t_id)
);

create table category (
  c_id          int not null auto_increment,
  c_department  varchar(25) not null,
  c_name        varchar(40) not null,
  primary key (c_id)
);

create table department (
  d_name                varchar(25) not null,
  primary key (d_name)
);