Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
92 views10 pages

ITDSA Assignment

This document is an individual assessment coversheet for a student named Sizwe Makgalemele in the Information Technology faculty. It includes a declaration of originality, details about the assessment, and outlines various database-related questions and answers, including entity attributes, relationships, normalization stages, and transactions. Additionally, it provides references related to information systems and relational algebra.

Uploaded by

sizwemakgalemele
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)
92 views10 pages

ITDSA Assignment

This document is an individual assessment coversheet for a student named Sizwe Makgalemele in the Information Technology faculty. It includes a declaration of originality, details about the assessment, and outlines various database-related questions and answers, including entity attributes, relationships, normalization stages, and transactions. Additionally, it provides references related to information systems and relational algebra.

Uploaded by

sizwemakgalemele
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/ 10

Individual Assessment Coversheet

To be attached to the front of the assessment.

Campus: MIDRAND
__________________________________________________________________________
Faculty: INFORMATION TECHNOLOGY
__________________________________________________________________________
Module Code: ITDSA
__________________________________________________________________________
Group: __________________________________________________________________________
Lecturer’s Name:
__________________________________________________________________________
Student Full Name: SIZWE MAKGALEMELE
__________________________________________________________________________
Student Number: EDUV4937848
__________________________________________________________________________

Indicate Yes No
Plagiarism report attached xN

Declaration:
I declare that this assessment is my own original work except for source material explicitly acknowledged. I also declare that
this assessment or any other of my original work related to it has not been previously, or is not being simultaneously, submitted
for this or any other course. I am aware of the AI policy and acknowledge that I have not used any AI technology to generate or
manipulate data, other than as permitted by the assessment instructions. I also declare that I am aware of the Institution’s
policy and regulations on honesty in academic work as set out in the Conditions of Enrolment, and of the disciplinary guidelines
applicable to breaches of such policy and regulations.

Signature SS Makgalemele Date 21-03-2025

Lecturer’s Comments:
Marks Awarded: %

Signature Date

Eduvos (Pty) Ltd. (formerly Pearson Institute of Higher Education) is registered with the Department of Higher Education and Training as a private
higher education institution under the Higher Education Act, 101, of 1997. Registration Certificate number: 2001/HE07/008

Question 1
1.1)
Entity Associated Attributes
Name
Facility FacultyID, FacultyName, RoomCapacity,
MunicipalCode
Room RoomNumber, FacultyID, Category
Municipality MunicipalCode, MunicipalName,
ProvinceCode, Population
Province ProvinceCode, ProvinceName
Activity ActivityID, FacultyID, Category, ActDate
RealActivity Category, ActivityID, RealDescription

1.2)
Facility( Primary Key: FacultyID, Foreign Key: MunicipalCode)
Room( Primary Key: RoomNumber, Foreign Key: FacultyID,
Category)
Municipality( Primary Key: MunicipalCode, Foreign Key:
ProvinceCode)
Province(Primary Key: ProvinceCode)
Activity(Primary Key: ActivityID, Foreign Key:FacultyID,
Category)
RealActivity(Primary Key: Category, Foreign Key: ActivityID)
1.3)
Question 2

2.1)
Relationship entity pair Relationship type
Facility - Facilitate One-to-Many
Facilitate - Activity One-to-Zero or One
Activity - Active One-to-Zero or Many
Active - RealActivity One-to-Many

2.2) Normalization Stages

First Normal Form


All column values are atomic/singular there’s no multi-
tuple values or lists.
All tables have a primary key.
Second Normal Form
Non-key attributes must only depend on the primary
key.
Remove Category from Activity to a separate table.
For Room table the category attribute does not depend
on the primary key, it depends on RealActivity that is
taking place.
Remove category from the Room table.
Third Normal Form
Remove transitive dependencies – nonkey attribute
depend on other nonkey attributes.
For Municipality table – there no such dependencies as
we see MunicipalCode tells us which province the
Municipality is located at. Having a separate table for
Province we remove transitive dependency
(MunicipalCodeProvinceCodeProvinceName)

Forth Normal Form

Eliminate multi-valued dependencies such as in the


Activity table where Category is independent of
FacultyID and they are on same table. Separate these
variables. A new table named ActivityCategory for
ActivityID, Category and composite primary key
(ActivityID, Category)
The Final Relational Schema

Facility( FacultyID (PK) ,MunicipalCode (FK) )


Municipality( MunicipalCode (PK), ProvinceCode (FK) )
Province( ProvinceCode (PK) )
Room( RoomNumber (PK), FacultyID (FK) ,Category)
Activity( ActivityID (PK), FacultyID (FK) )
ActivityCategory (ActivityID (FK) , Category, PRIMARY
KEY (ActivityID, Category)
2.3)

Question 3
3.1)
i) π city,phone(σ name=Mpho Sifiso(Author))

ii) π name,address,phone(σ city=Cape Town(Author))

iii) A = π P_ID(σ page_count>200(Author))

π city,phone(σ P_ID=A(Publisher))

iv) π ISBN,Book_title(σ Category=textbookORCategory=NovelBook(Book))

v) A = π A_ID,Aname,Address,phone(Publisher⋈Book)

σ Category=NovelBook(A)

3.2) a)
Transaction m = read transaction for salary value on the
database
= calculate the gross salary by adding
commission amount
= calculated gross salary is written to the
database
= read the VAT percentile from the database
= calculate the net salary
= lastly write the net salary to the database

Transaction n = read the employee hire date from database


=calculate DaysOfExperience by using hireDate
and current date
=calculate YearsOfExperience using the days of
experience
=write the answer (days of experience) to the
database
=write the years of experience to the database
b) Transaction m steps
= Read the salary
= Read vatPercent
= calculate grossSalary = salary + comm
= write the grossSalary to database
=calculate netSalary = GrossSalary – vatPercent
=write the netSalary to the database

Transaction n steps
= Read the hireDate from database
= DaysOfExperience = CurrentDate – hireDate
= YearsOfExperience = DaysOfExperience / 365
= write DaysOfExperience to database
= write YearsOfExperience to database

3.3) R1 = {40, 60, 50} and R2 = {3, 5, 4}


Expression Minimum Size Maximum Operation Des
Size
R1×R2 6 9
R1∪R2 0 6 Union of
elements in
R1 and R2
R1∩R2 0 3 Intersection of
elements in
R1 and R2
R1−R2 0 6 Items in R1
but not R2
σStudents>50(R1) 1 3 Select from
R1
πStudents(R1) 0 6 Show R1
R1⋈R2 0 9 Join R1 and
R2

References

Information Systems, Data Creation Management and


Utilization by Stefenie Rinderle-Ma and Mathias Weidlich
A relational algebra for SQL by Richard Cyganiak from Digital
Media Systems Labs, September 2005
Equivalence of Relational Algebra and Relational Calculus Query
by Anthony Klug from University of Wisconsum, Madison,
Wisconsun
DiagrammER: A Web Application to Support the Teaching-
Learning Process of Database Courses Through the Creation of
E-R Diagrams https://doi.org/10.3991/ijet.v15i19.14745 Carlos
R. Jaimez-González () , Jazmín Martínez-Samora Universidad
Autónoma Metropolitana, Ciudad de México, México

You might also like