Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/03/2006, 21:07
Avatar de claudiovega
claudiovega
 
Fecha de Ingreso: octubre-2003
Ubicación: Puerto Montt
Mensajes: 3.667
Antigüedad: 20 años, 6 meses
Puntos: 11
Dejalo así:

Código:
create table artistas
( artid int unsigned not null auto_increment primary key,
  nombre char(50) not null,
  bio text not null,
  foto char(50) not null,
  web char(80) not null,
  fecha datetime not null default '0000-00-00'
) TYPE=InnoDB;
create table estilos
( estiloid int unsigned not null auto_increment primary key,
  estilo char(50) not null
) TYPE=InnoDB;
create table audio_tracks
( trackid int unsigned not null auto_increment primary key,
  artid int unsigned not null,
  estiloid int unsigned not null,
  nombre char(100),
  url char(120),
  peso float(3,2) not null,
  duracion float(2,2) not null,
  fecha datetime not null,
  INDEX (artid),
  INDEX (estiloid),
  FOREIGN KEY (artid) REFERENCES artistas(artid),
  FOREIGN KEY (estiloid) REFERENCES estilos(estiloid)
) TYPE=InnoDB;
create table sets
( setid int unsigned not null auto_increment primary key,
  artid int unsigned not null,
  estiloid int unsigned not null,
  nombre char(100),
  url char(120),
  peso float(3,2) not null,
  duracion float(2,2) not null,
  fecha datetime not null,
  INDEX (artid),
  INDEX (estiloid),
  FOREIGN KEY (artid) REFERENCES artistas(artid),
  FOREIGN KEY (estiloid) REFERENCES estilos(estiloid)
) TYPE=InnoDB;