Unit 4 - Exchanging Data Flashcards
1
Q
What is the difference between lossy and lossless compression?
A
- Lossy compression permanently removes data, lossless temporarily removes data.
- Lossy compression reduced file size more than lossless.
- Lossless compression is more suitable for images and texts.
2
Q
What is dictionary encoding?
A
- Regularly-occurring data is stored separately in a dictionary
- The dictionary must be sent along with the encoded file
3
Q
What is Run Length Encoding?
A
- Patterns of consecutive data are summarised into numerical values.
4
Q
Explain what happens when two keys produce the same hash.
A
- Collision
- Solved by chaining, where hashes are stored in linked lists in a FILO order
- Or solved by using a hash function again
- Or solved by storing in the next empty location
4
Q
What is hashing? (not the best definition)
A
- When data is converted using a hash function into a short fixed-size value, represented by a key
- Hashes can’t be reversed to form the inputted key
5
Q
What is referential and data integrity?
A
- Referential integrity: no foreign key in one table can reference a non-existent record in a related table
- Data integrity: no possibility of having repeating attributes
6
Q
Explain the features of each normal form.
A
- 1NF: primary key, no repeating attributes
- 2NF: in 1NF, no partial dependencies (dependent on only part of a composite key)
- 3NF: in 2NF, no non-key dependencies
7
Q
Explain the features of ACID.
A
- Atomicity: transactions are either fully completed or not completed at all (bot recorded)
- Consistency: transactions maintain referential integrity (be consistent with how it was before the change/transaction)
- Isolation: transactions must not be interrupted by or interfere with other transactions
- Durability: transactions are not undone from system failure (so must remain in database)