Professional Documents
Culture Documents
STUDENT’S NAME
CLASS: TIME: DATE: MARKS:
Teacher’s Name/Signature HOD’s Name/Signature Parents Name/Signature
Multiple Choice Question : For each multiple-choice question, choose the correct option (A,
B, C, D, or E) that best answers the question.
2. Which SQL clause is used to lter the results of a SELECT query? [1]
a. WHERE
b. HAVING
c. GROUP BY
d. ORDER BY
e. FROM
1
fi
fi
Database
Computer Science /Term 2/Semester 1
AY2023-24/JC 1/Database
7. Explain the difference between PRIMARY KEY and FOREIGN KEY in a relational database.
...................................................................................................................................................................
...................................................................................................................................................................
................................................................................................................................................................[2]
8. Explain the difference between DDL and DML, provide example of command for each !
...................................................................................................................................................................
...................................................................................................................................................................
................................................................................................................................................................[3]
9. What is the purpose of the SQL ALTER statement? Provides 1 example of the script
...................................................................................................................................................................
...................................................................................................................................................................
................................................................................................................................................................[2]
2
Database
Computer Science /Term 2/Semester 1
AY2023-24/JC 1/Database
3
fi
fi
Database
Computer Science /Term 2/Semester 1
AY2023-24/JC 1/Database
(c). Complete the table to identify the most appropriate data type for each eld based on the data shown in
the database table, 2018MOV. [2]
(d). Complete the structured to query language (SQL) to return the category number and tittle for all
Comedy movies [2]
4
fi
Database
Computer Science /Term 2/Semester 1
AY2023-24/JC 1/Database
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
.....................................................................................................................................................................[4]