Database Systems Design Marking Guide
Database Systems Design Marking Guide
ChatGPT
a) Database normalization is a process in database design that organizes data in a relational database to
eliminate data redundancy and improve data integrity. It involves breaking down large tables into
smaller related tables, reducing data duplication, and establishing relationships between them. This is
typically done through a series of rules known as normal forms.
b) Database normalization has several normal forms, with the most common ones being 1NF (First
Normal Form), 2NF (Second Normal Form), 3NF (Third Normal Form), and BCNF (Boyce-Codd Normal
Form). Let's discuss these forms with an example:
Imagine a database for a library. A table for books might initially have attributes like (BookID, Title,
Author, Publisher, and ISBN).
1NF: To achieve 1NF, make sure each attribute contains only atomic (indivisible) values. In this case, split
the Author into first name and last name.
2NF: Now, ensure that non-key attributes depend on the entire primary key. Create a new table for
Authors with AuthorID as the primary key and link it to the Books table with AuthorID.
3NF: Remove transitive dependencies. Create a Publishers table with PublisherID as the primary key and
link it to the Books table via PublisherID.
BCNF: Ensure that for every non-trivial functional dependency, the left-hand side is a superkey. In this
case, you might need to further refine the structure based on specific dependencies.
c) Two examples of database anomalies are:
Insertion Anomaly: This occurs when you can't insert a piece of data into the database without also
inserting unrelated data. In the library example, if you can't add a new book without specifying an
author (even if the author is not yet associated with any other book), it's an insertion anomaly.
Update Anomaly: This happens when updating data in the database leads to inconsistencies. For
instance, if you update an author's name in one book entry but forget to update it in other books by the
same author, it creates inconsistency.
Question seven
a)Differentiate between the terms database and database management systems.(05 marks)
b)Create the following table and add the stated data into it: SALES DATA (05 marks)
SALESidSDdateFOODidamountEmployee
name
S00131/5/202313000Ronald
S00231/5/202325000Marvin
S00330/4/202316000Kate
S00430/4/2023210000Jane
END
ChatGPT
network error
https://chat.openai.com/c/4fd8d9bf-1499-46e4-8471-b96acb35a415#:~:text=Question%20six%0Aa,an
%20error%20generating