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

16-Design-of-Relational-Databases-SAMPLE-A-Level

Teach Computer Science offers affordable resources for teaching computer science to students aged 11-16+, including a free sample module on relational databases and normalisation. The document explains normalisation, its importance in reducing data redundancy, and includes activities, flashcards, and quizzes to aid learning. It encourages upgrading to premium plans for full access to comprehensive teaching materials.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

16-Design-of-Relational-Databases-SAMPLE-A-Level

Teach Computer Science offers affordable resources for teaching computer science to students aged 11-16+, including a free sample module on relational databases and normalisation. The document explains normalisation, its importance in reducing data redundancy, and includes activities, flashcards, and quizzes to aid learning. It encourages upgrading to premium plans for full access to comprehensive teaching materials.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Teach Computer Science

Free Sample
THANK YOU FOR DOWNLOADING THIS FREE SAMPLE RESOURCE!
Here, you’ll find a snippet of the module, which you can use to gauge the quality
of our offering, but will also find super useful in the classroom.

Teach Computer Science is an affordable, high-quality offering for teachers and


students alike whether that’s in the classroom, online, or homeschool
environment. You’ll find everything you need to learn or teach a computer
science subject for students aged 11-14, 14-16, and 16+ following any of the UK
examination boards, or any other curriculum from around the world.

If you want the complete module, which contains classroom presentation,


revision notes, quizzes, mind maps, flashcards, activities and answer keys, then
please upgrade to one of our Premium plans and support our quest to make
education affordable for all.

The Teach Computer Science Team

teachcomputerscience.com
Teach Computer Science
A-Level

Design of
Relational
Databases

teachcomputerscience.com
1.

Revision notes

teachcomputerscience.com
Introduction
In the previous topic, we learnt about the basics of flat file database
and relational database. In this topic, we will learn the various
parameters considered to design a relational database. An important
concept called normalisation is introduced. Normalisation removes
data redundancies and helps us to remove the irregularities in the
database. Maintaining a normalised database is easier. The various
levels of normalisation are explained with examples.

Normalisation
Normalisation is the process of dividing larger tables into smaller
tables such that these smaller tables are related to each other. The
main motive of normalisation is to reduce data redundancy. The basic
rules involved with normalisation are:
• No data is duplicated.
• If data duplication is avoided, consistency of data can be ensured.
As a result, there will no anomalies during data insertion, changes
and deletion.
• Flexible and Proper structure of table: A table must allow a wide
range of number of entries to a table. The structure of table must
allow users to run different types of queries to get result.
There are three different stages of normalisation: first normal form
(1NF), second normal form (2NF) and third normal form (3NF).

teachcomputerscience.com
First Normal Form (1NF)

Student ID StudentName … CourseTitle Grades


M14825 Emily Mathematics, A,
Science, A*,
English, C,
Computer Science A
S391771 Sophie Economics, B,
Business, A*,
English, B,
Computer Science A*
E491001 Marian Chemistry, B,
Biology, A,
English, B,
Geography A

teachcomputerscience.com
2.

Activities

teachcomputerscience.com
Activity-1
Duration: 20 minutes

A. An e-commerce electronic stores maintains a table as given. Each


customer is given a specific identity number named CustomerID.
Along with this ID, the customers’ name and address are also
stored. The products she bought, along with product quantity,
selling price, cost price and suppliers’ details are also stored. A
product can be obtained from different suppliers.

Custom Custom Ad Prod ProductTitle Product Selling Cost SupplierID SupplierN


erID erNam dr uctCo Qty Price Pric ame
e es de e
s

C13945 George …. P129 Vankyo 1 50 20 S582 Taiyu Tech


MatrixPad EU
H871 Sony
headphones JLP e-shop
2 250 120 S373
C39177 Chrysta … A419 Apple iPad 1 450 350 S981 Amazon
H295 Headphones 3 30 12 S941 OneOdioD
irect

A. This table is in unnormalized form. Convert this database into first


normal form (1NF). Specify the entity descriptions.

B. What is the entity relationship diagram at this stage?

teachcomputerscience.com
Activity-1
Duration: 20 minutes

A. An e-commerce electronic store maintains a table as given. Each


customer is given a specific identity number named CustomerID.
Along with this ID, the customers’ name and address are also
stored. The products she bought, along with product quantity,
selling price, cost price and suppliers’ details are also stored. A
product can be obtained from different suppliers.

Custom Custom Ad Prod ProductTitle Product Selling Cost SupplierID SupplierN


erID erNam dr uctCo Qty Price Pric ame
e es de e
s

C13945 George …. P129 Vankyo 1 50 20 S582 Taiyu Tech


MatrixPad EU
H871 Sony
headphones JLP e-shop
2 250 120 S373
C39177 Chrysta … A419 Apple iPad 1 450 350 S981 Amazon
H295 Headphones 3 30 12 S941 OneOdioD
irect

A. This table is in unnormalized form. Convert this database into first


normal form (1NF). Specify the entity descriptions.

Customer (CustomerID, CustomerName, Address)


Product (ProductCode, ProductTitle, ProductQty, SellingPrice,
CostPrice, SupplierID, SupplierName)

B. What is the entity relationship diagram at this stage?

Customer Product

teachcomputerscience.com
Flashcards

The process of dividing


What is larger tables into smaller
tables such that these
normalisation? smaller tables are related to
each other.

A table is said to be in first


What is First Normal Form (1NF) if none
of its attributes are
Normal Form? repeated and there is no
grouping of attributes.

teachcomputerscience.com
Glossary

Attribute A characteristic of an entity.

An organised collection of data which allows


Database users to obtain and process information
according to their requirements.

An object in a system for which the


Entity
information is stored.

A table is said to be in First Normal Form


First Normal Form (1NF) if none of its attributes are repeated
and there is no grouping of attributes.

Flat-file database A database with only one table.

teachcomputerscience.com
Quiz
1. Which of the following is TRUE about normalisation?
A. It is the process of dividing larger tables into smaller
interlinked tables.
B. Reduces data redundancy.
C. It is the process of dividing larger tables into smaller
independent tables.
D. It is the process of removing duplicate entries in a table.

2. In which stage of normalisation are the grouped attributes


converted to individual attributes?
A. First
B. Second
C. Third

3. A table in 1NF and with ……………….. is automatically in second


Normal Form.
A. composite primary key
B. single primary key
C. multiple foreign keys

4. Which of the following is NOT necessarily an attribute of a table


in second Normal Form?
A. No partial dependencies
B. No non-key dependencies
C. No repeated attributes
D. No grouped attributes

teachcomputerscience.com
Teach Computer Science

This resource is licensed under the Creative Commons Attribution-


NonCommercial 4.0 International license.

You are free to:

● Share — copy and redistribute the material in any medium or


format
● Adapt — remix, transform, and build upon the material

Under the following terms:

● Attribution — You must give appropriate credit, provide a link to


the license, and indicate if changes were made. You may do so
in any reasonable manner, but not in any way that suggests the
licensor endorses you or your use.
● NonCommercial — You may not use the material for
commercial purposes.

For more information on this license, visit the following link:

http://creativecommons.org/licenses/by-nc/4.0/

Thank you!

teachcomputerscience.com
Teach Computer Science

Thank you so much for downloading this resource!

We hope it has been useful for you in the classroom and that your
students enjoy the activities.

For more teaching resources like this, don’t forget to come back
and download the new material we add every week!

Thanks for supporting Teach Computer Science. We can provide


teachers with low-cost, high-quality teaching resources because
of our loyal subscribers and hope to serve you for many years to
come.

- The Teach Computer Science Team :)

teachcomputerscience.com

You might also like