Section 4: Exchanging data Flashcards

1
Q

Why are sound and image files often compressed?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe how lossy and lossless compression differ.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Describe an advantage and disadvantage of Run-Length Encoding.

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Describe an advantage and disadvantage of lossy compression.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe how a dictionary-based compression technique works.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define encryption.

A

Encryption is the transformation of data from one form to another to prevent an unauthorised third-party from being able to understand it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define symmetric encryption.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Define asymmetric encryption.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Describe how hashing can be used to encrypt data.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain why hashing might be used to encrypt data.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Describe Run-Length Encoding.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define flat file database.

A

A flat file database is a database that consists solely of a single table, not relating to any other tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Define entity (using dentist example).

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define attribute (using dentist example).

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define primary key (using dentist example).

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define foreign key.

A

A foreign key is a key that can link two different entities/tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Define secondary key.

A

A secondary key is any candidate key of an entity that is not selected as the primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Define entity relationship modelling.

A

Entity relationship modelling is a diagrammatic way of representing the relationships between the entities in a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Define referential integrity.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Explain the concept of a relational database.

A

In a relational database, a separate table is created for each entity identified in the system. Where a relationship exists between entities, an extra field called a foreign key links the two tables.

21
Q

How do you know when a table is in First Normal Form (FNF)?

A

A table is in FNF if it contains no repeating attribute or group of attributes.

22
Q

How do you know when a table is in Second Normal Form (SNF)?

A

A table is in SNF if it is in FNF and it contains no partial dependencies. In SNF, many-to-many relationships are not allowed.

23
Q

What is a partial dependency?

A

A partial dependency would mean that one or more of the attributes depends on only part of the primary key, which can only occur if the primary key is a composite key.

24
Q

What is a composite key?

A

A composite key is a combination of two or more attributes that can be used to uniquely identify each row in the table.

25
Q

How do you know if a table is in Third Normal Form (TNF)?

A

A table is in TNF if it is in SNF and contains no non-key dependencies:
“All attributes are dependent on the key, the whole key and nothing but the key.”

26
Q

What is a non-key dependency?

A

A non-key dependency is where the value of an attribute is determined by the value of another attribute which is not part of the key.

27
Q

What are the advantages of having a normalised database?

A

Advantages of having a normalised database:

  • Makes it easier to maintain and modify the database since there is no unnecessary duplication of data
  • Faster searching and sorting since there are smaller tables with fewer fields, also takes up less storage space
  • Won’t allow records on the ‘one’ side of a one-to-many relationship be deleted
28
Q

How would data usually be transcribed manually?

A

Usually if data is transcribed manually it would be by manually entering the details of a physical form, such as a survey on paper, into a database.

29
Q

What technology is used to cash cheques at a bank?

A

Cheques paid in at bank are scanned using Magnetic Ink Character Recognition (MICR), which prints the bank number, account number and cheque number in special magnetic ink. The sum being paid, however, is entered manually by the clerk.

30
Q

What are examples of electronic data capturing methods other than MICR?

A

Examples of electronic data capturing methods:

  • Optical Mark Recognition (OMR) e.g. in the Maths challenge
  • Optical Character Recognition (OCR) e.g. on a reg. plate
  • Smart card readers
  • Scanners (e.g. ones used for passports or barcode scanners)
31
Q

What is Electronic Data Interchange (EDI)?

A

EDI is a way for computer systems to transfer data without any need for human intervention. Transaction software processes the information and the software on the receiving end looks up the relevant details.

32
Q

What is an example of EDI?

A

Example of EDI:

Insurance company checking if an applicant has a driving licence.

33
Q

What is a transaction in the context of databases?

A

In the context of databases, a transaction is any logical operation on data.

34
Q

What is ACID in databases?

A

ACID is a set of properties that guarantees transactions are processed reliably.

35
Q

What is the A in ACID?

A

Atomicity - requires that a transaction is processed in full or not at all i.e. must guarantee that in any situation (including power cuts or hard disk crashes) the transaction cannot be processed in part only.

36
Q

What is the C in ACID?

A

Consistency - transactions must maintain referential integrity of the database.

37
Q

What is the I in ACID?

A

Isolation - ensures that concurrent execution of transactions leads to the same results as if transactions were processed one after another.

38
Q

What is the D in ACID?

A

Durability - ensures that once a transaction has been committed, it will remain so (even in the event of a power cut).

39
Q

What is the main problem with multi-user databases?

A

The main problem with multi-user databases is that if multiple users try to access the database simultaneously then it may cause one of the updates to the database to be lost.

40
Q

Explain why updates can be lost on a multi-user database.

A

When an item is updated, the entire record (indeed the whole block in which the record is physically held) will be copied into the user’s own local memory area at the workstation. When the record is saved, the block is rewritten to the file server. If this is done by more than one person simultaneously, their updates versions of the record will not take into account the other users’ updates.

41
Q

What is record locking?

A

Record locking is the technique of preventing simultaneous access to objects in a database in order to prevent updates being lost or inconsistencies in the data arising.

42
Q

How does record locking work?

A

A record is locked whenever a user retrieves it for editing or updating. Anyone else attempting to retrieve the same record is denied access until the transaction is completed or cancelled.

43
Q

What is the main problem with record locking?

A

If two users are attempting to update two records, a situation can arise in which neither of them can proceed, known as deadlock.

44
Q

What is serialisation?

A

Serialisation is a technique which ensures that transactions do not overlap in time and therefore cannot interfere with each other or lead to updates being lost. A transaction cannot start until the previous one has finished. It can be implemented using timestamp ordering.

45
Q

What is timestamp ordering?

A

Timestamp ordering is a serialisation technique which ensures that every time a transaction starts, it is given a timestamp, so that if two transactions affect the same object, the system knows which one was applied first.

46
Q

How does timestamp ordering work?

A

Every object in the database is given a read and write timestamp, which are updated every time an object is read to or written to.

47
Q

What is commitment ordering?

A

Commitment ordering is a serialisation technique

48
Q

What are the consequences of lacking referential integrity?

A

Consequences of lacking referential integrity:

- Incomplete data could be returned, often without a