SECTION B: CONCEPTS
[Marks: 10]
1. Differentiate between DELETE,TRUNCATE, and DROP commands in SQL.
[3 Marks]
2. Explain the difference between a schema and an instance in DBMS?
[2 Marks]
3. You are given the following two tables Product (ProductlD, ProductName, Quantity) and
Customer (CustomerlD, CustomerName, ProductlD}, with ProductlD as a primary key in the
Product table and a foreign key in the Customer table. Write a SQL statement that will
retrieve matched and unmatched rows from the two tables with the following resultant
columns CustomerlD, CustomerName, and ProductName.
[4 Marks]
4. Write an SQL Command that will delete all the rows from the Customer table in Q.3 above
using a DDL Command.
[1 Mark]
SECTION C: COMPREHENSION
[Marks: 40]
1.
Given the following scenario, create an appropriate ER diagram. Include at least 3
attributes and 1 primary Key for each entity. Include the cardinality and relationships. Use Crow's
Foot Notation. Resolve any many to many relationships if necessary.
[15 Marks]
A new private school wants to develop a database system to manage courses, students, and their
registration information. Each student can register for multiple courses and each course can have
multiple students. Each course is taught by one lecturer, but a lecturer can teach multiple
courses.
2.
Given the following table. Normalise the table to 3NF by explaining the different stages of
normalisation. Put some sample data in your tables.
a. What normal form is the table in? Briefly explain why you say it is in that state.
[2 Marks]
b. Normalise the table to third Normal form by briefly explaining what happens at
every stage and specify the normal form of each table with sample data.
[13 Marks]
PatientTreatment
PatientlD
I l I PatientName Treatment
Doctor
I
DoctorPhone
PageI 3