Exchanging Data 1.3 Flashcards
Name the two categories of compression
Lossy and lossless
Explain lossless compression
lossless compression reduces the size of a file without losing any information
The original file can be recovered from the compressed
version
Explain lossy compression
lossy compression reduces the size of a file while also removing some of its information
What is the purpose of encryption?
To keep data secure during transmission
Name types of lossless compression
- Run Length Encoding
- Dictionary Encoding
Explain Run Length Encoding (RLE)
RLE is a method of lossless compression in which repeated values are removed and replaced with one occurrence of the data followed by the number of times it should be repeated
For example, the string AAAAAABBBBBCCC could be represented as A6B5C3 since ‘A’ is repeated 6 times etc..
When would and wouldnt you use run length encoding?
You would use run length encoding if there are many consecutive values. if there arent many it would not be useful
Explain Dictionary Encoding
Frequently occurring pieces of data are replaced with an index and compressed data is stored in a dictionary
The original data can then be restored using the dictionary.
When would dictionary encoding be used?
passages with repeated phrases
What is symmetric encryption?
Both the sender and receiver share the same private, This key is used for both
encrypting and decrypting data
If the key is intercepted during the key
exchange then any communications sent can be intercepted and decrypted using the key.
What is asymmetric encryption?
Both parties have a public and private key, where the public key is used for encryption and the private key is used for decryption
If person A wants to send a message to person B using asymmetric encryption, what key should they use to encrypt the message?
Person B’s public key
A message encrypted with B’s public key can only be decrypted with B’s private key which only person B has access to
What is it meant by compression?
Compression is the process of reducing the space requires to store a file
What is Hashing?
A technique used to store and retreive data in a table by using a unique key. it is used ti speed up searches and comparisions
Name two properties that a hashing algorithm should have
- Low chance of collision
- Quick to calculate
- Output smaller than the input
What is a Relational database?
a relational database is a type of database that stores data in tables, which are related through common fields
What is an entity?
An item of interest about which information is stored
what is a flat file?
A database that consists of a single file usually about one entity
What is a primary key?
A unique identifier for each record in a table
What is a foreign key?
The attribute which links two tables together
What is a secondary key and what is it for?
A key that is indexed to allow for faster searching
What is normalization?
Normalisation is the process of coming up with the best layout for a relational database
What does normalization try to accomplish?
- Records can be added and removed easily
- Complex queries can be carried out
- No redundancy (unnecessary duplicates)
- consistent data throughout linked tables
What is an index?
An index is a data structure used to look up and access data in a database quickly
What are the requirements to be in First Normal Form (1NF)?
It does not have any repeating attributes.
All the attributes must be atomic (a single attribute cannot more than one data)
e.g. a cell shouldn’t have first name and surname
What are the requirements to be in second normal form (2NF)?
- The database is in 1NF
- There are no partial dependencies (no composite keys)
What are the requirements to be in third normal form (3NF)?
- The database is in 2NF
- There are no non-key dependencies
This can be defined as saying
- ‘All attributes are dependent on the key, the whole key, and nothing but the key’
What does SQL stand for?
Structured Query Language
What is SQL?
A declarative language used to manipulate databases
What is referential integrity?
Referential integrity is the process of ensuring consistency, as it makes sure that information is not removed if it is required elsewhere in a linked database
What is a transaction defined as?
A transaction is a single operation executed on data