Section 4: Exchanging data Flashcards
Why are sound and image files often compressed?
Sound and image files are often compressed to reduce the storage space of files on a disk, also reducing the costs of data transmission in doing so.
Describe how lossy and lossless compression differ.
Using lossy compression, files are compressed by removing unnecessary data in order to shorten the file size (thus permanently losing some data). Using lossless compression, patterns in the data are recorded to reduce the file size, and then reverted back when necessary.
Describe an advantage and disadvantage of Run-Length Encoding.
Advantage: Will often be useful for lossless compression e.g. 11100100 would become 3120120 (1 bit smaller)
Disadvantage: In some instances, could increase file size e.g. line of binary 10101010 would become 1110111011101110 (8 bits (1 byte) larger)
Describe an advantage and disadvantage of lossy compression.
Advantage: Significantly reduces file size (to around 10% of the original file size in an MP3)
Disadvantage: Often differences in the quality of the file can be recognisable, for example audio over a phone call is observably worse than a normal recording.
Describe how a dictionary-based compression technique works.
A dictionary-based compression technique uses a dictionary data structure containing words and corresponding binary values to represent them (smaller than their ASCII values). Repeated words from a text file will simply refer to the dictionary and use the binary representation from there.
Define encryption.
Encryption is the transformation of data from one form to another to prevent an unauthorised third-party from being able to understand it.
Define symmetric encryption.
Symmetric encryption is a form of encryption that uses the same key to both encrypt and decrypt the data. The key must be transferred to the same destination as the ciphertext.
Define asymmetric encryption.
Asymmetric encryption is a form of encryption using two keys. The public key is made public so that people wishing to send you data can use this to encrypt the data. A private key, available only to the recipient of the data, can be used to decrypt the ciphertext.
Describe how hashing can be used to encrypt data.
Hashing can be used to encrypt data through by using a hashing function to calculate a hash total from unencrypted data. This process, unlike symmetric or asymmetric encryption, is one-way and irreversible.
Explain why hashing might be used to encrypt data.
Hashing might be used to encrypt private data such as a password or pin that does not need to be returned to its original value. In such a case, the attempted input (e.g. a user entering their password) would have the hashing function applied to it and then be compared to the hash total stored for the user’s password to verify whether or not it is correct.
Describe Run-Length Encoding.
Run Length Encoding is a compression technique that works by, rather than recording every digit in a sequence, recording the value of each digit along with the number of times it is consecutively repeated.
Define flat file database.
A flat file database is a database that consists solely of a single table, not relating to any other tables.
Define entity (using dentist example).
An entity is a category of object, person, event, or thing of interest about which data is to be recorded. E.g. a dentistry firm may need entities for Dentist, Patient and Appointment
Define attribute (using dentist example).
An attribute is a characteristic of an entity, or a column within an entity. E.g. attributes of the dentist’s Patient entity may include Title, Forename, Surname, Address, etc.
Define primary key (using dentist example).
A primary key is a kind of identifier that uniquely identifies an entity. E.g. a Dentist entity may have a primary key DentistID, which might be D01 for example.
Define foreign key.
A foreign key is a key that can link two different entities/tables.
Define secondary key.
A secondary key is any candidate key of an entity that is not selected as the primary key.
Define entity relationship modelling.
Entity relationship modelling is a diagrammatic way of representing the relationships between the entities in a database.
Define referential integrity.
Referential integrity is a concept which states that table relationships must always be consistent - whenever a foreign key is used it must reference a valid, existing primary key in another table.