You are required to create the following tables in a database named STUDENT_REGISTRATIONS. Ensure that you create the database and table objects exactly as depicted below. STUDENTS STUDENT_ID VARCHAR(8) NOT NULL PRIMARY KEY STUDENT_NAME VARCHAR(40) NOT NULL STUDENT_SURNAME VARCHAR(40) NOT NULL MODULES MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY MODULE_NAME VARCHAR(40) NOT NULL MODULE_CREDIT SMALLINT NOT NULL STUDENT_MODULES STUDENT_ID VARCHAR(8) NOT NULL PRIMARY KEY FOREIGN KEY REFERENCES STUDENTS(STUDENT_ID) MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY FOREIGN KEY REFERENCES MODULES(MODULE_ID) LECTURERS LECTURER_ID VARCHAR(8) NOT NULL PRIMARY KEY LECTURER_NAME VARCHAR(40) NOT NULL LECTURER_SURNAME VARCHAR(40) NOT NULL LECTURER_MODULES MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY FOREIGN KEY REFERENCES MODULES(MODULE_ID) LECTURER_ID VARCHAR(8) NOT NULL PRIMARY KEY FOREIGN KEY REFERENCES
You are required to create the following tables in a
Ensure that you create the database and table objects exactly as depicted below.
STUDENTS
STUDENT_ID VARCHAR(8) NOT NULL PRIMARY KEY
STUDENT_NAME VARCHAR(40) NOT NULL
STUDENT_SURNAME VARCHAR(40) NOT NULL
MODULES
MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY
MODULE_NAME VARCHAR(40) NOT NULL
MODULE_CREDIT SMALLINT NOT NULL
STUDENT_MODULES
STUDENT_ID VARCHAR(8) NOT NULL PRIMARY KEY
FOREIGN KEY REFERENCES
STUDENTS(STUDENT_ID)
MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY
FOREIGN KEY REFERENCES
MODULES(MODULE_ID)
LECTURERS
LECTURER_ID VARCHAR(8) NOT NULL PRIMARY KEY
LECTURER_NAME VARCHAR(40) NOT NULL
LECTURER_SURNAME VARCHAR(40) NOT NULL
LECTURER_MODULES
MODULE_ID VARCHAR(8) NOT NULL PRIMARY KEY
FOREIGN KEY REFERENCES
MODULES(MODULE_ID)
LECTURER_ID VARCHAR(8) NOT NULL PRIMARY KEY
FOREIGN KEY REFERENCES
Step by step
Solved in 2 steps with 3 images