php
/* Uncomment this section if you need to drop tables drop table song; Drop table member; drop table album; drop table band; drop table artist; */ create table artist( id int auto_increment, fname varchar(100), lname varchar(150) not null, dob date, hometown varchar(500), gender varchar(1), primary key (id) ) engine = innodb; create table band( id int auto_increment, title varchar(250) not null, year_formed year, primary key (id) ) engine = innodb; create table member( artist_id int not null, band_id int not null, joined_date date not null, leave_date date, foreign key (artist_id) references artist(id), foreign key (band_id) references band(id) ) engine = innodb; Create table album( id int auto_increment, title varchar(500) not null, pub_year year not null, publisher varchar(500), media varchar(50), band_id int not null, primary key (id), foreign key (band_id) references band(id) ) engine = innodb; create table song( album_id int, name varchar(500), length decimal(5,2), primary key (album_id, name), foreign key (album_id) references album(id) ) engine = innodb;