Section 4 - exchanging data Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What does ACID stand for?

A

Atomicity, Consistency, Isolation, durability

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

Name 5 automated transaction methods

A

Smart card readers,
barcode readers,
scanners,
optical character recognition,
optical mark recognition

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

What 4 ways can data from transaction processing data be sent to a database?

A

automatically using DBMS software,
typing it into a customized form,
importing it from a spreadsheet or file,
using EDI (Electronic Data Interchange)

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

What is Electronic Data Interchange (EDI)?

A

EDI is the computer to computer exchange of documents such as purchases, invoices or shipping documents between businesses or business partners.

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

What needs to happen to EDI data to make it useable?

A

EDI data needs to be translated by EDI translation software in order to be added to a company database

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

What is a transaction in terms of databases?

A

A single logical database operation

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

What is the purpose of ACID?

A

To ensure the integrity of a database is maintained under all circumstances

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

What does ACID do practically?

A

Guarantees that transactions are processed reliably

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

What does Atomicity in ACID mean?

A

A transaction or query is either fully processed or not processed at all. It is not possibly to execute only part of a transaction.

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

What does Consistency in ACID mean? (use referential integrity)

A

Consistency ensures no transaction can violate the pre-defined rules for data validation. Referential integrity, defined when the database is set up, will always be upheld

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

What does Isolation mean in ACID?

A

Isolation ensures that concurrent execution of transactions gives the same result as if the transactions were executed one after another.

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

In what kind of database is Isolation important?

A

Multi-user databases.

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

What does Durability mean in ACID?

A

Durability ensures that once a transaction has been committed then it will remain committed even in the event of a power cut.

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

How is Durability achieved in a database?

A

As each part of a transaction is completed, it is held on a buffer disk until all elements of the transaction have been completed.

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

What does record-locking do?

A

It prevents simultaneous access to elements in a database to prevent updates being lost or inconsistencies in the database arising.

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

How does a deadlock happen with record-locking?

A

If two users attempt to edit two different records, they can lock both records and cause a deadlock

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

What is serialization?

A

Serialization is a Database Management system that ensures transaction do not overlap in time and therefore cannot interfere with each other.

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

Name 2 serialization techniques

A

Timestamp ordering
Commitment ordering

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

How does timestamp ordering work?

A

A transaction is given a read and write timestamp. If the user tries to save an update and the read timestamp is not the same as when they started, the DBMS knows another user has accessed the same object.

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

How does commitment ordering work?

A

Transactions are ordered in terms of their dependencies on each other as well as the time they were initiated. It prevents deadlocking by blocking one request until another one is completed.

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

How do many systems use redundancy to ensure they have no database downtime?

A

They have duplicate hardware in a separate geographical location that automatically takes over the main database if it goes down

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

Why might someone compress a file?

A

To reduce data usage when transferring over the internet
To allow a file to be posted online
To store a file using less data

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

Name 3 lossy compression examples

A

JPG
MP3
AVC (video)

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

Name 3 lossless compression examples

A

GIF
PNG
ZIP

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

Simply, how does lossless compression work?

A

Lossless compression looks for patterns in given data and reduces an original file to these patterns, allowing a receiver to rebuild the compressed file.

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

How does run-length encoding (RLE) work?

A

Run-length encoding compresses a file to only the patterns within it. For example, if an image has 6 green, 5 yellow and 17 orange pixels in a line, instead of storing these pixels individually as 28 bits, the computer would store it as the number of what colour pixel, reducing this sample to only 6 bits (one bit for the number, one bit for the colour).

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

How does dictionary-based compression work?

A

A compressed message is sent alongside a dictionary containing words and corresponding coded values which is then used to rebuild a compressed image on the other side while transmitting much less data.

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

What is data before it has been encrypted known as?

A

Plaintext

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

What is encrypted data called?

A

Ciphertext

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

What is an encryption method or algorithm known as?

A

The cipher

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

How does the Caesar cipher work?

A

By shifting letters to represent other ones directly

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

Why is the Vernam cipher so good?

A

It is the only cipher still proven to be unbreakable.

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

How does the Vernam cipher work?

A

By exchanging a one-time pad with someone, in person, and destroying it after use, the distribution of encrypted characters is completely random making it theoretically unbreakable, given that the one-time pad is not compromised

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

How is a one-time pad used with a message to encrypt it?

A

Each bit of each letter in the original text is XORd with each corresponding bit in the corresponding letter of the one-time pad. This resulting binary value is then converted using ASCII.

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

Why are modern-computer-generated encrypted messages never perfectly secure?

A

The keys they generate are never perfectly random but always predictable in some mathematical way.

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

How can you make a perfectly secure encryption key?

A

By creating it with a truly random natural phenomenon such as white noise or radioactive decay.

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

How does symmetric encryption work?

A

The same key is used to encrypt the data as to decrypt the data and so the key is transmitted with the ciphertext.

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

What is key exchange?

A

When an encryption key is transmitted alongside ciphertext

39
Q

Why is symmetric encryption not secure?

A

The ciphertext and the key are both easy to intercept together.

40
Q

How does asymmetric encryption work?

A

Asymmetric encryption involves encrypting a message with a publically known encryption key, then sending this message to someone who has a private key that only they know, which is then used to decrypt the data.

41
Q

Why is public key encryption good?

A

The private key is never sent over the internet and it is virtually impossible to deduce a private key from a public key.

42
Q

What is hashing?

A

Hashing involves converting plaintext by mapping it to a hash function and changing the length and characters of the plaintext. It is a one-way conversion.

43
Q

What is a use of hashing?

A

Storing passwords by comparing the stored, hashed password with hashed text that a user has entered.

44
Q

What is a hash total?

A

A hash total is a mathematical value calculated from a whole piece of unencrypted data. It is used to check unhashed data with a stored hash value.

45
Q

How does a digital signature work?

A

A digital signature is a hash total that has been attached to a sent file and has been encrypted by the sender’s private key. Since only the sender can decrypt it with their key, it can authenticate someone as the original owner of some data when it is decrypted on the other end by the sender’s public key to reproduce the hash total given by the sender which gets compared with the original hash total to ensure the data has not been tampered with.

46
Q

What is a digital certificate and how do they work?

A

A digital certificate is a confirmation that a public key is formally registered to that sender and verifies the trustworthiness of a t=sender or website.

47
Q

What is a public key infrastructure?

A

A PKI is a service that authenticates end users and ensures that they are trustworthy.

48
Q

What is an entity in terms of a database?

A

A category of an object, person, event or thing of interest to an organisation of which data is to be recorded. I.e. Employee, film, actor, product, recipe, ingredient.

49
Q

What is a flat-file database?

A

A database that consists of only a single file.

50
Q

What is an attribute in a database?

A

Something that an entity may have. I.e. A patient entity may have attributes of title, first name, surname etc

51
Q

What is an entity identifier and what is it known as?

A

An entity identifier is a unique identification for an entity, in a relational database this is the primary key.

52
Q

What is a secondary key?

A

A secondary key is a key contained in a secondary index that relates say, surname to a patient ID number, the primary key

53
Q

What are the three degrees of relationship between two entities in a database?

A

one-to-one
one-to-many
many-to-many

54
Q

Give an example of a one-to-one relationship between data

A

husband and wife or country and prime minister

55
Q

Give an example of a one-to-many relationship between data

A

Mother and child(ren), customer and order(s), borrower and book(s)

56
Q

Give an example of a many-to-many relationship between data

A

Student and course, stock item and supplier, film and actor

57
Q

What is a foreign key used for?

A

To link two tables together with a primary key from another table

58
Q

How do you represent a foreign and primary key in a database relationship diagram?

A

Primary keys are put with an asterisk, foreign keys are put in italics

59
Q

What is needed to join two tables in a many-to-many relationship?

A

An extra table in the middle that contains both primary keys of each original table, making this a one-to-many-to-one relationship

60
Q

What is a composite primary key?

A

A primary key which consists of more than one attribute, such as also being a foreign key.

61
Q

What is referential integrity?

A

When two databases are linked, you need to ensure no data is deleted during linking.

62
Q

How do you show a primary key when defining a database in writing?

A

Underline it

63
Q

How is indexing used in databases and why?

A

Primary keys and secondary keys are indexed in a separate table by the database to speed up searching so that it does not have to be sequential which would be very slow

64
Q

What must a foreign key be with respect to an original database?

A

It must be the primary key of another database

65
Q

What are the 4 parts to ensure that a database is normalised?

A

No data should be duplicated
Data should be consistent throughout a database
Each table should be flexible enough to allow as much data as needed to be entered per entry in the table
The structure should ensure a user can make all kinds of complex relations between different tables

66
Q

What needs to happen for a table to be in first normal form?

A

It cannot contain any repeating attributes or groups of attributes

67
Q

How do you convert a many-to-many relationship to first normal form?

A

You must use a third table to link the two together by using composite keys to ensure no repeating attributes or groups of attributes.

68
Q

What defines a table as being in second normal form?

A

There are no partial key dependencies

69
Q

What is partial key dependency?

A

When one or more attributes in a table depend only on part of the primary key which can only occur when a composite key is used. I.e. A table with a composite key (basically 2 primary keys) contains an attribute that only relates to one of the parts of the primary key

70
Q

When is a table in 3rd normal form?

A

when a database is in second normal form and contains no ‘non-key dependencies’

71
Q

What is non-key dependency?

A

When the value of an attribute in a table is determined by the value of another attribute that is not part of the key

72
Q

What is a good saying to describe when a table is in third normal form?

A

All attributes are dependent on the key, the whole key, and nothing but the key

73
Q

What is the importance of normalisation? (4)

A

It removes data redundancy (repeated or unimportant data)
It makes databases easier to maintain and modify
It allows for faster searching and sorting of data
It allows for proper relation protection in one-to-many relationships by preventing the ‘one’ from being deleted

74
Q

What is meant by data integrity?

A

When a database maintains its integrity since no data is duplicated or unnecessary therefore no inconsistencies can ever appear or impossible actions can be made, such as transactions being made for a non-existent customer.

75
Q

How does normalisation of a table allow for faster sorting and searching of that table?

A

It reduces the size of tables and creates fewer fields. This also lets databases take up less space.

76
Q

What kind of language is SQL?

A

a declarative language

77
Q

What 4 English words (not boolean) can be used in an SQL query?

A

IN (looks for values that satisfy a constraint)
LIKE (similar to)
BETWEEN…AND (within a range of data)
IS NULL

78
Q

What would the SQL query be to return an ordered dataset where RecordCompany is descending and so is Date within it?

A

ORDER BY RecordCompany, Date Desc

79
Q

How would you select more than one attribute in multiple separate tables?

A

Either join all tables with a common attribute (using join) or reference the desired attributes with tablename.fieldname and then specify in the WHERE section, tablename.commonfieldname = table2name.commonfieldname for all table links.

80
Q

How do you create a table in SQL?

A

CREATE TABLE tablename (
attribute space qualities (datatypes)
)

81
Q

What datatypes can be used in a SQL table?

A

CHAR (character of fixed length n)
VARCHAR (character of max length n)
BOOLEAN
INT
FLOAT
DATE
TIME
CURRENCY (formats numbers into local currency)

82
Q

How do you add a column to a SQL table?

A

ALTER TABLE tablename
ADD column datatype

83
Q

How do you delete a column from a SQL table?

A

ALTER TABLE tablename
DROP COLUMN column

84
Q

How do you change the datatype of a column in a SQL table?

A

ALTER TABLE tablename
MODIFY COLUMN column newDataType

85
Q

How do you define a foreign key when making a table in SQL?

A

when writing the attributes and datatypes, write:
FOREIGN KEY foreignattribute REFERENCES table(column)

86
Q

How do you define the primary key(s) of a table in SQL?

A

when writing the attributes and datatypes, write:
PRIMARY KEY (attribute, any other attributes)

87
Q

How do you insert data into an SQL table?

A

INSERT INTO tablename (column1, column2, …)
VALUES (value1, value2, …)

88
Q

How do you update a value or values in a SQL table?

A

UPDATE tablename
SET column1 = value1, column2 = value2, …
WHERE columnX = value

89
Q

How do you delete values from a table with SQL?

A

DELETE FROM tablename
WHERE column = value

90
Q

What are two possible methods of transferring written data to stored data (on a computer)

A

Scan something written in MICR (magnetic ink)
Use OMR (optical mark recognition)

91
Q

Why is ACID necessary?

A

To ensure that a single transaction can always be processed and never only half filled

92
Q

What is a primary key?

A

A field in a table which is completely unique and never repeats

93
Q

Name 4 methods of exchanging data with other computer systems

A

JSON
CSV
SQL
EDI

94
Q

What are 2 disadvantages of record-locking?

A

It can cause deadlocks and delays