Exchanging data Flashcards
The website of a school allows visitors to download JPG, MP3, MPEG and PDF files.
The video clip is compressed using lossy compression.
Explain why lossy compression is suitable for a video clip, but not suitable for a text document.
When the file is compressed some detail / data / quality / resolution is lost…
… which is not noticeable in the video file / video still viewable with lower quality
… but would make the text file unreadable / lose meaning or comprehension
Two types of compression are lossy and lossless.
State which type of compression is most appropriate for each of the following and explain why it is appropriate.
(i) Downloading the source code of a large program
Lossless compression
The code has to be exactly as it was originally written
… or else it will not work.
Two types of compression are lossy and lossless.
State which type of compression is most appropriate for each of the following and explain why it is appropriate.
(ii) Streaming a large video file
Lossy compression
Achieves higher compression / smaller file size / faster streaming than lossless Video can still be viewed at lower quality (from the data compressed)
Kofi uses his computer to record an audio file of himself playing his guitar.
He emails his recording to a record label. He uses lossy compression to produce the music file. Explain two reasons why using lossy compression is beneficial.
Lossy means the decompressed file is not identical to the original…
…the difference is unlikely to be noticed by humans
Lossy will decrease the file size … … so it can be sent via e-mail
The video table consists of the following fields: VideoID, VideoName, Presenter, Topic.
(i) Describe what is meant by the term primary key.
A field that has a unique value / a unique identifier (1) for every record in that table (1) – in this case VideoID (1).
The video table consists of the following fields: VideoID, VideoName, Presenter, Topic.
(ii) Write an SQL query that finds the name and presenter of all videos on the Topic of “The CPU”
SELECT VideoName, Presenter (1) FROM Video (1) WHERE Topic (1) =“The CPU” (1).
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.
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:
(many to many)
(i) Identify one reason why this structure would not be suitable.
Many to Many relationships are not allowed / in 3NF (1).
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.
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:
(many to many)
(ii) Draw a new version of the structure to solve this problem.
Table added between student and video (1).
Student to middle table 1:M relationship (1).
Middle table to video M:1 relationship (1).
A database stores information about songs on a music streaming service. One of the tables called Song has the fields:
Title, Artist, Genre, Length
Explain why none of these fields would be suitable as a primary key.
– A primary key must have a unique value for every record
– The values for all these fields could repeat.
(1 per –)
A database stores information about songs on a music streaming service. One of the tables called Song has the fields:
Title, Artist, Genre, Length
Give one advantage and one disadvantage of indexing the field Artist
– Advantage: Searches of Artist can be performed more quickly.
– Disadvantage: The index takes up extra space in the database.
A band called RandomBits removes their permission for their songs to be streamed. The company removes all the songs belonging to RandomBits from their service.
(i) Identify the law with which the company are complying.
Copyright, Design and Patents Act
Write an SQL statement that will remove all songs by RandomBits from the table Song.
Song has the fields:
Title, Artist, Genre, Length
DELETE FROM Song
WHERE Artist + ‘RandomBits’
When the songs have been removed, explain what must happen to the table PlayListEntry if the database is to retain its referential integrity. (You are not expected to write the SQL to do this).
All entries in PlaylistEntry which contain songs by RandomBits must be removed.
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.
NoInStock…
…to check stock levels / allow re- ordering
Location (in warehouse)…
…to find item when needed
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.
A CUSTOMER table is added.
Entity relationship diagram:
product (1-many) order (many-1) customer
Explain why this design would be inefficient for customers.
Only one product can be on an order Customer would have to make a separate order for each product required
(i) Describe what is meant by an IP Address.
A numerical address made of 4 numbers each between 0 and 255 / 32 hexadecimal digits (1)
That uniquely identifies a device on a network. (1)
It is a logical identifier (i.e. can change on a physical device) (1)
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.
Lists attributes Surname, Title, PhoneNo
from the table CUSTOMER
for all customers in Coventry
in ascending order of Surname
e.g. for local promotions / new store opening
ii) Explain why the programmers of the bank’s software have chosen to store the user’s IP address.
IP address can help identify a user… (1) …so company can potentially track users attempting to gain unauthorised access (1)
The office workers of a large company each use a stand-alone computer. The company is considering networking the machines.
(i) Describe what is meant by a LAN.
Local Area network
(Over) a small geographical area Use of hard-wiring / wireless communication
The office workers of a large company each use a stand-alone computer. The company is considering networking the machines.
ii) State two advantages of having a LAN instead of a set of stand-alone machines
Communication between machines / workers
Any machine can be used
Easier to maintain / add / delete software / files
Sharing of peripheral devices / software / data
Monitoring of workers Simplifies backup procedures
2(a). Describe how packet switching is used to transmit datafrom one computer to another computer on a network.
Data is split into equal sized blocks (called packets)
Each packet has a header of information (including destination address and the place of the packet in the complete message)
(Each packet is placed on the network and) each may travel by a different route
(At each node on the network the destination address is read and the) best route is found
Packets need to be reordered at the destination
(b). Explain two advantages of using packet switching instead of circuit switching to send a message between two computer on a network.
Transmission is safer from interception…
…because it is impossible to intercept all the packets as they use different routes
Very efficient use of network…
…as each channel only used for short time / does not tie up a part of the network
If there is an error then only a small, identifiable, part of the data is affected…
…this can be retransmitted easily
InterMovie is a service that allows users to stream movies over the Internet.
When users have played a movie it remains stored in a cache on the user’s computer. This means that someone wanting to access the same film in future can stream it from other users rather than directly from the company’s servers.
(i) State what this network model is called.
Peer to peer (1).
InterMovie is a service that allows users to stream movies over the Internet.
When users have played a movie it remains stored in a cache on the user’s computer. This means that someone wanting to access the same film in future can stream it from other users rather than directly from the company’s servers.
(ii) Explain why the company might have opted for this model.
Peer to peer means there isn’t a reliance on the company’s server (1) and its connection to the Internet (1). This means it hasn’t got to invest in lots of hardware and bandwidth (1) and the system is likely to be more fault tolerant (1).