1.3 Exchanging Data

Subdecks (3)

Cards (103)

  • Define the term Hash
    a result generated by applying an algorithm to a value
  • Advantages of Hashing
    hash functions cannot be reversed
  • Symmetric Encryption
    Single key is used to encrypt and decrypt a message and both parties need to know the key
  • Disadvantage of symmetric encryption
    messages can be cracked if:
    • key is intercepted
    • key is duplicated
  • Asymmetric Encryption
    two different keys one is used as a public key while the other a private key
  • What is the purpose of transaction processing?

    to ensure data integrity
    all data management systems must conform to a set of rules
  • Atomicity
    a change to a database is either completely performed or not at all. a half-completed change must not e saved back to the database
  • Consistency
    any change in the database must retain the overall state of the database
  • Isolation
    a transaction must not be interrupted by another transaction
  • Why is isolation important?
    so other users or processes cannot access data concerned
  • Durability
    once a change has been made to a database it must not be lost due to system failure
  • dictionary based encoding
    Lossless data compression
    Searches for matches between the text to be compressed and a set of strings contained in a dictionary
  • hashing
    The process of calculating a numeric value from a data item, usually an index from a unique key
  • Lossless
    Partial reduction in file size but none of the data is lost
    The original file can be recreated from the compressed data
  • Lossy
    Greatly reduces file size but some data is lost
  • What is lossy used in?
    images, audio and video where a certain level of quality loss is acceptable in exchange for smaller file sizes
  • Examples of uses of lossless

    ZIP, PNG, FLAC for audio
  • What type of compression does run length encoding use?
    lossless
  • Explain why asymmetric encryption is more suited to transactions over the internet than symmetric encryption
    One key encrypts the data which can be publicly distributed and a different key to decrypt it which is kept private whereas in symmetric encryption one key is shared to both parties, this can get intercepted
  • Dictionary based encoding (how it works)
    • Frequently occurring pieces of data or sets of characters are replaced by symbols/tokens
    • Which are then matched to a dictionary against it's groups of characters.
    • This makes it so that when decompressing the dictionary can be used to replace the symbols/tokens with the original text
  • What type of compression is dictionary based encoding?
    lossless
  • Uses of hashing
    Hashing for security:
    hash passwords in database to make sure they cannot be read if they are stolen
    Hashing for direct access:
    Records can be quickly accessed by using hash of index as address
  • Lossy
    • permanently removes data
    • not able to recreate the original file
    • reduces quality of videos
    • file size is smaller than if lossless were used
    • compression ratio may be adjusted depending on bandwidth
  • Lossless
    • rewrites original data in more efficient format
    • able to recreate the original file
    • keeps original quality
  • Disadvantage of record locking
    Can cause delays or use deadlock
  • Explain how record locking can be used to ensure that the ACID principle of isolation is achieved when carrying out multiple transactions
    allows one user/process to access and modify record level data at any one time
    So data that is being used elsewhere cannot be modified
  • Two methods of exchanging data
    • SQL
    • JSON
    • XML
    • APIs
  • Where is javascript executed?
    client-side