10. Fundamentals of Databases Flashcards

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

What is a Relational Database?

A

A Relational Database is a Database which stores information in Relations/Tables. Each Relation will consist of Records/Rows and Attributes/Columns.

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

What is SQL?

A

SQL is Structured Query Language, a language for communicating with Relational Databases.

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 a unique identifier for each Record in a Relation.

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

What is a Foreign Key?

A

A Foreign Key is an identifier for a Record in another Relation.

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

What is a Composite Key?

A

A Composite Key is a Key (Primary or Foreign) which consists of multiple Attrributes.

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

What is First Normal Form?

A

A Relation is in First Normal Form if it has no repeating Attribute or group of Attributes.

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

What is Second Normal Form?

A

A Relation is in Second Normal Form if it is in First Normal Form and there are no Partial Key Dependencies.

A Partial Key Dependency is when an Attribute is dependent upon only part of a Composite Key.

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

What is Third Normal Form?

A

A Relation is in Third Normal Form if it is in Second Normal Form and there are no Non-Key Dependencies.

A Non-Key Dependency is when an Attribute is dependent upon another Attribute which is not part of the Primary Key.

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

Why do we Normalise Databases?

A

Normalisation removes repetition/redundancy in a Database which has the following benefits:

  • Easier to update, as each value is only stored in one place. Repeating data can lead to an inconsistent Database.
  • Quicker to search, as we have smaller Relations with fewer Attributes.
  • Splitting data over multiple tables places constraints on how the the Database can be manipulated. These constraints may enforce Referential Integrity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why do Databases implement Record Locks?

A

Record Locks prevent multiple users from changing the same Record in a Relation at the same time which can lead to inconsistent results or corrupt data.

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

What is DeadLock?

A

DeadLock is when cyclical dependency appears between the Record Locks that users have created whilst interacting with a Database. For example user A may have locked Table 1 whilst waiting for user B to unlock Table 2, whilst user B is waiting for Table 1 to be unlocked to continue.

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