0% found this document useful (0 votes)
31 views25 pages

CAIE-As Level-Computer Science - Theory

The document provides a comprehensive overview of the CAIE AS Level Computer Science syllabus, covering topics such as information representation, multimedia, compression, and networking. Key concepts include character encoding standards, bitmap and vector graphics, sound data, and various types of network models. It also discusses cloud computing, comparing public and private clouds, and the importance of networking devices and protocols.

Uploaded by

satwikrawat2904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views25 pages

CAIE-As Level-Computer Science - Theory

The document provides a comprehensive overview of the CAIE AS Level Computer Science syllabus, covering topics such as information representation, multimedia, compression, and networking. Key concepts include character encoding standards, bitmap and vector graphics, sound data, and various types of network models. It also discusses cloud computing, comparing public and private clouds, and the importance of networking devices and protocols.

Uploaded by

satwikrawat2904
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

ZNOTES.

ORG

UPDATED TO 2023-2025 SYLLABUS

CAIE AS LEVEL
COMPUTER SCIENCE
SUMMARIZED NOTES ON THE THEORY SYLLABUS
Prepared for S for personal use only.
CAIE AS LEVEL COMPUTER SCIENCE

1. Information Representation Character Encoding Standards:


ASCII Extended ASCII Unicode
ASCII’s extension - Also Superset for ASCII & extended
1.1. Data Representation
Only the English alphabet can includes most European ASCII - recognized by various
be represented languages’ alphabets global languages
Each character encoding takes ASCII extended to 8 bits, hence It has an excellent range of
up 7 bits, hence 128 possible 256 possible characters characters, using 2 or 4 bytes
The two fundamental characteristics of any number characters per character
2 or 4 times more storage
system are: Smaller storage space space per character
A base: The number of different digits that a system
can use to represent numbers 1.2. Multimedia - Graphics, Sound
Place value: The specific-value of a digit based on its
position within a number Bitmap Images
Denary - Base 10 Definition: Bitmap images are created by assigning a
Binary Systems - Base 2 solid color to each pixel using bit patterns.
Possible bits (binary digits): 0 and 1 Encoding:
All data and characters are represented in binary Bit patterns are generated by considering each
128 64 32 16 8 4 2 1
grid row as a series of binary color codes
0 0 0 0 0 0 0 0 corresponding to each pixel’s color.
These bit patterns are ‘mapped’ onto the main
For example, 65 in binary is 01000001 memory.
Pixels: The smallest picture element whose color can
be accurately represented by binary code.
Denary vs. Binary prefixes:
File Header: Bitmap images contain a file header with
Denary Prefix Factor Value Binary Prefix Factor Value metadata, including image size, number of colors,
kilo- (k) ×103 kibi- (Ki) ×210 etc.
mega- (M) ×106 mebi- (Mi) ×220
giga- (G) ×109 gibi- (Gi) ×230
tera- (T) ×1012 tebi- (Ti) ×240
Image Resolution
Definition: the number of pixels that make up an
image. Example:- 4096x3192 pixels.
Effect: Higher resolution results in sharper, more
detailed images.

Screen Resolution
Definition: The number of pixels that can be viewed
horizontally and vertically on a device’s screen.
Calculation: N umber of pixels = width × height
(e.g., 1680 × 1080 pixels).

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Colour depth Sound


Definition: The number of bits used to represent the Analogue vs Digital:
colour of a single pixel. Analogue data consists of continuous electrical
Calculation: An image with n bits has 2n colours per signals.
pixel (e.g., a 16-color bitmap has 4 bits per pixel Digital data consists of discrete electrical signals.
Sound Signals: Vibrations through a medium,
because 24 = 16)
inherently analogue due to infinite detail.
Effect: Increasing color depth improves color quality
Conversion:
but also increases file size.
Analogue signals are converted to digital signals
File Size Calculation:
by sampling.
File Size = Number of Pixels × Color Depth
The sound wave’s amplitude is sampled at set
Convert bits to bytes by dividing by eight if
time intervals.
necessary.
These samples are encoded as a binary number
Applications: Scanned images and general computer
sequence, providing a digital representation of
usage, where small file sizes and easy manipulation
the sound wave
are beneficial.

Sampling Rate
Vector Graphics
Definition: Number of samples taken per unit of time.
Definition: Made up of drawing objects.
Effect: Increasing the sampling rate improves the
Drawing Objects: Mathematically defined constructs
accuracy of the digitized sound wave representation
(e.g., rectangles, lines, circles).
but increases file size.
Drawing List: A set of commands defining the vector.
Properties: Basic geometric data that determine the
shape and appearance of each object. Sampling Resolution
Encoding: Data is encoded using mathematical Definition: Number of bits used to encode each
formulas to generate properties for drawing lines sample.
and curves to create the image. Effect: Increasing sampling resolution improves the
Scalability: Objects can be resized without losing accuracy of digitized sound waves but increases file
quality, unlike bitmaps. size.
Applications: Company logos and other graphics that
require scaling.
Bit Rate
Definition: Number of bits used to store 1 second of
sound.
Calculation: Bit Rate = Sampling Rate ∗
Sampling Resolution
Length of Sound: Measured in seconds.

1.3. Compression
Definition: Compression is the process of reducing file
size without significant loss in quality, resulting in:
Reduced time needed to search for data.
Faster transfer of compressed files, using less
bandwidth than uncompressed files.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Lossless Compression Networking devices: Interconnected devices that


Definition: A type of compression that allows original enable fast data transmission within a network.
data to be perfectly reconstructed from a Networking benefits:
compressed file by utilizing some form of File sharing: Easily share data between different
replacement. interconnected devices.
Examples: Bitmap (.bmp), vector graphic (.svg), .png Resource sharing: Use network-connected output
images, text file compression, database records. devices like printers or share software within the
Run-Length Encoding (RLE): network.
Definition: A form of lossless compression used Higher storage: Files can be stored in network-
for compressing text files and bitmap images. connected storage mediums.
Mechanism: Reduces file size by encoding Client-Server Model
sequences of adjacent, identical elements Server-based network: A dedicated server provides
(characters in text files and pixels in bitmap applications (administration of users, security, and
images) into two values: run count and run value. resources) for the client computer to utilize.
Example: RLE of a bitmap image. Client-server Applications:
Printer: Manages print jobs from client
computers.
Lossy Compression File Sharing: Clients access software and user
Definition: A type of compression that irreversibly
data files stored on the server.
eliminates unnecessary data.
Proxy server.
Effect: File accuracy/quality is lower than with lossless
Email server: For sending, receiving, and storing
compression, but file size is significantly reduced emails.
(often to about 10% of the lossless size). Database server: Manages DBMS.
Examples: Sound files (.mp3), .jpeg images.
Domain controller server:
Mechanism in Sound Files:
Manages user accounts (IDs & passwords).
Perceptual Coding: Removes parts of the sound
The client sends a login request to the server,
that are less audible or discernible to human which processes and grants the request if the
hearing, as used in .mp3 compression. user ID & password are recognized.

2. Communication Thin Clients


A client that solely runs on the resources
provided by the server and has no local
Thick Clients
An independent client that does not require
the server to run.
storage.
Only provides input and receives output; Thick client processes most of the application
2.1. Networks, including the Internet processing is done by the server.
Smaller purchase cost: inexpensive,
locally.
Can function even if no server is connected
demanding hardware is not required. (works offline).
Improved security: Cannot run unauthorized,
LAN WAN harmful software. No lag related to network problems.
A network that connects devices within a small A network that connects devices within a larger
geographical area, often within the same geographical area, such as a city, country, or
building. globally. Thin Clients vs. Thick Clients
Only private ownership. Private or public ownership.
Transmission medium: Twisted Pair Cables , Transmission medium: PSTN or Satlink.
Peer-to-Peer network model (P2P)
Coaxial Cables or Wi-Fi.
Higher data transfer rate. Lower data transfer rate.
Definition: A decentralized network where each
Less congestion. Higher congestion. connected computer stores data and operates
independently as a ‘peer’, acting as both a client and
a server.
Applications: Internet and Ad hoc networks.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Client-Server Peer-to-Peer Benefits Drawbacks
Centralized backup. Lesser initial setup cost. Can travel over large distances with a Low frequency means less data can be
Lesser network traffic: Each peer can Radio wide range of wavelengths. Relatively transmitted at one time. Affected by
Files & resources centralized in server: waves inexpensive. Used for TV signals and interference from radio stations with
Prevents illegal resource usage. simultaneously receive data from different
sources. mobile phone communications. similar frequencies.
Improved security: Files are stored on a central It can work even if a device goes down, but the Larger bandwidth allows more data Expensive to build emitting towers.
server, which would be regularly scanned for client-server model can’t work if the server Microwaves Physical obstacles can interfere with
transfer. signals.
malware. goes down.
Cost-effective for long-distance
Satellites communication, used in satellite phones Susceptible to interference. Expensive
setup.
Client-Server vs. Peer-to-Peer models and radio broadcasts.

Network Topologies
Wireless Networks
Bus
Use radio waves (including WiFi), microwaves, and
A single line (bus) connects all devices with
satellites to connect devices to networks without
terminators at each end.
cables.
Other computers can read data being sent
between any two computers. Real-time On-demand
Unsuitable for heavy traffic due to frequent The event is captured live via a video camera
that is connected to a computer.
Existing digital files are converted to encoded
bit-streaming format for broadcasting on the
internet by uploading to a dedicated server.
collisions. A link for encoded video is placed on the
Video signal converted to an encoded
Star streaming video signal. website, and the user clicks on the link to view
encoded streaming video.
Consists of a central server (switch) with all other Encoded video signal uploaded from computer The data is streamed to a buffer in the user’s
to a dedicated streaming server via cables or computer, and the buffer stops the video from
computers connected via dedicated connections. high-speed wireless internet connection. being paused as the bits are streamed.
The server then sends live images to all users As the buffer is emptied, it’s filled again, thus
The server can send packets to different devices requesting them as a real-time video. providing continuous viewing.
simultaneously and bidirectionally. It cannot be paused, fast-forwarded, etc. Can be paused, fast-forwarded, etc.

No collisions are possible.


Mesh
Every device (node) is directly interconnected with
each of the other devices (nodes).
Commonly used for wireless networks, such as
the Internet, through the mesh connection of
routers.
Hybrid
A combination of two or more topologies.
Example: A connection between two or more
LANs of different topologies.
Benefits Drawbacks
Less expensive and easier to
Copper Cable install. Flexible. Easier to make Doesn’t perform well with small
terminations. charges. Affected by electromagnetism.
Greater bandwidth, improved security,
Fiber-Optic lightweight, easy to install, and less Needs expensive optical transmitters
Cables signal boosting are required; used in and receivers.
long-distance communications.

Wired Networks
Use copper (twisted-pair cable or coaxial cable) or
fiber-optic cables.
Cables are connected to an Ethernet port on the
network router.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Public cloud Private Cloud
Ethernet Access provided by third-party service
providers, shared among multiple users.
Owned and maintained by a single
organization, providing exclusive access.
The most common wired medium for data Managed by cloud service providers using Can be managed internally by the organization
large server farms. itself, or outsourced.
transmission in LANs or WANs.
Typically used in bus topology; data collisions are Benefits Drawback
managed by the CSMA/CD (Carrier Sense Multiple Less technical knowledge required, easy to
implement.
Cannot access the resources/data stored on
the cloud if there are bandwidth issues.
Access with Collision Detection) method. Flexibility to scale with organization’s growth Poor data privacy, since there may be data
leakage in the multi-tenant architecture (public
CSMA/CD Process: mindset. clouds).
Device checks if the channel is busy before
transmitting.
World Wide Web (WWW):
If busy, the device waits a random time before
Description: Collection of web pages stored on
retrying.
During transmission, the device listens for other websites.
transmissions. Function: Protocols are used to transmit data across
the WWW.
If a collision occurs, transmission is aborted, and
Internet (Interconnected Network):
both devices wait random times before retrying.
Description: Massive, open network of networks.
Bit Streaming
Sequence of digital signals (bits) transferred over a Protocol: Uses TCP/IP protocol, which uses IP
communication path at high speeds, requiring a fast addresses to identify devices connected to the
internet.
broadband connection and buffers.
Access: Provided by Internet Service Provider.
Bit Streaming Types:
Communication Methods: Wired, radio, and
Real-time: Live events captured and transmitted
directly. satellite.
On-demand: Pre-existing files are converted and Router in a Network:
Function: Connects two networks together which
streamed as requested.
operate under the same protocols (for example, IP).
Importance of High Broadband Speed/Bit-Rate
Connections: Allows internal connections between
The user has to download and display bits at the
same time. LANs or external connection from the main LAN to a
Higher quality media requires faster speeds due WAN.
Additional Roles: Acts as a gateway and firewall.
to larger data frames as well.
Setup: Usually attached to a server or switch in a
Real-time streaming needs higher speeds due to
LAN.
simultaneous data requests coming from multiple
different users. IP Address Translation: Translates private IP
addresses to public IP addresses and vice versa.

Cloud Computing
On-demand provision of computing services over the
internet, including infrastructure, and platforms.
Infrastructure: Storage capacity and higher
processing power.
Platform: Software, testing & debugging
resources.

Public cloud vs. Private cloud

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

LAN-Supporting Hardware: Internet-Supporting Hardware:


Switch: Modems:
Connected to all devices in a LAN. Allows a device to connect to the Internet via a
Can simultaneously broadcast information to all telephone line.
devices. Function: A transmitter uses a modem to convert
Server: digital signals (from the transmitting device) to
Device/software that provides specific functions analogue signals sent down the telephone line. A
for computers in the network. receiver uses a modem on the other end to
Network Interface Card (NIC): convert the analogue signals to digital signals so
Provides each device (end-system) in the wired the receiving device can understand the data.
LAN with a unique MAC address to uniquely PSTN (Public Switched Telephone Network):
identify it on the network. Refers to all telephone networks.
Allows each device to connect to the network. Channel: Used between two endpoints for the
Wireless Network Interface Card (WNIC): call duration via circuit switching.
Provides each end-system of a wireless (WiFi) LAN Resilience: Lines are active even during a power
a unique network address to identify it. outage.
Wireless Access Points (WAP): Communication: Bi-directional.
Allows devices to connect to the LAN via WiFi Dedicated Lines:
instead of using a cable. Telecommunication path between endpoints.
Usually built into the router. Not shared with multiple users; it’s
Cables: bought/leased.
A wired transmission medium that allows Function: Able to host websites as well as carry
communication in wired networks. phone calls. Allows continuous, uninterrupted
Bridge: access to the Web.
Connects two LANs which work using the same Cell Phone Network:
protocol, which can be two segments of the same Wireless networks spread over land areas divided
network. into (hexagonal) cells.
Stores network addresses for all devices (end- Base Stations: Each cell is served by at least one
systems) between the two networks. base station (transceiver), which uses a different
Looks for the receiving device before it sends the frequency range compared to adjacent cells to
message. transmit data.
Repeater: Capacity: Larger capacity is possible since the
Connects two cables. same frequencies can be used in non-adjacent
Regenerates the sent data signal over the same cells.
network before the signal weakens (attenuation) Transmission: Radio waves are usually used for
to prevent it from being corrupted. transmission. Can be broadcast in all directions
over a wide area.
Portable Transceivers: Devices like mobile
phones can communicate and access the internet
via base stations.

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
IPv4 IPv6
32-bit address, split into 4 blocks by “.”The 128-bit address is divided into eight 16-bit
blocks by “:” Public and Private IP Addresses:
Each block could have a value between 0 and Each block can have 4 hex values ranging from Public IP:
255 (00 to FF in hex). 0000 to FFFF.
IPv6 can be shortened by removing at least (≥) 2 Provided by the ISP.
blocks containing only zeroes. For example:
For example, 255.0.1.255. “2001:0db8:85a3:0000:0000:8a2e:0070:7334” Unique and can be accessed across the internet.
can be shortened to
“2001:0db8:85a3::8a2e:0070:7334" Private IP:
Issued by the LAN’s router.
IPv4 vs. IPv6 Unique within the LAN and can only be accessed
IPv4 Functionality: within the LAN.
IP Address Structure: NAT (Network Address Translation): Required
Network Identifier (netID): Identifies the for private IP addresses to access the internet
network to which the host (device) is connected. directly.
Host Identifier (hostID): Identifies the host Security: Private IPs are more secure than public
within the network. IPs since they are not directly accessible on the
Classful Addressing: Used for IPv4, where Internet and are hidden by NAT.
different bit lengths for identification impose Address Range: The range of IP addresses used
restrictions on available addresses. for private IP addressing can never be assigned to
Subnetting: public IP addresses.
Definition: The practice of dividing a network into
two or more networks. Static Dynamic
Structure: IP addresses are broken down into IP address never changes. The IP address will change at regular periods.
Static IP addresses are valid when websites Dynamic IP address is relatively more secure,
three parts by not changing the netID but need to remember a device for a long time, e.g
VPNs whitelisting.
hence used where data privacy is quite
important.
partitioning the host ID into a subnet ID and host Faster upload/download speeds. Maintaining the cost of the dynamic IP address
is a lesser.
ID.
Subnet ID: These bits are used to identify Static vs. Dynamic IP addresses
each subnet within the network.
Subnet Masks: Numbers that hide (mask) the
netID of a system's IP address and leave only URL (Uniform Resource Locator)
the host part as the machine identifier, Unique reference address for the exact location of an
allowing data to be routed within the subnet internet resource on the WWW
to the appropriate host. Protocol: Enables the browser to know what protocol is
used to access information in the domain.
Host-name: The domain name.
Location of Server: The path indicating the server
location.
Domain Name Service (DNS)
Definition: A naming system used for computers or
resources having an internet connection.
Structure: Consists of a hierarchy of DNS servers
which have a URL database and their corresponding
IP addresses.

3. Hardware
3.1. Computers and Their Components

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

A general-purpose computer system comprises a Incoming sound waves enter the screen and cause
processor, memory, and I/O functionality. vibrations in the diaphragm
The following essential features are needed in a Vibrations cause the coil to move past a magnetic core
computer - Electrical current is generated, which is then digitized
Input: Takes in data from the outside world.
Output: Displays data for human understanding. Speaker:
Primary Storage: Main memory storing critical
Takes electrical signals and translates them into physical
program instructions and data. vibrations to create sound waves
Secondary Storage: Non-volatile storage for The electric current in the voice coil generates an
noncritical data. electromagnetic field
Removable secondary storage: Change in digital audio signal causes current direction to
File backup and archives
change, which changes field polarity
Portable transfer of files to a second device Electromagnet is either attracted or repelled to a
Embedded systems: permanent magnet, causing a diaphragm that is
Miniature computer systems such as attached to the coil to vibrate
microprocessors that are often a part of a more Vibration transmitted to air in front of the speaker
extensive system.
The degree of vibration determines the amplitude and
Each embedded system performs a few specific frequency of the sound wave produced
functions, unlike general-purpose computers.
Benefits Drawbacks
Magnetic Hard Disk:
Reliable since there are no moving parts Difficult to program functions since there is no
interface Hard disks have platters whose surfaces are covered
Require less power Expensive expert help is needed for the repair
Cheap to mass-produce with a magnetisable material.
Platters are mounted on a central spindle and rotated at
Principle Operations of Hardware Devices high speed
The surface of platters is divided into concentric tracks &
Laser printer: sectors, where data is encoded as magnetic patterns
Each surface is accessed by read/write heads
A laser beam and rotating mirrors are used to draw an When writing, current variation in the head causes
image of the page on a photosensitive drum magnetic field variation on the disk
The image is converted into an electric charge, which When reading, magnetic field variation from the disk
attracts charged toner such that it sticks to the image produces current variation in the read head
Electrostatic-charged paper rolled against the drum
Charge pulls toner away from drum and onto paper Solid State (Flash) Memory:
Heat applied in the fuser to fuse toner to the paper
The electrical charge was removed from the drum, and Most use NAND-based flash memory
excess toner was collected Consist of a grid of columns & rows that has 2 transistors
at each intersection
3D Printer: Two transistors:
Floating Gate: stores electrons, and the presence or
The process starts with a saved digital file that holds the absence of charge (electrons) represents either 1 or 0
blueprint of the object to be printed Control Gate: controls charge (electrons) flow for
The object is then built by sequentially adding layers of a read/write
material (e.g. polymer resin) until the object created
The object is then cured (e.g. resin-made objects are Optical Disc Reader/Writer:
hardened by UV light)

Microphone:

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
PROM EPROM EEPROM
The disc surface has a reflective metal layer and is spun Programmable ROM Erasable Programmable ROM Electrically Erasable
Programmable ROM
The tracking mechanism moves the laser assembly It can be programmed only It can be erased by UV light It can be erased by an
exposure and can then be electrical signal and can then
The lens focuses laser onto the disc once after it is created reprogrammed be reprogrammed
Data cannot be erased or Chip has to be removed for Can update data without
A laser beam shone onto a disc to read/write deleted reprogramming removing the chip.
Tracks have sequences of amorphous and crystalline
states on the metallic layer Monitoring and Control Systems
When reading, the reflected light from the different Monitoring System:
states on the track is encoded as bit patterns Monitors some state external to the computer
When writing, the laser changes surface to crystalline system
and amorphous states along the track, corresponding to No changes were made to the environment by
1s or 0s. the system, and hence, no feedback
Control System:
Touchscreen: Regulates the behaviour of other devices or
systems
Considered as both an input & output device
Event-driven system: the controller alters the
There are two main-types:
system's state in response to some event
Resistive Capacitive Time-driven system, where the controller takes
Consists of two charged plates
Pressure causes plates to touch, completing
Made from materials that store electric charge
When touched, the charge is transferred to the
action at a specific point in time
the circuit finger Hardware typically used in a system:
Point of contact registered with coordinates
used to calculate the position Sensor that measures an (analogue) property and
transmits it to a processing unit, generally as an
Virtual (Reality) Headset: electrical or optical signal
Virtual headsets consist of 2 lenses, (an LCD) display, Actuators that switch on/off heavy appliances
a circuit board with sensors, a cover and foam (e.g. heater to heat/fan to cool)
padding ADC that converts analogue signals to digital
The display provides a simulation of a 3D signals
environment generated by a 3D graphics package Transmission cable to transfer signals
The user can ‘move’ in the virtual environment by Feedback Systems:
moving their head or using controllers Output from the system affects the input of
Buffers: sensors
A queue that temporarily stores data to balance Ensures the system operates within the given
input/output speed of data, while the cache is the criteria
short-term memory storage that stores frequently Enabling the system output to affect subsequent
used data. system inputs may cause a change in the actions
Random Access Memory vs. Read-Only Memory taken by the system
RAM ROM
This enables the system to adjust conditions in a
Volatile memory: loses content when power is Non-volatile memory: does not lose content continuous process automatically
turned off when power is turned off
It can be read and altered It can only be read
Used to store currently executing program Used for storing OS kernel and boot-up
instructions 3.2. Logic Gates and Logic Circuits
Types of RAM - Static RAM vs. Dynamic RAM Logic Gates: use one or more inputs and produce a
single logical output
SRAM DRAM
Doesn’t need to refresh; hence, it uses lessHas to be refreshed; it has slower access times AND gate: If both inputs are high, the output is high
power and faster access time and needs higher power
(A•B)
More complex circuitry, hence more expensive Only a singleexpensive
transistor & capacitor, hence less
to purchase
Each bit is stored in a flip-flop Each bit is stored as a charge
Has lower data density Has higher data density
Used in cache memory Used in main memory

Types of ROM – PROM vs. EPROM vs. EEPROM

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
A B Output A B Output
0 0 0 0 0 1
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 0

OR gate: If either input is high, the output is high (A+B) NOR gate: (A+B)
A B Output
A B Output
0 0 1
0 0 0
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

XOR gate: (A⨁B)


A B Output
0 0 0
0 1 1
NOT gate: an inverter (A) 1
1
0
1
1
0

A Output
1 0
0 1

NAND gate: (A•B) 4. Processor Fundamentals

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Arithmetic and Logic Unit (ALU): part of the processor


4.1. Central Processing Unit (CPU) that processes instructions which require some form of
Architecture arithmetic or logical operation
Control Unit (CU): part of the CPU that fetches
Von Neumann model instructions from memory, decodes them &
synchronizes operations before sending signals to the
Von Neumann realized data & programs are computer’s memory, ALU and I/O devices to direct how
indistinguishable and can, therefore, use the same to respond to instructions sent to the processor
memory. Immediate Access Store (IAS): memory unit that the
Von Neumann's architecture uses a single processor. processor can directly access
It follows a linear sequence of fetch–decode–execute System Clock: a timing device connected to a processor
operations for the set of instructions, i.e. the program. that synchronises all components.
To do this, the processor uses registers.
Buses
Registers
Set of parallel wires that allow the transfer of data
Registers: smallest unit of storage of microprocessor; between components in a computer system
allows fast data transfer between other registers Data bus: bidirectional bus that carries data
General Purpose registers instructions between processor, memory, and I/O
Used to temporarily store data values which have devices.
been read from memory or some processed result Address bus: unidirectional bus that carries the
Assembly language instructions can use it address of the main memory location or input/output
Special Purpose Registers device about to be used, from processor to memory
Some are accessible by assembly language address register (MAR)
instructions Control bus
Only holds either data or memory location, not both Bidirectional
Particular purpose registers include: used to transmit control signals from the control unit
Program Counter (PC): holds the address of the to ensure access/use of data & address buses by
next instruction to be fetched components of the system does not lead to conflict
Memory Data Register (MDR): holds data value
fetched from memory Performance of Computer System Factors
Memory Address Register (MAR): Holds the
address of the memory cell of the program which
is to be accessed
Accumulator (ACC): holds all values that are
processed by arithmetic & logical operations.
Index Register (IX): Stores a number used to
change an address value
Current Instruction Register (CIR): Once program
instruction is fetched, it is stored in CIR and allows
the processor to decode & execute it
Status Register: holds results of comparisons to
decide later for action, intermediate and
erroneous results of arithmetic performed
The Processor (CPU)

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Clock Speed Hardware which provides a physical interface between a


Number of pulses the clock sends out in a given time device with CPU and a peripheral device
interval, which determines the number of cycles Peripheral (I/O) devices cannot be directly connected to
(processes) the CPU executes in a given time interval the CPU, hence connected through ports.
Usually measured in Gigahertz (GHz) Universal Serial Bus (USB): Can connect both input and
If the clock speed is increased, then the execution output devices to the processor through a USB port.
time for instructions decreases. Hence, more cycles High Definition Multimedia Interface (HDMI)
per unit time, which increases performance. Can only connect output devices (e.g. LCD) to the
However, there is a limit on clock speed since the processor through a HDMI port
heat generated by higher clock speeds cannot be HDMI cables transmit high-bandwidth and high-
removed fast enough, which leads to overheating. resolution video & audio streams through HDMI
Bus Width ports
Determines the number of bits that can be Video Graphics Array (VGA)
simultaneously transferred Can only connect output devices (e.g. second
Refers to the number of lines in a bus monitor/display) to the processor through a VGA port
Increasing bus width increases the number of bits VGA ports allow only the transmission of video
transferred simultaneously, increasing processing streams but not audio components
speed and performance.
Cache Memory Fetch-Execute (F-E) cycle
Commonly used instructions are stored in the cache Fetch stage
memory area of the CPU. PC holds the address of the next instruction to be
If the cache memory size is increased, more
fetched
commonly executed instructions can be stored, and The address on the PC is copied to MAR
the need for the CPU to wait for instructions to be PC is incremented
loaded reduces. Hence, the CPU executes more Instruction loaded to MDR from the address held in
cycles per unit of time, thus improving performance. MAR
Number of Cores
Instruction from MDR loaded to CIR
Most CPU chips are multi-core — have more than Decode stage: The opcode and operand parts of
one core (essentially a processor) instruction are identified
Each core simultaneously processes different Execute stage: Instructions executed by the control unit
instructions through multithreading, improving sending control signals
computer performance.
Register Transfer Notation (RTN)
Ports MAR ← [PC]
PC ← [PC] + 1
MDR ← [[MAR]]
CIR ← [MDR]
Decode
Execute
Return to start
Square brackets: value currently in that register
Double square brackets: CPU is getting value stored
at the address in the register

Interrupts

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

A signal from a program seeking the processor’s Assembly language: low-level programming language
attention with instructions made up of an op code and an operand
Handles the interrupt by controlling the processor Machine code: code written in binary that uses the
Different ISRs used for different sources of interrupt processor’s basic machine operations
Relationship between machine and assembly language:
A typical sequence of actions when an interrupt occurs: every assembly language instruction (source code)
The processor checks the interrupt register for translates into exactly one machine code instruction
interrupt at the end of the F-E cycle for the current (object code)
instruction Symbolic addressing
If the interrupt flag is set in the interrupt register, the Symbols used to represent operation codes
interrupt source is detected Labels can be used for addresses
If the interrupt is low priority, then an interrupt is Absolute addressing: a fixed address in memory
disabled Assembler
If interrupting is a high priority: Software that changes assembly language into
All contents of registers of the running process machine code for the processor to understand
are saved on the stack The assembler replaces all mnemonics and labels
PC is loaded with the ISR and is executed with their respective binary values (that are
Once ISR is completed, the processor pops the predefined before by the assembler software)
registers’ contents from the stack, and the One pass assembler
interrupted program continues its execution. Assembler converts mnemonic source code into
Interrupts re-enabled and machine code in one sweep of program
Return to the start of the cycle Cannot handle code that involves forward
referencing
4.2. Assembly Language Two pass assembler: software makes 2 passes thru code
On the first pass:
Symbol table created to enter symbolic addresses
and labels into specific addresses
All errors are suppressed
On the second pass:
Jump instructions access memory addresses via
table
Whole source code translates into machine code
Error reported if they exist
Grouping the Processor’s Instruction Set

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Op Code Operand Explanation
Addressing
LDM #n Immediate: Load n into ACC
Binary numbers can be multiplied or divided by shifting
LDD Direct: load contents at address into the ACC Left shift (LSL #n)
LDI Indirect: load contents of address at given address into
ACC
Bits are shifted to the left to multiply
LDX Indexed: load contents of given address + IR into ACC E.g. to multiply by four, all digits shift two places to
Data Movement
STO Store contents of ACC into address
left
Arithmetic Operations Right shift (LSR #n)
ADD
INC
Add contents of register to ACC
Add 1 to contents of the register
Bits are shifted to the right to divide
Comparing E.g. to divide by four, all digits shift two places to right
CMP
CMP #n
Compare contents of ACC with that of given address
Compare contents of ACC with n
Logical shift: zeros replace the vacated bit position
Conditional Jumps Arithmetic shift: Used to carry out multiplication and
JPE
JPN
Jump to address if compare TRUE
Jump to address if compare FALSE
division of signed integers represented by bits in the
Unconditional Jumps accumulator by ensuring that the sign-bit (usually the
JMP
I/O Data
Jump to given address MSB) is the same after the shift.
IN Input any character and store ASCII value in ACC Cyclic shift: the bit that is removed from one end by the
OUT
Ending
Output character whose ASCII value is stored in ACC
shift is added to the other end.
END Return Control to operating system
Bit Masking
#denotes immediate addressing
B denotes a binary number, e.g. B01001010 & denotes a
hexadecimal number, e.g. &4A

Modes of Addressing
Direct Addressing: loads contents at address into ACC
Indirect Addressing: The address to be used is at
given address. Load contents of this second address
to ACC
Indexed addressing: form the address to be used as
+ the contents of the IR (Index Register)
Relative addressing: next instruction to be carried out
is an offset number of locations away, relative to
address of current instruction held in PC; allows for
relocatable code
Conditional jump: has a condition that will be
checked (like using an IF statements)
Unconditional jump: no condition to be followed,
simply jump to the next instruction as specified

4.3. Bit Manipulation

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Each bit can represent an individual flag. Need for OS


∴ by altering the bits, flags could be operated upon. A set of programs designed to run in the background
Bit manipulation operations: on a computer system which
Masking: an operation that defines which bits you Controls operation of computer system
want to keep and which bits you want to clear. Provides a user interface
Masking to 1: The OR operation is used with a 1. Controls how computer responds to user’s
Masking to 0: The AND operation is used with a 0. requests
Matching: an operation that allows the accumulator Controls how hardware communicate
to compare the value it contains to the given value in Provides an environment in which application
order to change the state of the status register. software can be executed
Practical applications of Bit Masking: OS hardware is unusable without an OS, as the OS
Setting an individual bit position: acts as an interface since it controls communication
Mask the content of the register with a mask between user and hardware
pattern which has 0 in the ‘mask out’ positions
and 1 in the ‘retain’ positions. Key Management Tasks
Set the result with the match pattern by using the (Main) Memory Management
AND command with a direct address.
Memory protection to ensure 2 programs do not try
Testing one or more bits: to use same memory space
Mask the content of the register with a mask Paging
pattern which has 0 in the ‘mask out’ positions Use of virtual memory
and 1 in the ‘retain’ positions. File Management
Compare the result with the match pattern by
Provides file naming conventions
using the CMP command or by “Checking the Maintains a directory structure
pattern”. Allocates space to particular files
Checking the pattern Security Management
Use AND operation to mask bits and obtain Proves usernames & passwords
resultant.
Ensures data privacy
Now subtract matching bit pattern from resultant. Prevents unauthorized access
The final ‘non-zero’ result confirms the patterns Carries out automatic backup
are not the same else vice versa. Hardware (input/output/peripherals) Management
Installation of appropriate driver software
5. System Software Controls access to data sent to and from peripherals
Receives & handles interrupts from hardware devices
Process Management
5.1. Operating System Enables multiprogramming and multitasking
Resolution of conflicts when 2 or more processes
requires the same resource
E.g. via Round-robin method

Utility Software

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Disk Formatter Pre-written code that can be linked to a software under


Prepares a hard disk to allow data to be stored on it development without any amendments
Deletes any existing data on disk Can perform common or complex tasks
Performs formatting, process where computer ‘draws Takes the form of classes
lines’ on disk surface to split it into small areas Benefits:
Virus checker Saves time: less code needs to be written
Checks for and then removes any viruses found Smaller testing time: pre-tested and used by others
Constantly checks all incoming and outgoing files Library file is a complex algorithm which the user
Defragmentation Software does not need to understand to use it
Files can be big so have to be stored in multiple Dynamic Link Library (DLL) files
sectors, which can result in fragmentation (contents Shared library file that contains code and data
of file scattered across >2 non-contiguous sectors) Code saved separately from the main .EXE file,
Fragmentation slows down disk access and thus the reducing the .EXE file’s size
performance of the entire computer. Code only loaded to main memory when required
Defragmenting software works by physically DDL file can be made available to several applications
reorganizing disk contents (files) such that they are simultaneously, thus reducing strain on memory
stored in contiguous sectors. DLL files act as modules in more complex programs,
This defragmentation reduces number of movements making it easier to install and run updates
of the read/write heads require to access the disk
contents, hence increasing computer performance 5.2. Language Translators
The defragmentation also creates larger contiguous
free space regions Assembler
Disk contents analysis/disk repair software Software that translates assembly language
Software utility for visualization of disk space usage statements into machine code (binary) for execution
Gets size for each folder and files, and generates a The mnemonics used translates into machine
graphical chart showing disk usage distribution opcodes
according to folders or other user defined criteria. Process simple because assembly language has a
Allows disk to report errors (e.g. “bad sector”) one-to-one relationship with machine code.
Software will attempt to offer a solution Compiler and Interpreter
File Compression
Reduces file size by removing redundant data in files Compiler Interpreter
Translates a high-level language program to Translates and executes a high-level language
Causes improvements in the computer’s machine code. program, line-by-line.
Creates a .exe file which can be easily
performance by reducing the data that needs to be distributed.
No .exe file created.

stored Once compiled, .exe file does not need to be


compiled again, resulting in faster execution.
Execution very slow – translated each time
program run.
Back-up Software Reports all errors at the end of compilation: Debugging easier/faster, since it stops
difficult to locate errors∴ development process translating when it reaches an error. This
Makes copy of files on another storage medium in long. allows real time error correction.
the event of a hard drive failure, user error, disaster Only be produced when all errors are fixed. Can run program any time, even before code
finished.
or accident. Used when development is completed. Used during development.

Should be a regular process


Can provide synchronization between devices
Program Libraries

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Two-step translation Data Security: ensuring data is protected against loss and
Java and some other high level language programs unauthorized access.
may require two-step translation, i.e., they will be Data Integrity: making sure that data is valid and does
partially compiled and partially interpreted not corrupt after transmission
Java code first translated to bytecode by Java Data Privacy: ability to determine what data is shared
compiler with a third party
Bytecode finally interpreted by the Java Virtual Data Security and Computer System Security
Machine to produce machine code
Data Security System Security
Integrated Development Environment (IDE) features Protection of data on a computer system Protection of the computer system
Coding To prevent corruption of data and prevent To prevent access of viruses to the system and
prevent hackers from entering your computer
hackers from using data
Context-sensitive prompts: Displays choice of system
E.g. encryption E.g. ID & Password
keywords and available identifiers appropriate at
current insertion point and provides choices in Threats to Computer & Data Security*
alphabetical order
Highlights undeclared/unassigned variable Malware
identifiers software intentionally designed to damage a
Initial Error Detection computer or computer network
Dynamic syntax checks: Automatic checking and Includes Virus & Spyware
highlighting of syntax errors, as soon as line typed Virus: Software that replicates itself by inserting a
Type checking & parameter checking copy of itself into another piece of software, which
Presentation may cause the computer to crash and can lead to
Prettyprint: Automatic indentation and color- deletion or corruption of data
coding of keywords Spyware: software that gathers information about
Expand and Collapse code blocks: Saves excessive users' online and offline activity, including accessed
scrolling if collapsed, and easy to see global sites, applications, and downloaded files.
variable declarations and main program body Risk restriction: Ensure anti-virus and anti-spyware
when collapsed software is installed, regularly updated and run.
Debugging Hacking
Single stepping: Executes program line-by-line to illegal access to a computer system
see the effect of each statement on variables Hackers can obtain user’s confidential data which can
Breakpoints: Pauses program at a specific line to cause identity theft
ensure program operates correctly up to that line Can lead to the deletion or corruption of data
Variables/expressions Report Window: Monitors Risk restriction: Use strong passwords and ensure
variables for comparing values. firewall
Phishing
6. Security, Privacy and Data Attempt through emails to obtain user’s confidential
data which can cause identity theft
Integrity Risk restriction: Ignore suspicious mails and ensure
firewall criteria include SPAM filters, blacklist, etc.
Pharming
6.1. Data Security Redirects user to a fake website that appears
legitimate to gain confidential data
Risk restriction: use a reliable ISP; check that links are
genuine and ensure https is present in the URL

Computer System Security Measures

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

User Accounts and Passwords


Usernames & passwords to deny access to 6.2. Data Integrity
unauthorized users
User-assigned privilege, which accesses to only the Data validation and data verification help protect the
integrity of data by checking whether the data entered is
user’s workplace, preventing the user to have admin
sensible and accurate, respectively.
rights.
Can assign privileges to files so users with low Data Validation: checks if data entered is valid, but not its
privileges do not have access. accuracy
Firewalls Data Validation Methods
Range check: data must be between a set of values
Hardware or software that filters information
Format check: data must follow correct pattern/order
travelling between the computer system and the
internet Length check: data must have exact no. of characters
(software) firewall can make decisions about what to Presence check: checks if some data has been
allow and block by detecting illegal attempts by entered
Existence check: data entered must exist
specific software to connect to the internet
Limit check: checks whether a value entered is within
Authentication
Process of determining whether someone is who acceptable minimum and maximum values.
they claim to be. Check digit: A digit is used as the answer to an
Helps prevent unauthorized access arithmetic operation of other digits in data. If not
matched, then data entered incorrectly
Log-on using digital signatures, passwords and
Data Verification: checks data entered is accurate during
biometric scans.
Anti-virus software data entry and data transfer
Runs in the background to detect & remove viruses. Data Entry Verification Methods
Checks files for known malicious patterns Visual Check: Person manually compares original
data with that entered to check if correct
Anti-spyware software: detects & removes spyware.
Double Entry: Enter data into computer twice and
Encryption:
Conversion of data to code by encoding it compares.
It doesn’t stop illegal access but appears meaningless If differences found, go back to raw data to fix error
Necessary to use decryption software to decode data Data Transfer Verification Methods
Data Security Measures
Encryption
Access Rights to data (authorization): different users
assigned different authorization levels which prevent
them from accessing all data ∴ increases security
Data Backup
An exact copy of an original piece of data in case the
original is lost or corrupted
Within the same computer system or at different site
Disk-mirroring strategy
Real-time strategy that writes data to two or more
disks at the same time.
If one fails, the other is still there to be read off of

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
Software Licencing
Errors may occur when data moved in system.
Parity Check Free Software Foundation:
All data transmitted as bits A license gives users freedom to run, copy, distribute,
Number of 1s in a byte must always be either an odd study, change, and improve the software.
number or an even number Condition: any redistributed version of software must
Parity can be set either as even or odd be distributed with original terms of free use,
E.g. two communicating devices decide there will modification, and distribution (aka copyleft)
always be an odd number of 1s. A byte is received The Open Source Initiative:
that has even number of 1s so error occurred and The source code of open-source software is readily
receiving device would ask for it to be sent again available to users under copyright; it does enable
Used also when data sent between parts of the CPU users to re-distribute the software.
Not foolproof: if 2 bits are transposed, data accepted The concept of an open-source program relies on the
Checksum Check fact that users can review source code to eliminate
Data sent from one place to another as block of bytes bugs in it
rather than individual bytes Shareware:
Computer adds together all bytes being sent Demonstration software that is distributed for free
Any bits lost at most-significant end as carry ignored but for a specific evaluation period only
so answer is an 8-bit number Distributed on a trial basis and with an
Checksum calculated before and after data sent understanding that sometime later, a user may be
If two bytes different, error occurred therefore block interested in paying for it
of bytes must be sent again Used for marketing purposes
Commercial: Requires payment before it can be used,

7. Ethics and Ownership but includes all program's features, with no restrictions

Artifical intelligence (AI)

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

Artificial Intelligence (AI): the ability of a computer to


perform tasks in such a way that is conventionally 8.2. Database Management Systems
associated with human intelligence: (DBMS)
AI can learn from past mistakes
they adapt to stop the same problem from Database: collection of non-redundant interrelated data
occurring again DBMS: Software programs that allow databases to be
they learn to predict what might happen & raise defined, constructed and manipulated
alert
AI can learn to work more efficiently Features of a DBMS:
when an action slows the system down, it can
Data management: data stored in relational databases -
prevent this from happening again
tables stored in secondary storage
when an action increases the speed of the
Data dictionary contains:
system, it can repeat this when necessary to
List of all files in database
improve efficiency
No. of records in each file
AI Applications
Names & types of each field
Developing autonomous mechanical products
Data modeling: analysis of data objects used in
Machine learning through data sets
database, identifying relationships among them
AI Impacts
Logical schema: overall view of entire database,
Social
includes: entities, attributes and relationships
Replacement of manual labour with automation
Data integrity: entire block copied to user’s area when
could lead to massive unemployment.
being changed, saved back when done
However, it could lead to increased leisure time.
Data security: handles password allocation and
Economic: Due to increased innovation and efficiency
verification, backups database automatically, controls
with automation provided by AI, there’d be lower
what certain user’s view by access rights of individuals or
manufacturing costs in general
groups of users
Environmental: Detrimental impact on the
environment due to robot manufacture with limited Data change clash solutions:
resources and its waste disposal
Open entire database in exclusive mode – impractical

8. Database and Data with several users


Lock all records in the table being modified – one user

Modelling changing a table, others can only read table


Lock record currently being edited – as someone
changes something, others can only read record
8.1. File Based System User specifies no locks – software warns user of
simultaneous change, resolve manually
Data stored in discrete files, stored on computer, and Deadlock: 2 locks at the same time, DBMS must
can be accessed, altered or removed by the user recognize, 1 user must abort task

Disadvantages of File Based System: Tools in a DBMS:

No enforcing control on organization/structure of files Developer interface: allows creating and manipulating
Data repeated in different files; manually change each database in SQL rather than graphically
Sorting must be done manually or must write a program Query processor: handles high-level queries. It parses,
Data may be in different format; difficult to find and use validates, optimizes, and compiles or interprets a query
Impossible for it to be multi-user; chaotic which results in the query plan.
Security not sophisticated; users can access everything
8.3. Relational Database Modelling

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE
2nd Normal Form (2NF): it is in 1NF and every non-primary
Entity: object/event which can be distinctly identified
key attribute is fully dependent on the primary; all the
Table: contains a group of related entities in rows and
incomplete dependencies have been removed. Example:
columns called an entity set
Tuple: a row or a record in a relational database
Attribute: a field or column in a relational database
Primary key: attribute or combination of them that
uniquely define each tuple in relation
Candidate key: attribute that can potentially be a
primary key
Foreign key: attribute or combination of them that
relates 2 different tables
Referential integrity: prevents users or applications
from entering inconsistent data
Secondary key: candidate keys not chosen as the
primary key
Indexing: creating a secondary key on an attribute to
provide fast access when searching on that attribute; 3rd Normal Form (3NF): it is in 1NF and 2NF and all non-key
indexing data must be updated when table data changes elements are fully dependent on the primary key. No inter-
dependencies between attributes.
8.4. Relational Design of a System MANY-TO-MANY functions cannot be directly normalized
to 3NF, must use a 2 step process e.g.

becomes:

8.5. Normalization 8.6. Data Definition Language (DDL)


1st Normal Form (1NF): contains no repeating attribute or Creation/modification of the database structure using
groups of attributes. Intersection of each tuple and attribute this language
contains only 1 value. Example: written in SQL
Creating a database:

CREATE DATABASE <database-name>

Creating a table:

CREATE TABLE <table-name> (…)

Changing a table:

ALTER TABLE <table-name>

Adding a primary key:


PRIMARY KEY (field)
ADD <field-name>:<data-type>

Adding a foreign key:

FOREIGN KEY (field) REFERENCES <table>(field)

Example:

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS LEVEL COMPUTER SCIENCE

CREATE DATABASE ‘Personnel.gdb’


CREATE TABLE Training
(EmpID INT NOT NULL,
CourseTitle VARCHAR(30) NOT NULL,
CourseDate Date NOT NULL,
PRIMARY KEY (EmpID, CourseDate),
FOREIGN KEY (EmpID) REFERENCES Employee(EmpID))

8.7. Data Manipulation Language (DML)


Query and maintenance of data done using this language
– written in SQL

Queries:

Creating a query:
SELECT <field-name>
FROM <table-name>
WHERE <search-condition>

SQL Operators:
= Equals to
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
<> Not equal to
IS NULL Check for null values

Sort into ascending order:

ORDER BY <field-name>

Arrange identical data into groups:


GROUP BY <field-name>

Joining together fields of different tables:

INNER JOIN

Data Maintenance:
Adding data to table:

INSERT INTO <table-name>(field1, field2, field3)


VALUES (value1, value2, value3)

Deleting a record:

DELETE FROM <table-name>


WHERE <condition>

Updating a field in a table:

UPDATE <table-name>
SET <field-name> = <value>
WHERE <condition>

WWW.ZNOTES.ORG Copyright © 2025 ZNotes Education & Foundation. All Rights Reserved. This document is
authorised for personal use only by S at HomeSchooled on 22/03/25.
CAIE AS Level
Computer Science

© ZNotes Education Ltd. & ZNotes Foundation 2024. All rights reserved.
This version was created by S on Sat Mar 22 2025 for strictly personal use only.
These notes have been created by Nethul Dulwan Gunasekara for the 2024-2025 syllabus.
The document contains images and excerpts of text from educational resources available on the internet and printed books.
If you are the owner of such media, test or visual, utilized in this document and do not accept its usage then we urge you to contact us
and we would immediately replace said media. No part of this document may be copied or re-uploaded to another website.
Under no conditions may this document be distributed under the name of false author(s) or sold for financial gain.
"ZNotes" and the ZNotes logo are trademarks of ZNotes Education Limited (registration UK00003478331).

You might also like