Databases Flashcards

1
Q

What does ACID stand for?

A

A- Atomicity

C - Consistency

I - Isolation

D - Durability

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

Explain ‘atomicity’

A
  • A transaction over the internet is a result of multiple small interactions
  • The transaction can only be complete if all are complete, so a transaction could either be fully complete or not at all
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain what happens if a transaction ‘aborts’?

A

If a database ‘aborts’, all actions taken in the transaction until that point are reverted to its original state.

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

What happens if a transaction ‘commits’?

A

The transaction goes through successfully

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

Explain ‘consistency’

A
  • A database must maintain referential integrity rules between linked tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain ‘isolation’

A
  • A transaction must have the same result as if all are being completed one after the other instead of sequentially
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain ‘durability’

A
  • A completed transaction must ‘survive’ in a database after power loss or crashes.
  • Transactions must be conducted in the background and then changes can be made to the database.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is ‘record locking?’

A

Where a person editing a database automatically locks it.
This allows others to view the database, but not edit it.

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

Why is record locking used?

A
  • Prevent loss of updates
  • Prevent inconsistencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a ‘deadlock’

A

Occurs when two people wish to access each other’s records at the same time, but cannot as they have both been locked.

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

Define ‘primary key’

A

A unique field that is used to identify records

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

Define ‘secondary key’

A

A key that can be used to search for records in a database

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

Define ‘foreign key’

A

A field that has a relational link to another table in a database

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

Define ‘flat-file database’

A

Database that consists of only one table and multiple records under it

  • Typically has a lot of repeating values
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define: ‘Composite key’

A

A combination of fields that could be used to identify records in a table

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

What are some disadvantages to flat-file databases?

A
  • Usually contain a lot of repeated records
  • Hard to edit and maintain due to human error and referential integrity rules being broken
17
Q

What is a ‘CSV File’?

A

Comma Separated Value file

Where data in databases are separated with the use of commas

18
Q

Define ‘relational database’

A

A database which uses more than one table to group linked pieces of data together

Tables are linked together via the use of foreign keys

19
Q

State the criteria required for a database to be normalised to 1NF

A
  • Must contain unique field names
  • Values in fields must have the same storage types
  • Must only be one value in a field
  • Records musn’t be identical/repeated
  • Each table must have a primary key
20
Q
A