Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Continue this part on your database at home please Study the ERD below and write

ID: 3883293 • Letter: C

Question

Continue this part on your database at home please

Study the ERD below and write SQL DDL commands to create the DEPARTMENTS, PROFESSORS, CLASSES, STUDENTS, PROFESSORS_CLASSES and STUDENT_CLASSES tables. Use the most appropriate datatype you think will suite each column.
Good Luck, work hard, Practice, Practice, Practice!

Study the ERD below and write SQL DDL commands to create the DEPARTMENTS, PROFESSORS, CLASSES, STUDENTS, PROFESSORS_CLASSES and STUDENT_CLASSES tables. Use the most appropriate datatype you think will suite each column.
Good Luck, work hard, Practice, Practice, Practice!

depaitments code name college professors students classes ssn ssn first_name middle_name last_name position department (FK) class_code name credits department (FK) first_name middle_name last_name major (FK professors_classes students classes professor (FK) class (FK) semester student (FK) class (FK) semester grade

Explanation / Answer

Here are the SQL DDL commands

CREATE TABLE `DEPARTMENTS` ( `code` INT NOT NULL , `name` VARCHAR(50) NOT NULL , `college` VARCHAR(50) NOT NULL ,    PRIMARY KEY (`code`));

CREATE TABLE `PROFESSORS` ( `ssn` INT NOT NULL , `first_name` VARCHAR(50) NOT NULL , `middle_name` VARCHAR(50) NOT NULL ,`last_name` VARCHAR(50) NOT NULL ,   `position` VARCHAR(50) NOT NULL ,`department` INT NOT NULL ,     PRIMARY KEY (`ssn`));

CREATE TABLE `CLASSES` ( `class_code` INT NOT NULL , `name` VARCHAR(50) NOT NULL , `credits` VARCHAR(50) NOT NULL , `department` INT NOT NULL ,    PRIMARY KEY (`class_code`),    UNIQUE (`department`));

CREATE TABLE `STUDENTS` ( `ssn` INT NOT NULL , `first_name` VARCHAR(50) NOT NULL , `middle_name` VARCHAR(50) NOT NULL ,`last_name` VARCHAR(50) NOT NULL ,`major` INT NOT NULL ,     PRIMARY KEY (`ssn`), UNIQUE (`major`));

CREATE TABLE `PROFESSORS_CLASSES` ( `professor` INT NOT NULL , `class` INT NOT NULL , `cemester` VARCHAR(50) NOT NULL ,    UNIQUE (`professor`),    UNIQUE (`class`));

CREATE TABLE `STUDENT_CLASSES` ( `student` INT NOT NULL , `class` INT NOT NULL , `cemester` VARCHAR(50) NOT NULL , `grade` VARCHAR(5) NOT NULL ,    UNIQUE (`student`),    UNIQUE (`class`));

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote