You are on page 1of 5

Database

Computer Science /Term 2/Semester 1


AY2023-24/JC 1/Database

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.

1. What is the purpose of database normalization? [1]


a. Decrease data redundancy
b. Simplify the way to share the data
c. Speed up query performance
d. Introduce data duplication
e. Simplify data retrieval

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

3. What is the primary role of DML in a database system? [1]


a. De ne database structure
b. Manipulate data stored in the database
c. Control access to the database
d. Establish relationships between tables
e. Optimize query performance

4. Which of the following is an example of a DDL command in SQL? [1]


a. SELECT
b. UPDATE
c. INSERT
d. ALTER
e. DELETE

1
fi
fi
Database
Computer Science /Term 2/Semester 1
AY2023-24/JC 1/Database

5. What does the SQL command DELETE do? [1]


a. Remove a table from the database
b. Remove a column from a table
c. Remove all data from a table
d. Remove a database
e. Remove a row from a table

Short-Answer Questions: Answer each short-answer question concisely. Provide relevant


information and be clear in your responses. Ensure your answers are legible and directly
address the question prompt.

6. Describe the limitations of a file based approach compared to DBMS approach


...................................................................................................................................................................
...................................................................................................................................................................
................................................................................................................................................................[2]

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

10. A database table 2018MOV, is used to keep a record of movie details.

(a). State the number of records in database table


..................................................................................................................................................................... [1]
(b). (i) Give the name of the eld that would be used for the primary key.
...........................................................................................................................................................[1]
(ii) State the reason for choosing this eld for the primary key
.......................................................................................................................................................... [1]

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

11. Normalized this table to the Third Normal Form (3NF) !

EmployeeID EmployeeName ProjectID ProjectName Department


1 John Elton 101 A IT
1 John Elton 102 B HR
2 Elvis Presley 101 A IT
3 Diana Ingram 103 C Finance

........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
........................................................................................................................................................................
.....................................................................................................................................................................[4]

You might also like