Databases Flashcards

1
Q

What is a flat file?

A

A database that consists of a single file/table.
Based around a single entity and it’s attributes.

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

What is a disadvantage of a flat file?

A

Lead to duplication/redundancy if second user entries need to be recorded.
Can lead to inconsistency - database becomes inconsistent in it’s use before repeated value occurred.

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

What is a record?

A

Row - Collection of fields about the same entity in a database

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

What is a field?

A

Individual attributes about same entity in a database

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

What is an entity?

A

A category of a person/real world object/event where data needs to be recorded

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

What is a primary key?

A

Unique identifier of a record in a table eg. customerID

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

What is secondary key

A

Allows a database to be searched quickly as it can be used as a search term/query

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

What are the entity relationship models

A

One to many
Many to Many
One to one

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

What is database normalisation aimed to do

A

Reduce inconsistencies
Reduce redundancies

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

Three types of normalisation and characteristics

A

First normal form (USA)
-Has a primary key
-Atomic values (non divisible, just one value)
-Single value

Second normal form
-should be in 1nf
-no partial dependencies

3NF
-should be in 1nf,2nf
-no transitive/non key dependencies - attribute should only depend on primary key not each other

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

What are the seven commands SQL can do

A

ORDER BY
UPDATE
DELETE
CREATE
JOIN
INSERT INTO
ALTER

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

What is referential integrity?

A

Process of ensuring consistency
Ensures data is not removed if required elsewhere in a linked database

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

What is ACID?

A

Atomic - A transaction should be processed fully otherwise it wont be recorded
Consistency - any changes should not break the database, must be consistent with how it was before the change.
Isolation - transactions should be isolated and not interfere with another transaction
Durability - a transaction must remain in the database

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

What is data integrity?

A

Accuracy and reliability of data in a computer system

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

What is record locking?

A

Process of preventing simultaneous access to records so theyre not accessed at the same time

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