The document contains SQL statements that create and define the structure of tables for a school database. It creates tables for courses, students, sessions, and enrollments, and defines foreign key relationships between the tables. Primary and composite keys are specified for each table.
The document contains SQL statements that create and define the structure of tables for a school database. It creates tables for courses, students, sessions, and enrollments, and defines foreign key relationships between the tables. Primary and composite keys are specified for each table.
The document contains SQL statements that create and define the structure of tables for a school database. It creates tables for courses, students, sessions, and enrollments, and defines foreign key relationships between the tables. Primary and composite keys are specified for each table.
The document contains SQL statements that create and define the structure of tables for a school database. It creates tables for courses, students, sessions, and enrollments, and defines foreign key relationships between the tables. Primary and composite keys are specified for each table.
cours ADD CONSTRAINT responsable FOREIGN KEY (responsable)
REFERENCES ecole.enseignant (Id_e) ON DELETE NO ACTION ON UPDATE NO ACTION; Create table ecole.ETUDIANT (NumApogee INT PRIMARY KEY not null , nom varchar(45), prenom varchar(45), age INT); Create table ecole.SEANCE (id_s varchar(45) PRIMARY KEY not null, cours varchar(45) not null , NumeroS INT, type varchar(45), date date, salle varchar(5) , heureDebut VARCHAR(20), heureFin VARCHAR(20), enseignant VARCHAR(45) not null); ALTER TABLE ecole.seance ADD INDEX cours_idx (cours ASC) VISIBLE,ADD INDEX enseignant_idx (enseignant ASC) VISIBLE; ALTER TABLE ecole.seance ADD CONSTRAINT cours FOREIGN KEY (cours) REFERENCES ecole.cours (sigle) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT enseignant FOREIGN KEY (enseignant) REFERENCES ecole.enseignant (Id_e) ON DELETE NO ACTION ON UPDATE NO ACTION; Create table ecole.inscription (NumApogee int not null,cours VARCHAR(45)not null); ALTER TABLE ecole.inscription ADD INDEX NumApogee_idx (NumApogee ASC) VISIBLE,ADD INDEX cours_idx (cours ASC) VISIBLE; ALTER TABLE ecole.inscription ADD CONSTRAINT NumApogee FOREIGN KEY (NumApogee) REFERENCES ecole.etudiant (NumApogee) ON DELETE NO ACTION ON UPDATE NO ACTION,ADD CONSTRAINT cours FOREIGN KEY (cours) REFERENCES ecole.cours (sigle) ON DELETE NO ACTION ON UPDATE NO ACTION; Create table ecole.remarques (id_r varchar(45) PRIMARY KEY not null,libelle VARCHAR(45));