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

Chapter_9_Z-Notes

Uploaded by

Hriday Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Chapter_9_Z-Notes

Uploaded by

Hriday Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Subjects Support us About us Log in Sign up

CAIE IGCSE

Computer Databases
Science
0478 A database is a well-organized compilation of data
that enables individuals to retrieve information
Practical
according to their specific requirements. The data
contained within a database can encompass
Algorithm Design
& Problem- various forms such as text, numerical values,
Solving images, or any other type of digital content that

Programming can be stored on a computer system.

Boolean Logic Why do we need a database?


To store data about people, things, and
Databases
events.
Data types
Any modifications or additions need to be
Basic Data Types
made only once, ensuring data consistency.
Primary Key
All users access and utilize the same set of
SQL - Structured
Query Language data, promoting uniformity.
Relational databases store data in a non-
repetitive manner, eliminating duplication.

What makes a database?


Data is stored in tables in databases. Each
table consists of a specific type of data e.g.
cars. These tables HAVE to be named

according to what they contain e.g. a table


containing patient information will be PATIENT

These tables consist of records (rows). Each


record consists of data about a single entity (a

single item, person or event ) e.g. a single car

These tables also have columns that are


knows an fields. These consist of specific

information regarding the entities that are


written later in records e.g. car name, car

manufacturer etc.

Note: In this chapter, skills of dealing with a


database are also required so working with
Microsoft Access is needed to understand this
Subjects Support us About us
chapter better. You have to be able to define a

single-table database from given data storage


CAIE IGCSE requirements, choose a suitable primary key for a
Computer database table and also be able to read, complete
Science
and understand SQL scripts.
0478

Practical

Algorithm Design
& Problem-
Solving
Source: Cambridge IGCSE and O Level Computer
Programming Science by Hodder Education

Boolean Logic Validation in databases


Databases Database management software

Data types automatically provides some validation


Basic Data Types checks, while others need to be set up by the
Primary Key developer during construction.
SQL - Structured For example; The software automatically
Query Language
validates fields like "DateOfAdmission" in the

PATIENT table to ensure data input is a valid

date. \n

Basic Data Types


Each field will require a data type to be selected. A

data type classifies how the data is stored,

displayed and the operations that can be


performed on the stored value.

The datatypes for database are quite similar to

original datatypes, however, there are a few

differences.
Note: Access datatype refers to the software
Subjects Support us About us
Microsoft Access which is a DBMS (DataBase

Management System). Here, databases could be


CAIE IGCSE worked upon in practical form
Computer
Science
0478
Primary Key
Practical Each record in a table represents a unique

item, person, or event.


Algorithm Design To ensure reliable identification of these
& Problem-
Solving items, a field called the primary key is

necessary.
Programming
The primary key is a unique field that
Boolean Logic distinguishes each item within the data.

Databases In order to serve as a primary key, a field must

Data types have values that are never repeated within the
Basic Data Types table.
Primary Key An existing field can serve as a primary key if it
SQL - Structured is unique, such as the ISBN in the book table.
Query Language
In cases where all existing fields may contain

repeated data, an additional field, such as

"HospitalNumber," can be added to each


record to serve as the primary key.

Structured Query Language -


SQL
Structured Query Language (SQL) is the
standard language for writing scripts to

retrieve valuable information from databases.


By using SQL, we can learn how to retrieve
and display specific information needed from

a database.
For instance, someone visiting a patient may

only require the ward number and bed


number to locate them in the hospital, while a
consultant may need a list of the names of all
the patients under their care. This can be
Subjects Support us About us
done using SQL

SQL Scripts
CAIE IGCSE
An SQL script is a collection of SQL commands
Computer
that are used to perform a specific task, often
Science
stored in a file for reusability.
0478
To comprehend SQL and interpret the output

Practical of an SQL script, practical experience in


writing SQL scripts is necessary.

Algorithm Design Select Statements:


& Problem-
Solving SELECT (fieldsname)
FROM (tablesname)
Programming
WHERE (condition)

Boolean Logic ORDER BY (sortingcondition) ;

Databases Selecting Sum of values in a table:


Data types
SELECT SUM ( fieldsname )
Basic Data Types
FROM (tablesname)
Primary Key
WHERE (condition)
SQL - Structured
ORDER BY (sortingcondition) ;
Query Language

Counting the number of records where the

field matches a specified condition

SELECT COUNT ( fieldsname )

FROM (tablesname)
WHERE (condition)
ORDER BY (sortingcondition) ;

==ORDER BY Field1, Field2, etc. – this specifies a sort

in ascending or alphabetical order starting with the


first field.==

==ORDER BY Field1, Field2 DESC – this specifies a sort


in descending or reverse alphabetical order starting

with the first field.==

Note: ORDER BY is not necessary to add. It has to be


only added if required!
Subjects Support us About us

CAIE IGCSE

Computer
Science
0478

Practical Operators
Just like pseudocode, the operators used there can
Algorithm Design
also be used here for conditions, however, a few
& Problem-
Solving more are also used in databases

Programming

Boolean Logic

Databases
Data types
Basic Data Types
Primary Key
SQL - Structured Boolean Logic
Query Language

Previous chapter

Recording your students' current level of


understanding will help you recall which chapters
require more attention before exam day.

Add your syllabus progress status.

You might also like