No 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

MID-term DSEB-62. Exam No.

2
Student infomation (ID_Fullname):…………………… ………………………………………………
Give the database as below:

Correct version Current version

1. Find all students registered before 08-01-2020


2. List the names of subjects registered by students
3. Calculate the total number of slots for each subject
4. Which subject will be finished the latest?
5. Which subjects students register to study have the lowest tuition fees.
6. What subjects do students enroll in with the most courses?
7. List the full names of students whose names contain the word "Bảng" and come from Nam Định
8. Find instructors with a birthday in November month and year is 1999
9. Find instructors who teach 2 or more courses.
10. Add Room column to Course table
11. Add constraints the date the instructor registers to teach a course with the default value being the current
date.
12. Try to add the lack of constraint: foreign key for the InstructorRegister by CourseID attribute. It has an
error. Why? Please fix it.

13. Create table Certification (ID primary, StudentID foreign key, Name, Score, Grade).

14. Suppose a relational schema R = (ABCDGH), AD is the key and set of functional dependencies

F = {AD -> C, AD -> B, AD -> GH, G -> BH}

Check out that relation is in 3NF or not? If not decompose it in 3NF (write the answer in sql file using comment
lines).

------------------------------------

Note: Save sql script and name the file by format:

StudentID_Fullname_midterm2.sql and submit it to the classroom

You might also like