Q1.
Database Concepts
(Total: 9 marks)
(a) Define a flat file database. (2 marks)
(b) State two limitations of flat file databases. (2 marks)
(c) Explain how a relational database overcomes one of these limitations. (5 marks)
Q2. Relational Databases
(Total: 9 marks)
(a) Define the term relation in a relational database. (2 marks)
(b) Explain the difference between a tuple and an attribute. (3 marks)
(c) Consider the table STUDENT(StudentID, Name, Age, ClassID). Identify the primary
key and foreign key, if any. (4 marks)
Q3. Keys in a Database
(Total: 9 marks)
(a) Define a candidate key. (2 marks)
(b) Explain the difference between a primary key and a foreign key. (3 marks)
(c) Consider the relation EMPLOYEE(EmpID, Name, Email, DeptID).
If EmpID and Email are both unique, list the candidate keys. (2 marks)
Identify a possible foreign key in this table. (2 marks)
Q4. Normalisation
(Total: 9 marks)
(a) State the purpose of normalisation. (2 marks)
(b) Define First Normal Form (1NF). (2 marks)
(c) The table below is in UNF (Unnormalised Form):
OrderID CustomerName Items
101 John Smith Chair, Table
102 Mary Jones Sofa
Convert it into 1NF. (5 marks)
Q5. SQL (Structured Query Language)
(Total: 9 marks)
(a) Write an SQL query to create a table called PRODUCT with attributes ProductID (integer,
primary key) and ProductName (text). (3 marks)
(b) Write an SQL query to insert a new record into PRODUCT with ProductID = 101 and
ProductName = 'Laptop'. (2 marks)
(c) Write an SQL query to select all products where the name contains 'Phone'. (4 marks)
Q6. Database Management System (DBMS)
(Total: 9 marks)
(a) Define Database Management System (DBMS). (2 marks)
(b) List two functions of a DBMS. (2 marks)
(c) Explain how a DBMS ensures data security. (5 marks)
Q7. Indexing
(Total: 9 marks)
(a) Define indexing in a database. (2 marks)
(b) Explain how indexing improves search performance. (3 marks)
(c) Consider a table with 100,000 records. Without indexing, searching takes 5 seconds.
With indexing, it takes 1 second. Explain why this happens. (4 marks)
Q8. Entity-Relationship Diagrams (ERD)
(Total: 9 marks)
(a) Define an entity in a database. (2 marks)
(b) Describe a one-to-many relationship with an example. (3 marks)
(c) Given entities STUDENT(StudentID, Name, ClassID) and CLASS(ClassID,
ClassName), draw an ER diagram showing the relationship. (4 marks)