ocr h446 a-level computer science - …...ocr h446 a-level computer science revision booklet 1.3...

24
Name: Class Teacher: Date: OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of contemporary processors, input, output and storage devices 1.2 Software and software development 1.3 Exchanging data 1.4 Data types, data structures and algorithms 1.5 Legal, moral, cultural and ethical issues 2.1 Elements of computational thinking 2.2 Problem solving and programming 2.3 Algorithms www.learn-computerscience.com

Upload: others

Post on 02-Jun-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

Name: Class Teacher:

Date:

OCR H446 A-Level Computer Science

REVISION BOOKLET

1.3 EXCHANGING DATA

Content in H446 A-Level Computer Science: 1.1 The characteristics of contemporary processors, input, output and storage devices 1.2 Software and software development 1.3 Exchanging data 1.4 Data types, data structures and algorithms 1.5 Legal, moral, cultural and ethical issues 2.1 Elements of computational thinking 2.2 Problem solving and programming 2.3 Algorithms

www.learn-computerscience.com

Page 2: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.1 COMPRESSION, ENCRYPTION AND HASHING

TOPIC

Lossy vs Lossless Compression

Run length encoding and dictionary coding for lossless compression

Symmetric and asymmetric encryption

Different uses of hashing

Page 3: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.1 COMPRESSION, ENCRYTPION AND HASHING

LOSSY COMPRESSION

LOSSLESS COMPRESSION RUN LENGTH ENCODING

DICTIONARY CODING

SYMMETRIC ENCRYPTION

ASYMMETRIC ENCRYPTION HASHING

Page 4: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.2 DATABASES

TOPIC

Relational database

Flat file

Primary key

Foreign key

Secondary key

Entity relationship modelling

Normalisation

Indexing

Methods of capturing, selecting, managing and exchanging data

Normalisation to 3NF

SQL – Interpret and modify

Referential integrity

Transaction processing

ACID (Atomicity, Consistency, Isolation, Durability)

Record locking and redundancy

Page 5: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.2 DATABASES

RELATIONAL DATABASE

FLAT FILE PRIMARY KEY FOREIGN KEY

SECONDARY KEY ENTITY RELATIONSHIP MODELLING

NORMALISATION INDEXING

Page 6: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

METHODS OF CAPTURING, SELECTING, MANAGING AND EXCHANGING DATA

NORMALISATION TO 3NF SQL – INTERPRET AND MODIFY

REFERENTIAL INTEGRITY

TRANSACTION PROCESSING ACID (ATOMICITY, CONSISTENCY, ISOLATION, DURABILITY)

RECORD LOCKING AND REDUNDANCY

Page 7: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.3 NETWORKS

TOPIC

Characteristics of networks and the importance of protocols and standards

The internet structure:

The TCP/IP stack

DNS

Protocol layering

LANs and WANs

Packet and circuit switching

Network security and threats:

Use of firewalls, proxies and encryption

Network hardware

Client-server and peer-to-peer

Page 8: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.3 NETWORKS

CHARACTERISTICS OF NETWORKS

IMPORTANCE OF PROTOCOLS AND STANDARDS THE INTERNET STRUCTURE THE TCP/IP STACK

DNS

PROTOCOL LAYERING

LANs AND WANs

PACKET SWITCHING

Page 9: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

CIRCUIT SWITCHING

NETWORK SECUITY AND THREATS FIREWALLS

PROXIES

ENCRYPTION

NETWORK HARDWARE

CLIENT-SERVER PEER-TO-PEER

Page 10: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.4 WEB TECHNOLOGIES

TOPIC

HTML, CSS and JavaScript

Search engine indexing

PageRank algorithm

Server and client-side processing

Page 11: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

1.3.4 WEB TECHNOLOGIES

HTML CSS

JAVASCRIPT

SEARCH ENGINE INDEXING PAGERANK ALGORITHM

SERVER AND CLIENT-SIDE PROCESSING

Page 12: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

EXAM QUESTIONS

QUESTION 1 a. The office workers of a large company each use a stand-alone computer. The

company is considering networking the machines. Describe what is meant by a LAN.

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

State two advantages of having a LAN instead of a set of stand-alone machines. ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2] b. Describe the following types of data transmission:

Serial data transmission ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

[2] Full duplex …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Page 13: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 2 Laser Tag is a game where teams of players move round an arena shooting each other with

infrared guns. Players wear sensors that keep track of how many times they have been hit by the laser. This is known as being ‘tagged’. Below is an extract from a Laser Tag company’s website:

a. The web page is written in HTML.

Write some HTML code which could have been used to produce this extract. You can assume it is already inside <body> tags.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

[4]

b. The website also includes JavaScript. Describe what is meant by the term JavaScript.

……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… [2]

Page 14: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

Explain why it is usually the case that JavaScript is interpreted rather than compiled.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… [2]

Page 15: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 3 A software company decides to release a duplicate file finder which it has names “De-

Duplicator”. Duplicate files are files that are exactly the same (bit for bit identical). Space is often wasted on computers by having multiple versions of the same file. Duplicate file finders are programs that find and identify duplicate files on a hard drive so that they can be removed. Every time the program encounters a file it takes a hash of the file and checks it against a list. If the hash exists in the list, the file is marked to be deleted. If the hash does not exist, it is added to the list.

a. Explain two characteristics you would look for in a hashing algorithm for this

purpose. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[4]

b. After running the program, a user finds that they still have apparent duplicates of some of their images. Explain why these apparent duplicates might still be present.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Page 16: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 4 The Big Brains exam board has produced a website that allows students to access revision

videos. All pages in the site contain the following tag in the head section. <link href=”themes/standard.css” rel=”stylesheet” type=”text/css” />

Describe one advantage of storing the CSS in an external file rather than it being embedded within HTML files. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

[3] The exam board wants to limit access to those students with a school email account (i.e. one ending sch.uk). When students sign up, JavaScript is used to check that the email address they have entered is from a school account. The address is checked again when it reaches the server before login details are sent to the address. Explain why it is important to check the email address with JavaScript and again when it

reaches the server. ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[3]

Page 17: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

The video table consists of the following fields: VideoID, VideoName, Presenter, Topic. Describe what is meant by the term primary key.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Write an SQL query that finds the name and presenter of all videos on the topic of “The

CPU”. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[4]

The exam board wants to use a database to keep track of which videos each student has

viewed. The structure it plans to use is shown below:

Identify one reason why this structure would not be suitable.

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[1]

Page 18: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

Draw a new version of the structure to solve this problem.

[3]

Page 19: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 5 A school has three independent computer networks.

One for student use. One for teacher use. One for use in the administration offices. The three networks are going to be combined to allow data to be stored in one location. The data will be accessible at any computer if the correct access codes are used. Explain how the following devices may be used in the above situation. A bridge

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2] A gateway

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Page 20: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 6 A company sells garden furniture. It has decided to create a relational database. A first,

incomplete database design includes two tables PRODUCT and ORDER. PRODUCT (ProductID, ProductType, Size, Price, …) ORDER (OrderID, OrderDate, ProductID, …) For example, the product which has ProductID 12345 is a large bench which has a price of £150. State one additional piece of data which should be included in PRODUCT and give one reason why it is needed. ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2] You should use only the data given above. Explain the use of a primary key in this database.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2] Explain the use of a foreign key in this database.

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Page 21: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

A CUSTOMER table is added. An entity-relationship (ER) diagram is shown.

Explain why this design would be inefficient for customers. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Some of the Structured Query Language (SQL) for this database is SELECT Surname, Title, PhoneNo

FROM CUSTOMER

WHERE Town = “Coventry”

ORDER BY Surname

Describe the purpose of this code and give one situation in which it may be used. …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[5]

Page 22: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 7 A programmer spends her spare time contributing to an open source application that

converts video files from a range of formats to one which uses lossy compression. Describe what is meant by the term ‘lossy compression’. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[2]

Page 23: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

QUESTION 8 Every bank account has an account number and sort code. The sort code identifies the bank

branch (location of the bank) with which the account is held and the account number uniquely identifies the bank account. An extract from a bank’s database table is shown in Fig 5.1.

State why the table in Fig 5.1 is not in Third Normal Form. ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… [1]

Explain how the database could be put into Third Normal Form. …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

[3]

Page 24: OCR H446 A-Level Computer Science - …...OCR H446 A-Level Computer Science REVISION BOOKLET 1.3 EXCHANGING DATA Content in H446 A-Level Computer Science: 1.1 The characteristics of

A bank needs to ensure the data stored in its database is accurate at all times including when customers deposit or withdraw funds.

Discuss how the bank can ensure the accuracy of its data and the importance of doing so. …………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

…………………………………………………………………………………………………………………………………………… ……………………………………………………………………………………………………………………………………………

……………………………………………………………………………………………………………………………………………

[9]