(4 Marks) Assgnment 3, Create, Alter, Insert, SELECT
(4 Marks) Assgnment 3, Create, Alter, Insert, SELECT
1. Students Table
• Create a table named Students.
• This table should have columns for:
• A student ID as the primary key
• First name
• Last name
• Birthdate
• Class (e.g., 10A, 10B, etc.)
2. Teachers Table
• Create a table named Teachers.
• This table should have columns for:
• A teacher ID as the primary key
• First name
• Last name
• Subject they teach
3. Subjects Table
• Create a table named Subjects.
• This table should have columns for:
• A subject ID as the primary key
• Subject name
• Associated teacher ID (as a foreign key)
4. Classrooms Table
• Create a table named Classrooms.
• This table should have columns for:
• A classroom ID as the primary key
• Room number
• Capacity (number of students)
5. Enrollments Table
• Create a table named Enrollments.
• This table should link students to subjects.
• It should have columns for:
• An enrollment ID as the primary key
• Student ID (as a foreign key)
• Subject ID (as a foreign key)
Page 1 of 3
SQL: Assignment 3
Page 2 of 3
SQL: Assignment 3
Page 3 of 3