Está en la página 1de 1

Creacin de objetos tipo Tabla:

CREATE TABLE nombre_tabla( campo1 tipodato1, campo2 tipodato2


campoN tipodatoN,
CONSTRAINT clave PRIMARY KEY(campo));
CREATE TABLE datos_alumnos(
rut_alu text(10),
nombres text(20),
apellidop text(15),
Apellidom text(15),
direccion text(20),
ciudad text(10),
CONSTRAINT clave_alu PRIMARY KEY(rut_alu));
CREATE TABLE datos_profesores(
rut_prof text(10),
nombres text(20),
apellido1 text(15),
Apellido2 text(15),
direccion text(20),
ciudad text(10),
CONSTRAINT clave_dp PRIMARY KEY(rut_prof));
CREATE TABLE desc_asig(
cod text(5),
nombre_asig text(15),
semestre number,
tipo text(10),
CONSTRAINT clave_da PRIMARY KEY(cod));
CREATE TABLE asignaturas_imp(
rut text(10),
cod_asig text(5),
cant_alum number,
CONSTRAINT clave_ai PRIMARY KEY(rut, cod_asig));
CREATE TABLE notas_alu(
rut_alu text(10),
cod_asig text(5),
n1 number,
N2 number,
N3 number,
CONSTRAINT clave_nu PRIMARY KEY(rut_alu, cod_asig));

También podría gustarte