The document contains SQL statements that create and define the structure and relationships between tables in a school database. The tables created are for courses, students, class sessions, and student enrollments with foreign keys defined to link the tables together and constrain the data.
The document contains SQL statements that create and define the structure and relationships between tables in a school database. The tables created are for courses, students, class sessions, and student enrollments with foreign keys defined to link the tables together and constrain the data.
The document contains SQL statements that create and define the structure and relationships between tables in a school database. The tables created are for courses, students, class sessions, and student enrollments with foreign keys defined to link the tables together and constrain the data.
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 eTRAINT 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));