Created
May 25, 2022 03:51
-
-
Save israel-gs/ba144260fb59e474f7c3588f542e6a4e to your computer and use it in GitHub Desktop.
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 schema test; | |
| create table profesor | |
| ( | |
| facNo char(11) not null, | |
| facPrimerNombre varchar(30) null, | |
| fecApellidos varchar(30) null, | |
| facCiudad varchar(30) null, | |
| facEstado char(2) null, | |
| facCodigoPostal char(4) null, | |
| facRanking char(4) null, | |
| facFechaContrato date null, | |
| facSueldo decimal(10, 2) null, | |
| facSupervisor char(11) null, | |
| facDept char(6) null, | |
| constraint profesor_pk | |
| primary key (facNo) | |
| ); | |
| create table curso | |
| ( | |
| crsNo char(6) not null, | |
| crsDesc varchar(50) null, | |
| crsCreditos int null, | |
| constraint curso_pk | |
| primary key (crsNo) | |
| ); | |
| create table estudiante | |
| ( | |
| stdNo char(11) not null, | |
| stdPrimerNombre varchar(30) null, | |
| stdApellidos varchar(30) null, | |
| stdCiudad varchar(30) null, | |
| stdEstado char(2) null, | |
| stdCodigoPostal char(10) null, | |
| stdMayor char(6) null, | |
| stdClase char(2) null, | |
| stdGPA decimal(3, 2) null, | |
| constraint estudiante_pk | |
| primary key (stdNo) | |
| ); | |
| create table ofrecidos | |
| ( | |
| offNo int not null, | |
| crsNo char(6) null, | |
| offTerm char(6) null, | |
| offAnio int null, | |
| offUbicacion varchar(30) null, | |
| offTiempo varchar(10) null, | |
| facNo char(11) null, | |
| offDias char(4) null, | |
| constraint ofrecidos_pk | |
| primary key (offNo), | |
| constraint ofrecidos_curso_CursoNo_fk | |
| foreign key (crsNo) references curso (crsNo), | |
| constraint ofrecidos_profesor_FacNo_fk | |
| foreign key (facNo) references profesor (facNo) | |
| ); | |
| create table inscripcion | |
| ( | |
| offNo int null, | |
| stdNo char(11) null, | |
| enrNotas decimal(3, 2) null, | |
| constraint inscripcion_ofrecidos_offNo_fk | |
| foreign key (offNo) references ofrecidos (offNo), | |
| constraint inscripcion_estudiante_stdNo_fk | |
| foreign key (stdNo) references estudiante (stdNo) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment