Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Examen estructuras de datos
1. use Libros; create table AUTOR ( IDENTIFICACION int ,
NOMBRE nchar(80), FEC_NACIMIENTO datetime,
NACIONALIDAD nchar(60), constraint PK_AUTOR primary key
(IDENTIFICACION) ); create table LIBRO ( NUMERO int
constraint PK_LIBRO primary key, TITULO nchar(80)
unique, EDITORIAL nchar(60), AREA
nchar(50), PRECIO numeric(8,2) default 0, ); create
table LIBRO_AUTOR ( NUM_LIBRO int not
null, ID_AUTOR int not null,
constraint PK_LIBRO_AUTOR primary key (NUM_LIBRO, ID_AUTOR) ); alter
table LIBRO_AUTOR add constraint FK_LIBRO foreign key (NUM_LIBRO)
references LIBRO (NUMERO); alter table LIBRO_AUTOR add constraint
FK_AUTOR foreign key (ID_AUTOR) references AUTOR (IDENTIFICACION);
-- Insertar datos de Autor insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (123,'Carlos
Fallas','19090121','Costarricense'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (124,'Carmen
Lyra','19490514','Costarricense'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (125,'Paulo
Coelho','19470824','Brasile�o'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (126,'J.R.R
Tolkien','18920103','Britanico'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (127,'J.K
Rolling','19650731','Britanico'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (128,'Gabriel
Garcia Marquez','19270306','Colombiano'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (129,'Herbet
George Wells','18660921','Britanico'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (130,'Alex
Rovira Celma','19690301','Espa�ol'); insert into AUTOR
(identificacion,nombre,fec_nacimiento,nacionalidad) values (131,'Frances
Miralles Contijoch','19680827','Espa�ol'); -- Insertar datos de Libros
insert into LIBRO (numero,titulo,editorial,area,precio) values
(1,'Mamita Yunai', 'Editorial Soley y Valverde','Novela',25000); insert
into LIBRO (numero,titulo,editorial,area,precio) values (2,'Marcos
Ramirez', 'Imprenta Falco','Novela',18000); insert into LIBRO
(numero,titulo,editorial,area,precio) values (3,'El Alquimista',
'Imprenta Falco','Novela',15000); insert into LIBRO
(numero,titulo,editorial,area,precio) values (4,'Cuentos de Mi Tia
Panchita', 'Imprenta Nacional','Cuentos',7800); insert into LIBRO
(numero,titulo,editorial,area,precio) values (5,'El Senor de los
Anillos: Comunidad del Anillo', 'Minotauro','Fantasia',32000); insert
into LIBRO (numero,titulo,editorial,area,precio) values (6,'Harry Potter
y la Piedra Filosofal', 'Boomsbuury','Fantasia',45000); insert into
LIBRO (numero,titulo,editorial,area,precio) values (7,'Harry Potter y la
Camara Secreta', 'Boomsbuury','Fantasia',42000); insert into LIBRO
(numero,titulo,editorial,area,precio) values (8,'La Guerra de los
Mundos', 'Heinermann','Ficcion',12000); insert into LIBRO
(numero,titulo,editorial,area,precio) values (9,'Cronica de una muerte
anunciada', 'La Oveja Negra','Novela',23000); insert into LIBRO
(numero,titulo,editorial,area,precio) values (10,'La Ultima Respuesta',
'Plaza y Janes','Novela',6500); insert into LIBRO_AUTOR
(num_libro,id_autor) values (1,123); insert into LIBRO_AUTOR
(num_libro,id_autor) values (2,123); insert into LIBRO_AUTOR
(num_libro,id_autor) values (3,125); insert into LIBRO_AUTOR
(num_libro,id_autor) values (4,124); insert into LIBRO_AUTOR
2. (num_libro,id_autor) values (5,126); insert into LIBRO_AUTOR
(num_libro,id_autor) values (6,127); insert into LIBRO_AUTOR
(num_libro,id_autor) values (7,127); insert into LIBRO_AUTOR
(num_libro,id_autor) values (8,129); insert into LIBRO_AUTOR
(num_libro,id_autor) values (9,128); insert into LIBRO_AUTOR
(num_libro,id_autor) values (10,130); insert into LIBRO_AUTOR
(num_libro,id_autor) values (10,131);