Exchanging Data

This section covers A-Level Computer Science content on exchanging data: focussing on: Compression, Encryption and Hashing, Databases, Networks and Web Technologies.

Compression, Encryption, and Hashing

Lossy vs Lossless Compression

Lossy Compression: Reduces file size by permanently removing some data. This results in reduced quality but smaller file sizes, suitable for media files (e.g., JPEG images, MP3 audio).

Lossless Compression: Compresses data without losing any information, allowing full recovery of the original data upon decompression. Suitable for text and data files (e.g., ZIP files, PNG images).

Run Length Encoding (RLE) and Dictionary Coding for Lossless Compression

Run Length Encoding (RLE): Compresses data by replacing sequences of repeated data elements (runs) with a single data value and a count (e.g., "AAAA" becomes "A4"). This method is effective with repetitive data.

Dictionary Coding: Uses a dictionary to replace repeated patterns in data with shorter codes (e.g., Lempel-Ziv-Welch (LZW) compression). The dictionary maps recurring data sequences, making the data more compact.

Symmetric and Asymmetric Encryption

Symmetric Encryption: The same key is used to both encrypt and decrypt data. It is fast and suitable for large amounts of data, but the key must be securely shared (e.g., AES, DES).

Asymmetric Encryption: Uses a pair of keys: a public key for encryption and a private key for decryption. It is more secure but slower than symmetric encryption. Suitable for secure communications (e.g., RSA).

Different Uses of Hashing

Hashing: Converts data into a fixed-length hash value (digest), which represents the original data. It is commonly used for:

Password storage: Hashes are stored instead of actual passwords.

Data integrity: Ensures data has not been altered during transmission.

Searching: Hash tables allow fast data retrieval.

Databases

Relational Database, Flat File, Primary Key, Foreign Key, Secondary Key, Entity Relationship Modelling, Normalisation, and Indexing

Relational Database: Organises data into tables (relations) with rows (records) and columns (fields). Relationships between tables are established using keys.

Flat File: A simple database model where all data is stored in a single table. It is prone to redundancy and anomalies.

Primary Key: A unique identifier for each record in a table.

Foreign Key: A field in one table that refers to the primary key in another table, creating a relationship between the tables.

Secondary Key: A field used for searching within a database but not necessarily unique (e.g., a surname).

Entity Relationship Modelling: A diagrammatic approach to design databases, showing entities (tables) and their relationships.

Normalisation: A process of structuring a database to reduce redundancy and dependency. It involves dividing tables and ensuring that data is stored in the most efficient way.

Indexing: Improves the speed of data retrieval by creating a data structure (index) that allows for faster searching.

Methods of Capturing, Selecting, Managing, and Exchanging Data

Capturing Data: Data can be collected through methods such as forms, sensors, and APIs.

Selecting Data: Choosing relevant data from large datasets using queries, filtering, or criteria.

Managing Data: Data is organised, stored, and maintained in databases to ensure accuracy and consistency.

Exchanging Data: Data can be shared between systems using formats like JSON, XML, or CSV, and through APIs.

Normalisation to 3NF

First Normal Form (1NF): Ensures all columns contain atomic (indivisible) data and that there are no repeating groups.

Second Normal Form (2NF): Removes partial dependencies, where non-primary key attributes depend on only part of a composite key.

Third Normal Form (3NF): Removes transitive dependencies, ensuring that non-primary key attributes depend only on the primary key.

SQL – Interpret and Modify

SQL (Structured Query Language) is used to manage and manipulate relational databases. Key operations include:

SELECT: Retrieves data from a table.

INSERT: Adds new data to a table.

UPDATE: Modifies existing data in a table.

DELETE: Removes data from a table.

Referential Integrity

Referential Integrity ensures that relationships between tables are consistent. Foreign keys in one table must match the primary keys in related tables, ensuring valid data across the database.

Transaction Processing, ACID, Record Locking, and Redundancy

Transaction Processing: Ensures that database operations are processed reliably, even in the event of system failures.

ACID:

Atomicity: Ensures transactions are completed fully or not at all.

Consistency: Ensures that transactions bring the database from one valid state to another.

Isolation: Ensures that transactions do not interfere with each other.

Durability: Ensures that completed transactions are permanently saved, even in case of power loss.

Record Locking: Prevents multiple users from updating the same record simultaneously, avoiding conflicts.

Redundancy: Storing duplicate copies of data to improve reliability and availability, often through techniques like RAID.

Networks

Characteristics of Networks and the Importance of Protocols and Standards

Networks allow devices to communicate and share resources. Characteristics include speed (bandwidth), reliability, and security.

Protocols are rules for communication, ensuring that data is transmitted and received correctly (e.g., TCP/IP, HTTP, FTP).

Standards ensure compatibility between different hardware and software systems (e.g., IEEE 802.11 for Wi-Fi).

The Internet Structure

TCP/IP Stack: The model used for data exchange on the internet, consisting of four layers:

Application Layer: Handles data for specific applications (e.g., HTTP, FTP).

Transport Layer: Manages end-to-end communication (e.g., TCP).

Network Layer: Determines how data is sent between devices (e.g., IP).

Link Layer: Controls the physical transmission of data.

DNS (Domain Name System): Translates domain names (e.g., www.example.com) into IP addresses.

Protocol Layering: Divides network communication into separate layers to simplify design and implementation.

LANs (Local Area Networks): Connect devices within a limited area (e.g., home, school).

WANs (Wide Area Networks): Connect devices over larger geographic areas (e.g., the internet).

Packet Switching: Breaks data into packets that are sent independently over the network.

Circuit Switching: Establishes a dedicated communication path between two devices (e.g., traditional telephone systems).

Network Security and Threats

Firewalls: Control incoming and outgoing network traffic based on predetermined security rules.

Proxies: Intermediate servers that handle requests between clients and external servers, adding a layer of security and anonymity.

Encryption: Protects data by converting it into an unreadable format, ensuring secure transmission.

Network Hardware

Network Interface Cards (NIC): Hardware that allows devices to connect to a network.

Switches: Connect multiple devices within a LAN and direct data to the correct recipient.

Routers: Forward data between different networks (e.g., connecting a LAN to the internet).

Wireless Access Points (WAP): Allow wireless devices to connect to a network.

Client-Server and Peer-to-Peer Networks

Client-Server: A central server provides resources and services to multiple clients. Suitable for larger networks with centralised management.

Peer-to-Peer (P2P): All devices are equal and share resources without a central server. Common in small networks or for file-sharing applications.

Web Technologies

HTML, CSS, and JavaScript

HTML (Hypertext Markup Language): Defines the structure and content of web pages.

CSS (Cascading Style Sheets): Controls the visual appearance of web pages, including layout, colours, and fonts.

JavaScript: A programming language that allows for dynamic and interactive web content (e.g., animations, form validation).

Search Engine Indexing

Search Engine Indexing involves the process of collecting, analysing, and storing data from web pages to allow for quick and accurate search results.

PageRank Algorithm

PageRank: An algorithm used by search engines (e.g., Google) to rank web pages based on their relevance and the number and quality of inbound links.

Server-Side and Client-Side Processing

Server-Side Processing: Tasks are performed on the web server before sending the results to the client (e.g., retrieving data from a database).

Client-Side Processing: Tasks are performed in the user's web browser, often using JavaScript, allowing for faster responses and reducing the load on the server.

sign up to revision world banner
Slot