12.00.f.    Write the commands needed to recreate the tables based on the new ERD (don’t forget to drop the old tables before recreating them).

 

drop table role;

drop table ballet;

drop table dancer;

 

create table ballet

( ballet_name char(50),

  composer char(50),

  choreographer char(50),

  primary key (ballet_name,composer,choreographer));

 

create table dancer

( dancer_number integer,

  dancer_name char(50),

  primary key (dancer_number));

 

create table role

( dancernum integer,

  balletname char(50),

  rolename char(50),

  dancedate date,

  primary key (dancernum, balletname, rolename,dancedate),

  foreign key (dancernum) references dancer (dancer_number),

  foreign key (balletname) references ballet (ballet_name));