Хелпикс

Главная

Контакты

Случайная статья





PRIMARY KEY (idDepartment). ENGINE = INNODB. AUTO_INCREMENT = 1. CHARACTER SET utf8. COLLATE utf8_general_ci;. PRIMARY KEY (idMark). ENGINE = INNODB. CHARACTER SET utf8. COLLATE utf8_general_ci;. PRIMARY KEY (idStudent). ENGINE = INNODB. AUTO_INCREMENT =



PRIMARY KEY (idDepartment)

)

ENGINE = INNODB

AUTO_INCREMENT = 1

CHARACTER SET utf8

COLLATE utf8_general_ci;

 

--

-- Описание для таблицы marks

--

DROP TABLE IF EXISTS marks; CREATE TABLE marks ( idMark INT(11) NOT NULL, LowBalls INT(11) NOT NULL,

HighBalls INT(11) NOT NULL,

PRIMARY KEY (idMark)

)

ENGINE = INNODB

CHARACTER SET utf8

COLLATE utf8_general_ci;

 

--

-- Описание для таблицы students

--

DROP TABLE IF EXISTS students; CREATE TABLE students (

idStudent INT(11) NOT NULL AUTO_INCREMENT,

FIOStudent VARCHAR(255) NOT NULL,

NumGroup INT(11) NOT NULL,

PRIMARY KEY (idStudent)

)

ENGINE = INNODB

AUTO_INCREMENT = 1

CHARACTER SET utf8

COLLATE utf8_general_ci;

 

--

-- Описание для таблицы subjects

--

DROP TABLE IF EXISTS subjects;

CREATE TABLE subjects (

idSubject INT(11) NOT NULL AUTO_INCREMENT,

TitleSubject VARCHAR(255) NOT NULL,

PRIMARY KEY (idSubject)

)

ENGINE = INNODB

AUTO_INCREMENT = 1

CHARACTER SET utf8

COLLATE utf8_general_ci;

 

--

-- Описание для таблицы teachers

--

DROP TABLE IF EXISTS teachers; CREATE TABLE teachers (

idTeacher INT(11) NOT NULL AUTO_INCREMENT, FIOTeacher VARCHAR(255) NOT NULL, idDepartment INT(11) NOT NULL,

PRIMARY KEY (idTeacher),

CONSTRAINT FK_teachers_departments_idDepartment FOREIGN KEY (idDepartment)

REFERENCES departments(idDepartment) ON DELETE NO ACTION ON UPDATE NO ACTION

)

ENGINE = INNODB

AUTO_INCREMENT = 1

CHARACTER SET utf8

COLLATE utf8_general_ci;

 

--

-- Описание для таблицы results

--

DROP TABLE IF EXISTS results; CREATE TABLE results ( idStudent INT(11) NOT NULL, idSubject INT(11) NOT NULL, idTeacher INT(11) NOT NULL, DateExam DATETIME NOT NULL,

NumSemestr INT(11) NOT NULL,

Balls INT(11) NOT NULL,

Mark INT(11) NOT NULL,

PRIMARY KEY (idStudent, idSubject, idTeacher, NumSemestr),



  

© helpiks.su При использовании или копировании материалов прямая ссылка на сайт обязательна.