100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
1.3 Exchanging Data £2.99
Add to cart

Other

1.3 Exchanging Data

 5 views  0 purchase
  • Institution
  • OCR

This is the topic: 1.3 Exchanging Data for the OCR A-Level Computer Science (H446) course. I got 4 A*s in my A-Levels (Computer Science, Physics, Maths, Further Maths) , so they are very detailed and cover all of the specification for this topic.

Preview 3 out of 17  pages

  • September 11, 2024
  • 17
  • 2023/2024
  • Other
  • Unknown
All documents for this subject (7)
avatar-seller
maddysunter1
1.3 Exchanging Data


1.3.1 Compression, Encryption and Hashing

Lossy and Lossless Compression:

Compression = Process used to reduce the storage space required by a file. Purposes include:

 Reduces file size so more files can be stored with the same amount of storage space.
 Increases number of files that can be transferred in a given time so makes best use of bandwidth
(larger a file, the longer it takes to transfer over the Internet), and less bandwidth consumption.
 Faster file transmission and download times (a compressed file is faster to download over the
Internet than the full version).
 To meet storage requirements (e.g. in emails).

Lossy compression = Reduces file size by reducing quality (e.g. more pixelated images, less clear
audio recording). More suitable for images, audio & video files.

 In images: colour depth (number of colours) is reduced or larger areas of pixels are stored as one
colour.
 In audio files: Very high/low frequencies which are least noticeable to the ear are removed.

Lossless compression = Reduces file size by removing redundant data, so quality isn’t reduced. More
suitable for executable files & documents.

Advantages Disadvantages
Lossy -Reduces more file size. -File can’t be returned to original form, so
-A small reduction in quality isn’t usually not suitable for text files as text will be lost.
noticeable.
Lossless -When uncompressed, the file is -Reduces less file size.
restored to its original form. -Requires a higher bandwidth when
streaming.
-In images, only works well with vector-style
images, less so for bitmap images.


Run Length Encoding and Dictionary Coding:

These are both types of lossless compression.

Run Length Encoding = Repeating values are removed and replaced with one occurrence of the data
and the number of times it repeats (e.g. AABBB = 2A3B). It’s ideal for bitmap images (made up of
discrete pixels) where repeating contiguous coloured pixels are stored. It relies on consecutive
pieces of data being the same, so doesn’t work well when there’s little repetition.

Dictionary Coding = Frequently occurring pieces of data are replaced with indexes. A dictionary is
used to identify which indexes match which piece of data. When decompressed, the dictionary is
used to replace the indexes with the original text. The compressed data must be transferred with the
dictionary. This is effective for text and binary data.

Symmetric and Asymmetric Encryption:

Encryption = The process of encoding a message so it can only be read by the sender & intended
recipient. It’s used to keep data secure when it’s transmitted. A key is used to encrypt/decrypt a
message.

Symmetric Encryption:

1

,  A single private key is used to encrypt & decrypt the data.
 The sender & receiver distribute the key in a process called a key exchange.
 If the key is intercepted, then the data could be intercepted.

Asymmetric Encryption:

 Two keys are used, a public and private key. Together they form a key pair.
 The public key can be made public, but the private key must be kept private.
 The message is encrypted with the public key (by whoever wants to send the message to
you) but can only be decrypted with the corresponding private key (that you use).
 If you encrypt a message using your private key, a person can decrypt it with your public key
to verify the message was sent by you.
 It’s virtually impossible to derive one key from the other so its more secure than symmetric
encryption.

Different Uses of Hashing:

Hashing = The process in which an input (called key) is turned into a fixed size value (called a hash).
Hash functions do this, and a hash function’s output should be smaller than the provided input.

 You can’t reverse the output of a hash function to form the key, even if you have access to
the hashing algorithm.
 Even a slight change in the original message produces an entirely different hash value, so its
sensitive to data changes.
 A hash table is a data structure which holds key-value pairs. It’s used to lookup data in
constant time.
 It’s generally faster than strong encryption methods.
 Uses:
o Database lookup and quick data retrieval, when a lot of data needs to be stored with
constant access times, such as in caches and databases. If two keys produce the
same hash, a collision occurs. This is overcome by storing items together in a list
under the hash value and using a second hash function to generate a new hash. A
good hash function has a low chance of collision and is quick to calculate. The
hashed table has no order and its easier (less computationally intensive) for the
computer to compare hashes as they have a fixed length.
o When a password is stored, a hashing function can be applied to it, so the system
never stores the password in plaintext. The next time the user enters the password,
the hashing function is used, and the hash value is compared to the one stored.
o Verifying data integrity, as when data is transferred over a network, it’s susceptible
to loss of packets or malicious interference. If two hashes are produced using the
data on either side, and these are compared and are identical, the system can verify
the integrity of data.

1.3.2 Databases

Introduction to Databases:

Database = An organised collection of data. It allows easy storage, retrieval and management of
information. Field/attribute = A single piece of data in a record (column), record = A group of related
fields, representing one data entry (row). An entity is an item of interest about which data is stored,
each entity usually has its own table.


2

, Benefits of Electronic Databases:

 It’s easier to add, delete, modify and update data
 Data can be backed up and copied easier
 Multiple users from multiple locations can access the same database at the same time

Flat File Database:

 Contains only a single table.
 Quick to set up; requires little expertise to maintain; suitable for storing small amounts of
data (e.g. contact details).
 Can become inefficient; if there’s redundant data, unnecessary space is used.
 Written like: TableName(field1, field2,…) --> Primary key is underlined


Relational Database: Primary keys can be underlined.

‘DoctorID’ is the foreign key in the table ‘Patient’.
 Uses multiple tables for different entities.
 A link between tables is called a relationship. These include:
o One-to-many:
o Many-to-one:
o One-to-one:
o Many-to-many:
1:M relationship as one doctor
 An entity relationship diagram (ERD) shows how tables are linked:
will have many patients, but a
 There needs to be a common field in both tables for it to work. patient can only have one doctor.



Primary Key = A field which uniquely identifies every record in a table by having a unique value for
every record. A composite primary key is when two or ore fields make up the primary key (if one key
doesn’t work).

Foreign Key = A field in one table that refers to the primary key in another table. It’s used to link two
tables together. E.g. in the ERD, ‘DoctorID’ is the foreign key for the table ‘Patient’. ‘Doctor’ has no
foreign key.

Secondary Key = The field used to enable a database to be searched quickly. E.g. in the ERD,
‘Surname’ might be used, as the person searching the database might not remember the patient’s
‘PatientID’.

Indexing = A method used to store the position of each record when it’s ordered by a certain
attribute. It’s used to speed up data retrieval. The primary key is automatically indexed.

Methods of Capturing, Selecting, Managing and Exchanging Data:

Capturing:

 Inputting data into a database.




 Manually:



3

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller maddysunter1. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £2.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

56326 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£2.99
  • (0)
Add to cart
Added