(P2) Fundamentals of Databases Flashcards

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

What is a primary key?

A

Primary key is a field that uniquely idnetifies each record in a table.

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

What is a composite key?

A

Composite key is a specific type of primary key that uses the contents of two or more fields from a table to create a unique value.

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

What is a surrogate key?

A

Surrogate key is when a table does not have a naturally occurring primarg key and so a new field is created and the surrogate key acts as a primary key.

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

What is a foreign key?

A

Foreign key is a field that is linked to anothet table’s primary key in a relationship between two tables.

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

What is an entity?

A

An object, person or thing of interest, which data is stored about.

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

What is an attribute?

A

Characteristic or information about an entity.

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

What is entity identifier?

A

An attribute given to each entity which is unique within that table.

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

How is a primary shown?

A

Underline.

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

For which relationship does a new table need to be created?

A

Many to many.

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

What is the new table for a many to many relationship called?

A

Link table.

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

Why are databases normalised?

A

So they can be efficient without any compromise to the integrity of their data.

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

What does database normalisation ensure?

A

There is no redundant or repeated data.

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

What are the advantages of database normalisation?

A

Faster searching and sorting than an unnormalised database due to it being smaller.
Easier to maintain.
Duplication of data is minimised and data consistency is improved, reducing the number of update, insertion and deletion anomalies.

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

What is the first normal form?

A

Contains no repeating attributes.
Database can be referred to as atomic (no single column contains more than one value).

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

What is second normal form?

A

Meet first normal form requirements.
Partial key dependencies are removed.

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

What is partial key dependency?

A

When a non-key attribute doesn’t depend on the whole of the composite key.

17
Q

What is the third normal form?

A

Meets requirements of first and second normal form.
Have no non-key dependencies.
“All non-key attributes depend on the key, the whole key and nothing but the key.”