Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table nivel(cod_nivel varchar(3), nom_nivel varchar(20), duracion int, primary key(cod_nivel));
- create table idioma(cod_idioma varchar(2), nom_idioma varchar(20), precio numeric, cod_nivel varchar(3),
- primary key(cod_idioma), foreign key(cod_nivel) references nivel(cod_nivel));
- create table profesor (legajo int, nombre varchar(20), primary key(legajo));
- create table alumno (dni int, nom_alumno varchar(20),domicilio varchar(20), primary key (dni));
- create table clase (dni int, cod_idioma varchar(3), legajo int, dia date, aula int, primary key(dni,cod_idioma,legajo));
- insert into nivel
- values
- ('BAS','basico',6),
- ('INT','intermedio',3),
- ('AVA','avanzado',2);
- insert into idioma
- values
- ('IN','ingles',1200.00,'AVA'),
- ('FR','frances',1100.00,'INT'),
- ('PO','portugues',1000.00,'BAS'),
- ('AL','aleman',1000,'BAS');
- insert into profesor
- values
- (87,'castro'),
- (88,'ferreyra'),
- (89,'juarez');
- insert into clase
- values
- (111,'IN',87,'25-10-2024',13),
- (222,'PO',88,'26-10-2024',11),
- (111,'FR',89,'26-10-2024',12),
- (444,'IN',87,'28-10-2024',11),
- (333,'AL',89,'28-10-2024',13);
- insert into alumno
- values
- (111,'maria rocha','dom111'),
- (222,'juan perez','dom222'),
- (333,'pedro paz','dom333'),
- (444,'rosa quispe','dom444');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement