Nov 25

Student Course Instructor based SQL Interview Questions

School based system design is one of most used case to start with any learning application. The typical school based system has four main entities i.e. Student, Instructor, Department and Course

There are number of possibilities that interviewer may ask questions. So here I will show you the detail understanding of School based system.

Database or SQL Interviewer will check your approach to design tables, their relationships and query skills etc.

Full stack developer Interviewer will check above plus Class Design, Entity Framework/ADO.NET,  Repositories, Services Required, Controller Actions and UI presentation using Angular or MVC etc etc..

The typical requirement contains following use cases or requirements

  1. College contains many departments
  2. Each department offers number of courses
  3. Many instructors can work in a department
  4. An instructor can be associated to only one department
  5. One head for each department
  6. Instructor can be head only one department
  7. Instructor take only one course
  8. Student can enroll for any number of courses
  9. Each course can have any number of students (here max 30 student for one course)
  10. Removal of department should also removes the courses and student associated 
  11. Removal of course should also removes the students associated

We will see how the system design should be to answer this question. So let’s start…

Now from above it is clear that there would be four basic entities like student, instructor, department and course. So, first create basic tables like Student, Instructor, Department and Course. I am not going details of all attributes that each entity holds.

CREATE TABLE [dbo].[Course](
       [CourseId] [int] IDENTITY(1,1) NOT NULL,
       [CourseName] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_Course] PRIMARY KEY CLUSTERED
(
       [CourseId] ASC
)
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Department](
       [DepartmentId] [int] IDENTITY(1,1) NOT NULL,
       [DepartmentName] [nvarchar](50) NOT NULL,
       [DepartmentLocation] [nvarchar](50) NOT NULL,
CONSTRAINT [PK_Department] PRIMARY KEY CLUSTERED
(
       [DepartmentId] ASC
)
) ON [PRIMARY]
 
GO

CREATE TABLE [dbo].[Instructor](
       [InstructorId] [int] IDENTITY(1,1) NOT NULL,
       [FirstName] [nvarchar](50) NOT NULL,
       [LastName] [nvarchar](50) NOT NULL,
       [Phone] [nvarchar](50) NULL,
CONSTRAINT [PK_Instructor] PRIMARY KEY CLUSTERED
(
       [InstructorId] ASC
)
) ON [PRIMARY]
 
GO

CREATE TABLE [dbo].[Student](
       [StudentId] [int] IDENTITY(1,1) NOT NULL,
       [FirstName] [nvarchar](50) NOT NULL,
       [LastName] [nvarchar](50) NOT NULL,
       [Phone] [nvarchar](50) NULL,
CONSTRAINT [PK_Student] PRIMARY KEY CLUSTERED
(
       [StudentId] ASC
)
) ON [PRIMARY]
 
GO

Now, each department offers number of courses hence add additional (required/mandatory) column  DepartmentId to course table. This is one to many (1:M) relationship.

ALTER TABLE [dbo].[Course]
ADD DepartmentId INT NOT NULL

If the department is removed then the courses associated with department needs to be remove. So, we need ON DELETE CASCADE relationship between Department and Course table. Let’s add foreign key to DepartmentId in Course table. As the DepartmentId is mandatory in Course table hence add additional CHECK constraint on Course table.

ALTER TABLE [dbo].[Course]  WITH CHECK ADD CONSTRAINT [FK_Course_Department_DepartmentID] FOREIGN KEY([DepartmentID])
REFERENCES [dbo].[Department] ([DepartmentID])
ON DELETE CASCADE
GO
 
ALTER TABLE [dbo].[Course] CHECK CONSTRAINT [FK_Course_Department_DepartmentID]
GO

Instructor can be associated to only one department and instructor is can also be head of the department. So we need InstructorId in Department table. This is one-to-one (1:1) relationship between department and instructor (as a head of department)

ALTER table [Department]
ADD InstructorId INT NULL
GO

Let’s add foreign key to InstructorId in Department table. As the InstructorId is mandatory in Department table hence add additional CHECK constraint on Department table.

ALTER TABLE [dbo].[Department]  WITH CHECK ADD  CONSTRAINT [FK_Department_Instructor_InstructorId] FOREIGN KEY([InstructorId])
REFERENCES [dbo].[Instructor] ([InstructorId])
GO
 
ALTER TABLE [dbo].[Department] CHECK CONSTRAINT [FK_Department_Instructor_InstructorId]
GO

Now each student can enroll to any number of courses. So we need additional table to keep track of mapping between course and students. So, create StudentCourse mapping table. This is many-to-many (M:M) relationship as course can have multiple students enrollment and vice versa.

CREATE TABLE [dbo].[StudentCourse](
       [StudentCourseId] [int] IDENTITY(1,1) NOT NULL,
       [CourseId] [int] NOT NULL,
       [StudentId] [int] NOT NULL,
CONSTRAINT [PK_StudentCourse] PRIMARY KEY CLUSTERED
(
       [StudentCourseId] ASC
)
) ON [PRIMARY]
 
GO

If either course or student is deleted then corresponding record will be deleted from StudentCourse mapping table. Hence we need to add foreign key and ON DELETE CASCADE relationship for both student and course tables. 

ALTER TABLE [dbo].[StudentCourse]  WITH CHECK ADD  CONSTRAINT [FK_StudentCourse_Course_CourseId] FOREIGN KEY([CourseId])
REFERENCES [dbo].[Course] ([CourseId])
ON DELETE CASCADE
GO
 
ALTER TABLE [dbo].[StudentCourse] CHECK CONSTRAINT [FK_StudentCourse_Course_CourseId]
GO
 
ALTER TABLE [dbo].[StudentCourse]  WITH CHECK ADD  CONSTRAINT [FK_StudentCourse_Student_StudentId] FOREIGN KEY([StudentId])
REFERENCES [dbo].[Student] ([StudentId])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[StudentCourse] CHECK CONSTRAINT [FK_StudentCourse_Student_StudentId]
GO

Instructor can take only one course. We need separate table for Course and Instructor mapping. This is one-to-one (1:1) relationship between course and instructor.

CREATE TABLE [dbo].[CourseInstructor](
       [CourseId] [int] NOT NULL,
       [InstructorId] [int] NOT NULL,
CONSTRAINT [PK_CourseInstructor] PRIMARY KEY CLUSTERED
(
       [CourseId] ASC,
       [InstructorId] ASC
)
) ON [PRIMARY]
 
GO

If either Course or Instructor is deleted then corresponding record will be deleted from CourseInstructor mapping table. Hence we need to add foreign key and ON DELETE CASCADE relationship for both Instructor and Course tables. 

ALTER TABLE [dbo].[CourseInstructor]  WITH CHECK ADD  CONSTRAINT [FK_CourseInstructor_Course_CourseId] FOREIGN KEY([CourseId])
REFERENCES [dbo].[Course] ([CourseId])
ON DELETE CASCADE
GO
 
ALTER TABLE [dbo].[CourseInstructor] CHECK CONSTRAINT [FK_CourseInstructor_Course_CourseId]
GO
 
ALTER TABLE [dbo].[CourseInstructor]  WITH CHECK ADD  CONSTRAINT [FK_CourseInstructor_Instructor_InstructorId] FOREIGN KEY([InstructorId])
REFERENCES [dbo].[Instructor] ([InstructorId])
ON DELETE CASCADE
GO
 
ALTER TABLE [dbo].[CourseInstructor] CHECK CONSTRAINT [FK_CourseInstructor_Instructor_InstructorId]
GO

Thats it !! Database table design is over. Let’s generate the database diagram to visualize how tables are related to each other.  

Instructor Course and Student Database

Instructor Course and Student Database

Not lets fill some sample data. Here we will start with Department, Course, Student and Instructor first then insert data into mappings table.

Create Master Data

SET IDENTITY_INSERT [dbo].[Instructor] ON 
GO

INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (1, N'Pat', N'Reynolds')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (2, N'Mathew', N'Alexander')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (3, N'Patty', N'Lambert')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (4, N'Peter', N'Adams')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (5, N'Wilfredo', N'Layne')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (6, N'Carletta', N'Windham')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (7, N'Christiane', N'Sears')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (8, N'Loan', N'Canfield')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (9, N'Dede', N'Bach')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (10, N'Elinor', N'Lemons')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (11, N'Wendolyn', N'Catalano')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (12, N'Efren', N'Coughlin')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (13, N'Victor', N'Kee')
GO
INSERT [dbo].[Instructor] ([InstructorId], [FirstName], [LastName]) 
VALUES (14, N'Frances', N'Crisp')
GO
SET IDENTITY_INSERT [dbo].[Instructor] OFF
GO


SET IDENTITY_INSERT [dbo].[Department] ON 
GO

INSERT [dbo].[Department] ([DepartmentId], [DepartmentName], [DepartmentLocation], [InstructorId]) 
VALUES (1, N'Engineering', N'Building-B1', 1)
GO
INSERT [dbo].[Department] ([DepartmentId], [DepartmentName], [DepartmentLocation], [InstructorId]) 
VALUES (2, N'English', N'Building-B2', 2)
GO
INSERT [dbo].[Department] ([DepartmentId], [DepartmentName], [DepartmentLocation], [InstructorId]) 
VALUES (3, N'Economics', N'Building-B3', 3)
GO
INSERT [dbo].[Department] ([DepartmentId], [DepartmentName], [DepartmentLocation], [InstructorId]) 
VALUES (4, N'Mathematics', N'Building-B4', 4)
GO
INSERT [dbo].[Department] ([DepartmentId], [DepartmentName], [DepartmentLocation], [InstructorId]) 
VALUES (5, N'Geography', N'Building-B5', NULL)
GO
SET IDENTITY_INSERT [dbo].[Department] OFF
GO


SET IDENTITY_INSERT [dbo].[Course] ON 

GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (1, N'Computer Architecture', 1)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (2, N'Chemistery', 1)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (3, N'Modern Physics', 1)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (4, N'Biology', 1)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (5, N'Eassy', 2)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (6, N'Composition', 2)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (7, N'Speaking', 2)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (8, N'Microeconomics', 3)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (9, N'Macroeconomics', 3)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (10, N'Trigonometry', 4)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (11, N'Statistics', 4)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (12, N'Geometry', 4)
GO
INSERT [dbo].[Course] ([CourseId], [CourseName], [DepartmentId]) 
VALUES (13, N'Algebra', 4)
GO
SET IDENTITY_INSERT [dbo].[Course] OFF
GO


SET IDENTITY_INSERT [dbo].[Student] ON 
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (1, N'Corey', N'Sanchez')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (2, N'Eugene', N'Mcdonald')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (3, N'Sheldon', N'Freeman')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (4, N'Melba', N'Bell')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (5, N'Tyrone', N'Chavez')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (6, N'Faith', N'Perkins')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (7, N'Javier', N'Bishop')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (8, N'Tracy', N'Erickson')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (9, N'Alice', N'Jordan')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (10, N'Janice', N'Mason')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (11, N'Evan', N'Mccoy')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (12, N'Wallace', N'Pena')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (13, N'Ian', N'Taylor')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (14, N'Jeffrey', N'Hanson')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName])
VALUES (15, N'Jo', N'Glover')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (16, N'Angelina', N'Wade')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (17, N'Franklin', N'Kelly')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (18, N'Jordan', N'Baldwin')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (19, N'Ken', N'French')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (20, N'Luther', N'Miller')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (21, N'Francis', N'Powers')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (22, N'Meredith', N'Hubbard')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (23, N'Judy', N'Cobb')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (24, N'Lee', N'Santiago')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (25, N'Nathan', N'Johnson')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName])
VALUES (26, N'Jeremy', N'Jimenez')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (27, N'Joey', N'Fernandez')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (28, N'Jessica', N'Hughes')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (29, N'Courtney', N'Nunez')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (30, N'Woodrow', N'Brady')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (31, N'Lowell', N'Abbott')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (32, N'Justin', N'Howell')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (33, N'Sarah', N'Cox')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (34, N'Noel', N'Watts')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (35, N'Grady', N'Farmer')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (36, N'Erica', N'Becker')
GO
INSERT [dbo].[Student] ([StudentId], [FirstName], [LastName]) 
VALUES (37, N'Martin', N'Martin')
GO
SET IDENTITY_INSERT [dbo].[Student] OFF
GO 

Create Transaction Data

INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (1, 1)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (2, 2)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (3, 3)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (4, 4)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (5, 5)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (6, 6)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (7, 7)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (8, 8)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (9, 9)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (10, 10)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (11, 11)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (12, 12)
GO
INSERT [dbo].[CourseInstructor] ([CourseId], [InstructorId]) VALUES (13, 13)
GO

SET IDENTITY_INSERT [dbo].[StudentCourse] ON 

GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (1, 2, 2)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (2, 3, 2)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (3, 2, 3)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (4, 3, 3)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (5, 2, 6)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (6, 4, 6)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (7, 2, 7)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (8, 4, 7)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (9, 2, 8)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (10, 4, 8)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (11, 4, 9)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (12, 4, 10)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (13, 4, 11)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (14, 4, 12)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (15, 6, 12)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (16, 2, 14)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (17, 2, 13)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (18, 6, 13)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (19, 4, 14)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (20, 2, 15)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (21, 2, 16)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (22, 2, 17)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (23, 2, 19)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (24, 6, 20)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (25, 6, 21)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (26, 2, 22)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (27, 4, 22)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (28, 6, 22)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (29, 2, 23)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (30, 4, 23)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (31, 6, 24)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (32, 6, 25)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (33, 5, 26)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (34, 6, 26)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (36, 4, 28)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (37, 5, 28)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (38, 6, 29)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (39, 5, 30)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (40, 6, 30)
GO
INSERT [dbo].[StudentCourse] ([StudentCourseId], [CourseId], [StudentId]) VALUES (41, 6, 27)
GO
SET IDENTITY_INSERT [dbo].[StudentCourse] OFF
GO

In next post we will see the interview queries and their answers.

I hope you enjoyed this post. If you like this post don’t forget to like, share and comment if any.

Leave a Reply