Databases Flashcards

1
Q

What is a relational database?

A

A relational database is a database where data is stored in tables.

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

What is an attribute?

A

An attribute is a column in a relational database. Each attribute can have its own data type.

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

What is a primary key?

A

A primary key is an attribute, or set of attributes, that will allow an entity to be identified unambiguously. A primary key must be unique.

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

What is a composite primary key?

A

The term for a primary key made up of multiple attributes.

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

What is a foreign key?

A

A foreign key is the primary key field of one table, that is stored in another table for the purpose of creating a link between the tables.

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

What is database normalisation?

A

Normalisation is a technique used to help reduce data duplication when designing data structures.

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

Describe a database in 1NF

A
  • Each record has a primary key
  • Data is atomic (1 value per column)
  • No repeating groups of attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Describe a database in 2NF

A

-No partial dependencies (A dependency based on only a part of a composite primary key)

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

Describe a database in 3NF

A

No non-key dependencies (no fields are dependent on other fields that are not part of the key)

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

Why are databases normalised?

A

Databases are normalised to help reduce data duplication when designing data structures, also resulting in an improvement in data integrity.

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