Академический Документы
Профессиональный Документы
Культура Документы
INFORMATIVOS
Integrantes Cdigo Alex Yunga 346 Joseph Gmez 372 Curso: Cuarto B Docente: Ing. Blanca Hidalgo
use Cine create table Pelicula (Idpelicula int not null, Titulo varchar(50), Genero char(10),Ao char(10), Pais char(10), Idioma char(10), Calificacion char(10), Duracion time primary key (Idpelicula) );
use Cine Create table RTipo (Tipo char(20) , IDPERSONAJE int not null, IDPELICULA int not null, Constraint pk_pp PRIMARY KEY(IDPERSONAJE, IDPELICULA), Constraint fk_p1 FOREIGN KEY (IDPERSONAJE) REFERENCES Personaje(Idpersonaje), Constraint fk_p2 FOREIGN KEY (IDPELICULA) REFERENCES Pelicula(Idpelicula) );
use Cine create table Cliente (Idcliente int not null, Nomcliente varchar(50), primary key (Idcliente) );
use Cine Create table Comentarios (Fecha date not null, Calificacion char(10) , Comentarios varchar(50), IDCLIENTE int not null, IDPELICULA int not null, Constraint pk_cp PRIMARY KEY(IDCLIENTE, IDPELICULA), Constraint fk_c FOREIGN KEY (IDCLIENTE) REFERENCES Cliente(Idcliente), Constraint fk_p FOREIGN KEY (IDPELICULA) REFERENCES Pelicula(Idpelicula) );
use Cine Create table Sala ( Numsala int not null, Cantsillas int, primary key (Numsala), IDPELICULA int not null Constraint fk_pe FOREIGN KEY (IDPELICULA) REFERENCES Pelicula(Idpelicula) );
use Cine Create table Cines (Nomcine varchar(50) not null, Direccion varchar(50) , Telefono int, IDPELICULA int not null, NUMSALA int not null primary key (Nomcine), Constraint fk_pel FOREIGN KEY (IDPELICULA) REFERENCES Pelicula(Idpelicula), Constraint fk_s FOREIGN KEY (NUMSALA) REFERENCES Sala(Numsala) );
use Cine Create table Promocion (Tipoprom char(10) not null, Codprom int not null, NOMCINE varchar(50) not null, Constraint pk_prc PRIMARY KEY(Codprom, NOMCINE), Constraint fk_ci FOREIGN KEY (NOMCINE) REFERENCES Cines(Nomcine) );