Last active
January 11, 2023 07:58
-
-
Save adriasir123/7115290af0d999c35f9315b788adb3d9 to your computer and use it in GitHub Desktop.
Script para la generación de tablas y poblado de datos usado en el exámen de base de datos de las prácticas 3 y 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE ALUMNOS | |
( | |
DNI VARCHAR2(10) NOT NULL, | |
APENOM VARCHAR2(36), | |
DIREC VARCHAR2(30), | |
POBLA VARCHAR2(15), | |
TELEF VARCHAR2(10) | |
); | |
CREATE TABLE ASIGNATURAS | |
( | |
COD NUMBER(2) NOT NULL, | |
NOMBRE VARCHAR2(26), | |
CURSO NUMBER(1) | |
); | |
CREATE TABLE NOTAS | |
( | |
DNI VARCHAR2(10) NOT NULL, | |
COD NUMBER(2) NOT NULL, | |
NOTA NUMBER(2) | |
); | |
INSERT INTO ASIGNATURAS VALUES (1,'Prog. Leng. Estr.',1); | |
INSERT INTO ASIGNATURAS VALUES (2,'Sist. Informaticos',1); | |
INSERT INTO ASIGNATURAS VALUES (3,'Analisis',1); | |
INSERT INTO ASIGNATURAS VALUES (4,'FOL',2); | |
INSERT INTO ASIGNATURAS VALUES (5,'RET',2); | |
INSERT INTO ASIGNATURAS VALUES (6,'Entornos Graficos',2); | |
INSERT INTO ASIGNATURAS VALUES (7,'Aplic. Entornos 4Gen',2); | |
INSERT INTO ALUMNOS VALUES | |
('12344345','Alcalde Garcia, Elena', 'C/Las Matas, 24','Madrid','917766545'); | |
INSERT INTO ALUMNOS VALUES | |
('4448242','Cerrato Vela, Luis', 'C/Mina 28 - 3A', 'Madrid','916566545'); | |
INSERT INTO ALUMNOS VALUES | |
('56882942','Diaz Fernandez, Maria', 'C/Luis Vives 25', 'Mostoles','915577545'); | |
INSERT INTO NOTAS VALUES('12344345', 1,6); | |
INSERT INTO NOTAS VALUES('12344345', 2,5); | |
INSERT INTO NOTAS VALUES('12344345', 3,6); | |
INSERT INTO NOTAS VALUES('4448242', 4,6); | |
INSERT INTO NOTAS VALUES('4448242', 5,8); | |
INSERT INTO NOTAS VALUES('4448242', 6,4); | |
INSERT INTO NOTAS VALUES('4448242', 7,5); | |
INSERT INTO NOTAS VALUES('56882942', 4,8); | |
INSERT INTO NOTAS VALUES('56882942', 5,7); | |
INSERT INTO NOTAS VALUES('56882942', 6,8); | |
INSERT INTO NOTAS VALUES('56882942', 7,9); | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment