Hawi Atieno
21/07188
DATABASE DESIGN AND DEVELOPMENT BBIT2104
CAT ONE
Question 1
Explain the difference between a conceptual data model and a logical data Model.
The conceptual data model represents high-level, abstract concepts and relationships in the
domain of interest. It focuses on understanding the business requirements and capturing the
essential entities and their relationships without being concerned about implementation
details.
The logical data model translates the conceptual data model into a more detailed
representation that is closer to how the data will be stored and manipulated in the database
system. It focuses on defining the structure of the data in terms of tables, columns, keys,
constraints, and relationships.
Question 2
Use the following tables to answer the questions below
STUDENT TABLE
Surname Forename Module Marks
Sidney Musyoka H4 65
Henry Kariuki H3 45
James Kazembe H4 40
Jordan Sakala H4 56
Eric Thande H3 75
Florence Muamba H2 49
Vera Moki H2 22
Gertrude Bore H3 79
EXAM table
Module Exam name
H1 Project Management
H2 Advanced mathematics
H3 Systems and Networks
H4 Database Fundamentals
H5 Professional issues in IT
a) Write a SQL statement to produce a list of all the records in the STUDENT table.
SELECT*FROM STUDENT;
b) Write a SQL statement to produce the SURNAME, FORENAME and MARK of all
Students who took H2.
SELECT Surname, Forename, Marks
FROM STUDENT
WHERE Module=”H2”;
c) Write a SQL statement to produce a list of SURNAMES of all students who scored less
than 50% in any exam.
SELECT DISTINCT Surname
FROM STUDENT
WHERE Marks<50;
d) Write a SQL statement produce a list of all the student SURNAMEs and the EXAM
NAME that each has taken.
SELECT SURNAME, EXAM NAME
FROM STUDENT
JOIN EXAM on S.MODULE=E.MODULE;