-
-
Save parzibyte/c70988c6a958718766adfc7264ff8f58 to your computer and use it in GitHub Desktop.
This file contains 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 estudiantes( | |
id bigint unsigned not null primary key auto_increment, | |
nombre varchar(255) not null, | |
grupo varchar(255) not null | |
); | |
CREATE TABLE materias( | |
id bigint unsigned not null primary key auto_increment, | |
nombre varchar(255) not null | |
); | |
CREATE TABLE notas_estudiantes_materias( | |
id bigint unsigned not null primary key auto_increment, | |
id_estudiante bigint unsigned not null, | |
id_materia bigint unsigned not null, | |
puntaje decimal(9,2) not null, | |
foreign key (id_estudiante) references estudiantes(id) on delete cascade on update cascade, | |
foreign key (id_materia) references materias(id) on delete cascade on update cascade | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment