Unit 4 : Exchanging Data Flashcards
What is compression
● The process used to reduce the storage space required by a file
● Particularly important for sharing files over networks or the Internet
● Increases the number of files that can be transferred in a given time
● Downloading a compressed file is faster than downloading the full version
What is lossy compression
● Lossy compression reduces the size of a file while also removing some information
What is lossless compression
● Lossless compression reduces the size of a file without losing any information
what is run length encoding
● A method of lossless compression
● Repeated values are removed and replaced with one occurrence followed by the number of times it should be repeated
● Relies on consecutive pieces of data being the same
● Doesn’t offer a great reduction in file size if there’s little repetition
What is dictionary encoding
● A method of lossless compression
● Frequently occurring pieces of data replaced with an index
● Compressed data is stored alongside a dictionary
● Dictionary matches frequently occurring data to an index
● Original data can be restored using the dictionary
What is encryption
● Used to keep data secure when it’s being transmitted
What is asymmetric encryption
● Two keys are used: public and private
● The public key can be published anywhere
● The private key must be kept secret
● Together, the keys are known as a key pair
● The keys are mathematically related to one another
● Messages encrypted with the public key can only be decrypted with the corresponding private key
● Encrypting a message using your private key verifies that the message was sent by you. If your public key can decrypt a message, then it must have been encrypted with your private key, which only you have access to.
What is Hashing
● An input (called a key) is turned into a fixed size value (called a hash)
● A vast number of algorithms, called hash functions, do this
● The output of a hash function can’t be reversed to form the key
● the keys, which can’t be reversed to gain the passwords.
● A hash table is a data structure which holds key-value pairs
● Hash tables can be used to lookup data in an array in constant time
● Hash tables are used extensively in situations where a lot of data needs to be stored with constant access times. For example, in caches and databases
● If two keys produce the same hash, a collision is said to occur
● Methods to overcome collisions include storing items together in a list under the hash value and using a second hash function to generate a new hash
● A good hash function should have a low chance of collision and should be quick to
calculate
● A hash function’s output should be smaller than the input it was provided
What is a relational database
● A relational database is one which uses different tables for different entities.
● An entity is an item of interest about which information is stored.
What is a flat file
● A flat file database consists of a single file.
● The flat file will most likely be based around a single entity and its attributes.
● Attributes are the categories about which data is collected.
● Flat files are typically written out in the following way:
Entity1(Attribute1, Attribute2, Attribute3 …)
What is a primary key
● The unique identifier which is different for each object added to the database.
What is a foreign key
● A foreign key is the attribute which links two tables together.
What is a secondary key
● A secondary key is used to enable a database to be searched quickly
● This will allow the table to be sorted on this attribute.
What are the different types of entity relationship modelling
● One-to-one: Each entity can only be linked to one other entity.
● One-to-many: One table can be associated with many other tables.
● Many-to-many: One entity can be associated with many other entities and the same applies the other way round
What is normalisation
● The process of coming up with the best possible design for a relational database is called normalisation.
● Normalisation tries to accomplish the following things:
○ No redundancy (unnecessary duplicates)
○ Consistent data throughout linked tables.
○ Records can be added and removed without issues.
○ Complex queries can be carried out.