Page 456 - Computer_Science_F5
P. 456
and Alternate keys) in a relational (b) Foreign key: An attribute that
database by examining the student creates a relationship between two
registration and results tables in your tables.
school. (c) Candidate key: A set of attributes
that can uniquely identify a row in Chapter Eight: Databases and Database Management Systems
FOR ONLINE READING ONLY
Materials: a table.
Database Management System (d) Alternate key: Candidate keys that
(DBMS) Software (Such as MySQL, are not chosen as the primary key.
PostgreSQL, or SQLite ); Access Step 3: Illustrate the Keys using
to Student registration and results diagram
tables from your school’s database (a) Draw a diagram to show the
or a sample dataset provided for the relationship between the Student
activity; Diagramming Tool (such as Registration and Student Results
Lucidchart, Draw.io, or even a pen and tables.
paper to create visual representations (b) Indicate the Primary, Foreign,
of the tables and their relationships); Candidate, and Alternate keys.
Sample Data or Dataset (gather or
simulate sample data for student Deliverables:
registration and results tables). Write a brief report on the relational
database keys identified from your
Instructions: school databases, including the
Consider the related tables of student screenshots. Document your findings
registration and results in your school. in a portfolio.
Identify and illustrate them with a
diagram. Selection and projection
Selection and projection operations are
Step 1: Examine the tables basic and most used operations specific
(a) Student registration table: This to relational databases. The selection is
table contains information about defined as taking the horizontal subset
the students. of rows of a single table that satisfies a
(b) Student results table: This table particular condition. It retrieves tuples
contains information about the from a relation, limiting the results to
students’ results. only those that meet a specific criterion.
Selection answers the question: which
Step 2: Identify the Keys rows shall the query return (where
condition)? For example, `Select *
(a) Primary key: The unique identifier From emp Where deptno = 10` as
for each row in a table.
shown in Figure 8.11.
447
Student’s Book Form Five
Computer Science Form 5.indd 447 23/07/2024 12:34

