|
|||
ALTER TABLE ONLY DepartmentsALTER TABLE ONLY "Departments" ADD CONSTRAINT pk_department PRIMARY KEY ("idDepartment");
-- -- TOC entry 1851 (class 2606 OID 16441) -- Name: pk_mark; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Marks" ADD CONSTRAINT pk_mark PRIMARY KEY ("idMark");
-- -- TOC entry 1863 (class 2606 OID 16435) -- Name: pk_results; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Results" ADD CONSTRAINT pk_results PRIMARY KEY ("idStudent", "idTeacher", "idSubject", "NumSemestr");
-- -- TOC entry 1859 (class 2606 OID 16422) -- Name: pk_sessions; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Sessions" ADD CONSTRAINT pk_sessions PRIMARY KEY ("NumGroup", "NumSemestr", "idSubject", "idTeacher");
-- -- TOC entry 1861 (class 2606 OID 16430) -- Name: pk_students; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Students" ADD CONSTRAINT pk_students PRIMARY KEY ("idStudent");
-- -- TOC entry 1855 (class 2606 OID 16443) -- Name: pk_subject; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Subjects" ADD CONSTRAINT pk_subject PRIMARY KEY ("idSubject");
-- -- TOC entry 1857 (class 2606 OID 16445) -- Name: pk_teacher; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: --
ALTER TABLE ONLY "Teachers" ADD CONSTRAINT pk_teacher PRIMARY KEY ("idTeacher");
-- -- TOC entry 1864 (class 2606 OID 16446) -- Name: fk_dep_tea; Type: FK CONSTRAINT; Schema: public; Owner: postgres --
ALTER TABLE ONLY "Teachers" ADD CONSTRAINT fk_dep_tea FOREIGN KEY ("idDepartment") REFERENCES "Departments"("idDepartment");
-- -- TOC entry 1867 (class 2606 OID 16461) -- Name: fk_res_stud; Type: FK CONSTRAINT; Schema: public; Owner: postgres --
|
|||
|