• Like
Cine
Upcoming SlideShare
Loading in...5
×
Uploaded on

 

More in: Technology , Spiritual
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
699
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
32
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. -527685500380PANTALLAS DEL CINE<br />-461010520700<br />-4133853376295-413385119380<br />-4895853853180-413385-4445<br />-356235-4445<br />-356235449580<br />-5657853176905-451485-4445<br />-5124453809365-283845-109220<br />DICCIONARIO DE DATOS<br />CREATE TABLE PELICULAS (<br />IDPELICULA NUMBER(5) NOT NULL,<br />NOMBRE CHAR(20) NOT NULL,<br />CLASIFICACION CHAR(3) NOT NULL,<br />GENERO CHAR(20) NOT NULL,<br />CONSTRAINT " PK_PELICULAS" PRIMARY KEY (" IDPELICULA" )<br />);<br />CREATE TABLE SALAS (<br />IDSALA NUMBER (5)NOT NULL,<br />NOMBRE CHAR(20) NOT NULL,<br />CAPACIDAD NUMBER(4) NOT NULL,<br />IDCINE NUMBER (5),<br />CONSTRAINT " PK_SALAS" PRIMARY KEY (" IDSALA" ),<br />CONSTRAINT " FK_CINE" FOREIGN KEY (" IDCINE" )<br />REFERENCES CINE<br />);<br />CREATE TABLE CINE (<br />IDCINE NUMBER (5) NOT NULL,<br />NOMBRE CHAR(20) NOT NULL,<br />UBICACION CHAR(20) NOT NULL,<br />CIUDAD CHAR(20) NOT NULL,<br />CONSTRAINT " PK_CINE" PRIMARY KEY (" IDCINE" )<br />);<br />CREATE TABLE HORARIO (<br />IDHORARIO NUMBER (5) NOT NULL,<br />IDSALA NUMBER (5) NOT NULL,<br />IDPELICULA NUMBER(5) NOT NULL,<br />HORARIOPELICULA VARCHAR(5),<br />FECHA DATE,<br />CONSTRAINT " PK_HORARIO" PRIMARY KEY (" IDHORARIO" ),<br />CONSTRAINT " FK_SALA" FOREIGN KEY (" IDSALA" )<br />REFERENCES SALA<br />CONSTRAINT " FK_PELICULAS" FOREIGN KEY (" IDPELICULA" )<br />REFERENCES PELICULAS<br />);<br />PELICULAS<br />INSERT INTO PELICULAS VALUES (00001,'IRONMAN','B','ACCION');<br />INSERT INTO PELICULAS VALUES (00002,'IRONMAN2','B','ACCION');<br />INSERT INTO PELICULAS VALUES (00003,'TRANSPORTADOR','B','ACCION');<br />INSERT INTO PELICULAS VALUES (00004,'TRANSPORTADOR2','B','ACCION');<br />INSERT INTO PELICULAS VALUES (00005,'TRANSPORTADOR3','B','ACCION');<br />INSERT INTO PELICULAS VALUES (00006,'SCARY MOVIE1','B15','COMEDIA');<br />INSERT INTO PELICULAS VALUES (00007,'SCARY MOVIE2','B15','COMEDIA');<br />INSERT INTO PELICULAS VALUES (00008,'SCARY MOVIE3','B15','COMEDIA');<br />INSERT INTO PELICULAS VALUES (00009,'SCARY MOVIE4','B15','COMEDIA');<br />INSERT INTO PELICULAS VALUES (00011,'SHREK4','A','COMEDIA');<br />INSERT INTO PELICULAS VALUES (00012,'NOTEBOOK','A','ROMANTICA');<br />INSERT INTO PELICULAS VALUES (00013,'HARRY POTTER6','A','CIENCIA FICCION');<br />INSERT INTO PELICULAS VALUES (00014,'AVATAR','A','CIENCIA FICCION');<br />*SALAS<br />AMERICAS<br />INSERT INTO SALAS VALUES (10001,'1','200','20001');<br />INSERT INTO SALAS VALUES (10002,'2','200','20001');<br />INSERT INTO SALAS VALUES (10003,'3','200','20001');<br />INSERT INTO SALAS VALUES (10004,'4','200','20001');<br />INSERT INTO SALAS VALUES (10005,'5','200','20001');<br />INSERT INTO SALAS VALUES (10006,'6','200','20001');<br />INSERT INTO SALAS VALUES (10007,'7','200','20001');<br />INSERT INTO SALAS VALUES (10008,'8','200','20001');<br />INSERT INTO SALAS VALUES (10009,'9','200','20001');<br />INSERT INTO SALAS VALUES (10010,'10','200','20001');<br />INSERT INTO SALAS VALUES (10011,'11','200','20001');<br />INSERT INTO SALAS VALUES (10012,'12','200','20001');<br />INSERT INTO SALAS VALUES (10013,'13','200','20001');<br />INSERT INTO SALAS VALUES (10014,'14','200','20001');<br />BRISAS<br />INSERT INTO SALAS VALUES (10201,'1','200','20002');<br />INSERT INTO SALAS VALUES (10202,'2','200','20002');<br />INSERT INTO SALAS VALUES (10203,'3','200','20002');<br />INSERT INTO SALAS VALUES (10204,'4','200','20002');<br />INSERT INTO SALAS VALUES (10205,'5','200','20002');<br />INSERT INTO SALAS VALUES (10206,'6','200','20002');<br />INSERT INTO SALAS VALUES (10207,'7','200','20002');<br />INSERT INTO SALAS VALUES (10208,'8','200','20002');<br />INSERT INTO SALAS VALUES (10209,'9','200','20002');<br />CINE<br />INSERT INTO CINE VALUES (20001,'CINEPOLIS AMERICAS','BOCA DEL RIO','VERACRUZ');<br />INSERT INTO CINE VALUES (20002,'CINEPOLIS BRISAS','VERACRUZ','VERACRUZ');<br />HORARIO<br />INSERT INTO HORARIO VALUES (30001,'10001','00001','12:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30002,'10001','00001','1:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30003,'10001','00001','12:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30004,'10001','00001','12:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30005,'10001','00001','12:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30006,'10001','00001','12:10','02/06/2010');<br />INSERT INTO HORARIO VALUES (30007,'10001','00001','12:10','02/06/2010');<br />*CONSULTAS<br />SELECT NOMBRE,GENERO FROM PELICULAS<br />ORDER BY GENERO;<br />SELECT NOMBRE,CIUDAD FROM PELICULAS,CINE<br />WHERE SALAS.IDSALAS=CINE.IDSALAS AND <br />PELICULAS.IDPELICULA=SALAS.IDPELICULA AND<br />PELICULAS.GENERO='COMEDIA';<br />DIAGRAMA ENTIDAD – RELACION<br />