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)