0% found this document useful (0 votes)
19 views

CAT 1 Database Design

The document outlines the differences between conceptual and logical data models, highlighting their purposes, audiences, and levels of detail. It also includes SQL statements for querying a STUDENT table, such as selecting all records, retrieving specific student details based on module, identifying students with marks below 50%, and listing students alongside their exam names. The content provides a clear understanding of data modeling concepts and practical SQL applications.

Uploaded by

rnjagi12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

CAT 1 Database Design

The document outlines the differences between conceptual and logical data models, highlighting their purposes, audiences, and levels of detail. It also includes SQL statements for querying a STUDENT table, such as selecting all records, retrieving specific student details based on module, identifying students with marks below 50%, and listing students alongside their exam names. The content provides a clear understanding of data modeling concepts and practical SQL applications.

Uploaded by

rnjagi12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

NAME: RUTH NJAGI.

REG. NO. 18/01076

CAT 1
Question 1

Explain the difference between a conceptual data model and


a logical data Model (3marks)
a conceptual data model is a representation of the general structure of data required to carry out
business requirements (which means support company processes, record business events, and
track performances) and this independently from any specific software, database management
system or data storage structure.

Logical data model may be considered as a bridge between the conceptual data model (business
view) and the physical data model (developer’s view) and can be used to check whether the
actual implementation truly fulfils the requirements stated into the conceptual model.

Their differences may be, The logical data model is an abstract representation of a possible
implementation, without being bound to any specific implementation, while the conceptual data
model is a high level representation of the business requirements and the connected data sets and
relationships.

Conceptual Data Model Logical Data model

Description A high level model that A more detailed model


shows which data is to be that shows how the
stored and the system will be
relationships among implemented
those data. regardless of the data
platform.
Purpose To provide a big picture To provide structure of
view of what data should the data needed by the
be present in the system. organization.
Focus Data requirements for the Organizing the data
business process. structure to meet the
business needs.
creating a shared
understanding between Quality assurance.
the teams.
Intended audience Business stakeholders, Analytics engineers,
analytics engineers and data architects,
data architects. analysts and designers.
Elements Entities, relationships and Entities, attributes,
key identifiers. primary keys, foreign
keys and relationships.

Level of detail High-level, less detailed. Mid-level, more


detailed than
conceptual.

Question 2

Use the following tables to answer the questions below

a) Write a SQL statement to produce a list of all the records in the STUDENT table.
SQL
SELECT * FROM STUDENT;

This statement will select all the records in the STUDENT table and return them as a
result set.

b) Write a SQL statement to produce the SURNAME, FORENAME and MARK of all students
who took H2. (3marks)

SQL
SELECT SURNAME, FORENAME, MARK
FROM STUDENT
WHERE MODULE = 'H2';

This statement will select the SURNAME, FORENAME, and MARK columns for all
students who took H2.

c) Write a SQL statement to produce a list of SURNAMES of all students who scored less than
50% in any exam. (3 marks)

SQL
SELECT SURNAME
FROM STUDENT
WHERE MARKS < (50 / 100 * MAX(MARKS));

This statement will select the SURNAME column for all students who scored less than
50% in any exam. The MAX() function is used to find the maximum mark in the MARKS
column, and then 50% of that mark is subtracted to find the minimum mark that a student
could have scored and still passed.

d) Write a SQL statement produce a list of all the student SURNAMEs and the EXAM
NAME that each has taken. (3marks)

SQL
SELECT STUDENT.SURNAME, EXAM.EXAM_NAME
FROM STUDENT
INNER JOIN EXAM
ON STUDENT.MODULE = EXAM.MODULE;

This statement will join the STUDENT and EXAM tables on the MODULE column. This
will create a new table that contains the SURNAME and EXAM_NAME columns from
both tables. The result set will show all the students and the exams that they have taken.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy