0% found this document useful (0 votes)
36 views11 pages

OCR A-Level Computer Science Spec Notes - 1.3 Summarized

The document outlines key concepts in computer science related to data exchange, including compression (lossy vs lossless), encryption (symmetric vs asymmetric), and hashing. It also discusses database structures (flat file vs relational), normalization, SQL commands, and network characteristics, including security measures and hardware. Additionally, it covers web technologies such as HTML, CSS, and JavaScript, emphasizing their roles in creating and rendering web pages.

Uploaded by

ninja0990
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)
36 views11 pages

OCR A-Level Computer Science Spec Notes - 1.3 Summarized

The document outlines key concepts in computer science related to data exchange, including compression (lossy vs lossless), encryption (symmetric vs asymmetric), and hashing. It also discusses database structures (flat file vs relational), normalization, SQL commands, and network characteristics, including security measures and hardware. Additionally, it covers web technologies such as HTML, CSS, and JavaScript, emphasizing their roles in creating and rendering web pages.

Uploaded by

ninja0990
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/ 11

OCR A-Level Computer Science Spec Notes

1.3 Exchanging Data


1.3.1 Compression, Encryption and Hashing
(a) Lossy vs Lossless compression
Compression- The reduction of file sizes to:
- Reduce download times
- Make best use of bandwidth
- Reduce file storage requirements
There are 2 types of compression:
● Lossy
- Some data stripped out to reduce file size
- Information not recoverable hence deleted since it has least importance
- Typically used for Images/Videos/Music files. Data removed is not noticeable by
humans
- Common lossy formats: JPEG/MP3/MPEG
● Lossless
- Retains all data by encoding it efficiently
- The original file can be regenerated
- Common lossless formats : ZIP/GIF/PNG

(b) Run length encoding and dictionary coding


There are 2 types of encoding:
● Run Length Encoding
- Stores redundant data (pixels/words/bits) into groupings of bits
- Indexed and stored on a dictionary/table + # of occurrences
- Used in TIFF/BMP files
● Dictionary Encoding
- Compression algorithm which uses a known dictionary/own dictionary to encode
data.
- File consists of dictionary + sequence of occurrences
- Substitutes entries for unique code e.g (function = F_N)
- Used for ZIP/GIF/PNG files

(c) Symmetric and asymmetric encryption


Encryption:
- The process of scrambling data that the only way to read it is to decrypt it
- Uses encryption keys (long random numbers) to encrypt/decrypt messages
- Public key = available to all / Private key = Available to owner only
- Long process to encrypt & decrypt

There are 2 types of encryption:


● Symmetric Encryption
- Same key used to encrypt/decrypt
- Requires both parties to have copy of key
- Can’t be transferred over internet = Easy to decrypt
- Stronger than asymmetric (Same length)
● Asymmetric Encryption
- Different keys to encrypt/decrypt = More secure
- Public key = encrypt / Private key = decrypt
- Example: TLS (Transport Layer Security) uses symmetric & asymmetric

(d) Different uses of hashing


Hashing:
- Used to produce/check passwords
- Stores data in abbreviated form e.g 123456 -> 456
- Difficult to regenerate hash value -> original value
- Vulnerable to brute-force attacks
- Low chance of collision (Different inputs = same output) = ↓ risk of files being the same
- Easy to check – the login attempt is hashed again

1.3.2 Databases
(a) Flat file and relational databases
Databases: Structured & Persistent stores of data for ease of processing
- Allow data to be: Retrieved quickly/updated easily/filtered for different views
Flat file Databases
- Simple data structures which are easy to maintain (limited data storage)
- Limited use due to redundant/inconsistent data
- No specialist knowledge to operate
- Harder to update & data format is difficult to change
Relational Databases
- Based on linked tables (relations)
- Based on entities (Rows & Columns)
- Each row (tuple) in a table is equivalent to a record and is constructed in the same way.
- Each column (attribute) is equivalent to a field and must have just one data type.
- Improves data consistency & integrity
- Easier to change data format & update records
- Improves levels of security so easier to access data
- Reduces data redundancy to avoid wasting storage

Primary Key (PK)


- Is a unique identifier in a table used to define each record.
Foreign Key (FK)
- PK in one table is used as an attribute or FK in another to provide links or relationships
between tables.
- Represents a (one to many) relationship where the FK is at the “many” end of the
relationship to avoid data duplication.
- This allows relevant data to be extracted from different tables.
Secondary Key (SK)
- An attribute that allows a group of records in a table to be sorted and searched
differently from the PK and data to be accessed in a different order.

Entity Relationships
- Used to plan RDB
- Diagrams to show relation
- Helpful in reducing redundancy

One-One Relationship
- Not suitable for relationship tables

One-Many Relationship
- Used in well designed RBS

Many-Many Relationship
- Leads to data redundancy

Indexing
- The PK is normally indexed for quick access.
- The SK is an alternative index allowing for faster searches based on different attributes.
- The index takes up extra space in the database.
- When a data table is changed, the indexes have to be rebuilt.

Serial files
- Are relatively short and simple files.
- Data records are stored chronologically i.e. in the order in which they are entered.
- New data is always appended to the existing records at the end of the file.
- To access a record, you search from the first item and read each preceding item.
- Easy to implement.
- Adding new records is easy.
- Searching is easy but slow.

Sequential files
- Are serial files where the data in the file is ordered logically according to a key field in
the record.
Indexed sequential files
- Records are sorted according to a PK
- A separate index is kept that allows groups or blocks of records to be accessed directly
and quickly
- New records need to be inserted in the correct position and the index has to be
maintained and updated to be kept in sync with the data
- Is more difficult the manage but accessing individual files is much faster
- More space efficient
- More suited to large files
Database Management System (DBMS)
- Is software that creates, maintains and handles the complexities of managing a
database.
- May provide UI.
- May use SQL to communicate with other programs.
- Provides different views of the data for different users.
- Provides security features.
- Finds, adds and updates data.
- Maintains indexes.
- Enforces referential integrity and data integrity rules.
- Manages access rights.
- Provides the means to create the database structures: queries, views, tables, interfaces
and outputs.
Queries
- Isolate and display a subset of data.
- QBE: query by example.

(b) Methods of capturing, selecting, managing, exchanging data

There are multiple ways to capture/select/manage/exchange data based on the scenario and
what needs to be obtained. For example, a hotel would want the guests information so they can
process payments.

(c) Normalisation to 3NF


Normalisation: There are 3 stages to normalisation:
- 1NF
● Separates multiple items/ sets of data in each row to remove duplicate values
- 2NF
● Removes data that occurs on multiple rows & puts data into new table
● Creates relationship links between tables as necessary by repeated fields
- 3NF
● Removes fields not directly related to the primary key to their own linked table so
every value left depends on the key
(d) SQL: Structured Query Language
SQL Command Explanation & Example

CREATE TABLE Creates an Empty Table:


Create Table_Name (
column1 datatype,
column2 datatype,
column3 datatype,
)

DROP Remove database components (ALTER TABLE can be used to delete column):
ALTER TABLE green DROP COLUMN name;

INSERT Adds values into records in tables:


INSERT INTO example(name, dob) VALUES

DELETE Deletes data from table_name:


DELETE FROM “example” WHERE

SELECT Lists the field name to be displayed:


SELECT “Name”

WHERE Lists the search criteria for the field value:


WHERE “Name” = ‘Fred’

AND Works when both expressions are true:


“Name” = ‘Cox’ AND “Order” < 3

FROM Lists the table the data comes from::


FROM “tblCustomer”

(e) Referential integrity


- Transactions should maintain referential integrity.
- This means keeping a database in a consistent state so changes to data in one table must
take into account data in linked tables
- Enforced by DBMS.

(f) Transaction processing (ACID), record locking and redundancy


ACID rules protect integrity of database:
● Atomicity: A change is either performed or not. Half finished changes not saved.
● Consistency: Any change must retain the overall state of database
● Isolation: A transaction must not be interrupted by another
● Durability: Changes must be written to storage in order to preserve them
Record locking
- Preventing simultaneous access to objects in databases to prevent losses in updates or
data inconsistencies
- A record is locked when a user retrieves it from editing/updating
- Anyone else trying to access record is denied access until record is completed/cancelled
Data Redundancy
- Is unnecessary repetition of data that leads to inconsistencies
- Data should have redundancy so if part of a database is lost it should be recoverable from
elsewhere
- Redundancy can be provided by RAID setup or mirroring servers.

1.3.3 Networks
(a) Characteristics of a networks, importance of protocols/standards
Network: interconnected set of devices
Frame: A unit of data sent on a network

Private Networks
Advantages Disadvantages

- Security (Control of access) - Specialist staff/security/backups


needed
- Confidence of availability

Network Topologies: the layout of a network


Different types of Network Topologies
- Bus
● Nodes attached to single backbone = vulnerable to
changes
● Prone to data collisions
● Uncommon now

- Ring
● Nodes attached to exactly 2 other nodes
● Data sent in 1 direction to avoid collisions
● Easily disrupted

- Star
● Most networks are star layouts
● Resilient
● Speratrate link from each node to switch/hub

Standards/protocols- Set of rules relating to the communication of devices & data transmitted
between them:
- Examples: TCP/IP stack
Open Systems Interconnection (OSI) model
- An openly available (non-proprietary) network model.
7 layers in the OSI model:
● 7 – Application: collecting and delivering data in the real world.
● 6 – Presentation: data conversions.
● 5 – Session: manages connections.
● 4 – Transport: packetizing and checking.
● 3 – Network: transmission of packets, routing.
● 2 – Data Link: access control, error detection and correction.
● 1 – Physical: network devices and media.

(b) The internet structure


● The TCP/IP Stack:
- Suite of protocols cover data formatting, addressing, routing and receiving.
Equivalent to layers 7,4,3,2 of OSI model
4 layers of abstraction
Layer Purpose

Application (7) Capturing/delivering data & packaging

Transport (4) Establishment/termination of connections via routers

Network (3) Provides transmission between different networks. Concerned with IP


addressing and direction of datagrams.

Link (2) Passes data onto physical network (Copper wire/optical fibre/wireless)

● (Domain Name System) DNS:


- Hierarchical system for naming resources on a network
- Human readable equivalent to IP address (e.g www.google.co.uk instead of
64.256.201.765)
- Domain names translates URLs to IP addresses
- If server can’t resolve it passes request recursively to another server which sends
IP address to browser so it can retrieve website hosted from server.
● Protocol layering
- Form of abstraction
- Divides complex system into component parts of functionality
- Gradually allows work to be completed & allows efficient problem solving
- Each layer communicates only with adjacent layers
Layers of abstraction
Layer Purpose

Application (7) The hardware that provides the connections.

Network (3) Concerned with routes from sender to recipient.

Physical (1) Hardware that provides the connections


● Network Types (WAN/LAN etc)
- Local Area Network (LAN)
● Confined to one location (school/business)
● Infrastructure maintained by organisations that owns it
- Wide Area Network (WAN)
● Covers a large geographical area
● Makes use of communication providers (BT,Virgin)
● Internet is a WAN but special case (multiplicity of users)

● Packet and circuit switching


Packet Switching Circuit Switching

- Connectionless node 3 Stages:


- connection establishment
- data transmission
- connection termination.

- Divides message into data units called - Exclusive dedicated channel which
packets physically connects devices together

- Sent across the most efficient route - Suitable for intensive data transfer
(Not predetermined)

- At each node = destination read = most - Packets remain in order but


convenient route taken reassembled at destination

- Packets arrive out of order ( reordered - All packets go on same route in order
at destination)

- Only as fast as slowest packet - Sets up route between 2 computers for


duration of message

- Errors resubmitted if any occur - Ties up large areas of network so no


other data can use any part of the
- Error checking promotes successful circuit until the transmission is
transmission. complete.

(c) Network security


Authentication
- Protects users using a username & password
- As networks are more easily hacked into, new security systems implemented by using:
● Multiple credentials /smart cards/ biometric information (fingerprints/iris
scans)
Firewalls
- Various combinations of hardware/software that isolate a network from the outside
world
- Configurable to deny access to certain addresses/data
Proxies
- Computers interposed between networks & remote resource
- Control input/output from a network
Encryption
- Most traffic is made unintelligible to unauthorised individuals
- Key is needed for sender to encrypt and receiver to decrypt
- Bigger the key = more encryption
- Asymmetric key encryption (Public/Private key)

(d) Network hardware


Network Interface Card/Controller
- Generates/Receives electrical signals
- Works at the physical/data link layers
Router
- Device to connect networks
- Receives/Forwards data packets
- Directs packets to next device (Uses table/algorithm to decide route)
MAC address
- 48 bit identifier
- Permanently added to device by manufacturer
- Human readable group of 6 bytes
Switches
- Devices to connect to other devices on networks
- Packet switching to send data to specific destinations (Using hardware addresses)
- Operates at Lvl ⅔ of OSI model
Hubs
- Connects nodes together by broadcasting a signal to all possible destinations
- Correct destination accepts signal
Wireless Access Points
- Usually connected to a router
- Data link layer
- Used to connect devices to Wifi

(e) Client-server and peer to peer


Client server
- High end computers act as servers
- Client computer requests services from server
- Services provided: File storage/access, printing, internet access, security features (login)
- Less complex = more accessible
- Computers don't have to be powerful/expensive
- Servers upgraded to fix security issues/provide more features

Peer-Peer Server
- All computers = equal status
- Computers can act as client &/ server
- Useful on internet so traffic can avoid servers
- Cheaper as its private so no expensive hardware/bandwidth needed
- More likely to be fault tolerant

1.3.4 Web Technologies


(a) HTML, CSS, JavaScript
World Wide Web (WWW)
- Collection of billions of web pages
- Written in HTML (have hyperlinks)
- Tags to indicate how text is to be handled.
- Assets: Images/Videos/Forms/Applets
Browsers
- Software that renders HTML pages
- Find web resources by accepting URLs and following links
- Find resources on private networks
- Browser examples: Chrome/Safari/Opera/IE/Firefox

Standards: Set of guidelines used universally so all computers can access the same resources.

Examples of standards
● HTML (Hyper Text Markup Language)
- Create web pages & elements
- Has tags: Mark out elements on page to show browser how to process element
- Links: redirects user from current page to page referred by link
● CSS (Cascading Style Sheets)
- Determines how tags affect objects
- Used to standardise an appearance of a webpage
- Changes made can affect whole site instead of one page
- Content and formatting are kept separate
- Simpler HTML used as CSS can be used in multiple files
- Adjustable for different devices
● JavaScript
- Programing language which runs on browsers & controls elements
- Embedded into HTML with <script> tags to add functionality such as:
● Validation/animation/Newer content
- Used on client side = less strain on server & server side as it can be amended
- Can run on any browser (normally interpreted)

(b) Search engine indexing


Search Engines: Web based software utilities that enable users to find resources on the web
- Builds indexes
- Uses algorithms to complete searches & web-crawling bots to collect indexes
- Supports many human languages
Search Engine Indexing (SEI)
- Is the process of collecting and storing data from websites so that a search engine can
quickly match the content against search terms.
(c) PageRank algorithm
- Developed by Google
- Attempt to rank pages by usefulness/importance
- Takes into account: # of inward/outward links & # of sites that link to current site
- The PageRank of the linking sites – the algorithm iteratively calculates the importance of
each site so that links from sites with a high importance are given a higher ranking than
those linked from sites of low importance.

(d) Server and client side processing


Server Side Processing: Processing that takes place on the web server
Pros Cons

- High security: data sent to server for - Extra load on the server makes running
processing then sent back the server more expensive

- Hides code from user to protect


copyright & being amended

- No need to rely on browser having


correct interpreter
Is best used where processing is integral e.g. generating content and accessing data including
secure data so any data passed must be checked carefully.

Client Side Processing: Processing that takes place on the web browser
Pros Cons

- More processing = Reduced load on - Code is visible so can be copied


server = Reduced data traffic - Browser may not run the code as it
doesn’t have the capability/ user
- Quick feedback to user intentionally disabled client code
- More responsive code

- Data doesn't need to be sent to server


and back

Is best used when it’s not critical code that runs. If it is critical then it should be carried out on
the server. Is also best where quick feedback to the user is needed – an example being games.

You might also like