14 - Databases Flashcards

(11 cards)

1
Q

How can timestamp ordering be used to manage concurrent access to a database?

A

Timestamps are generated for each transaction. Timestamps indicate the order that transactions occurred in. The database records the time of the last read/last write transaction for each record. The database server applies rules to determine if processing a transaction will result in loss of data integrity or inconsistency.

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

What does it mean for a database to be fully normalised?

A

Data is atomic; no repeating groups of attributes. No partial dependencies; all non-prime attributes are dependent on the whole of every candidate key. No non-key dependencies; every non-key attribute is dependent upon the key.

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

What are two problems that can occur with databases that are not fully normalised?

A
  • Redundant/duplicated data may waste storage space.
  • Inconsistent data may arise if the same data item is stored in multiple places.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a consequence of having duplicated data in a database?

A

If data is stored more than once, each copy would need to be updated if it changed.

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

What is the name given to a primary key made up of two attributes?

A

Composite key.

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

What is a server-side script?

A

A sequence of instructions executed on the server to generate a web page when requested.

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

What does it mean that the relations in a relational database are in Third Normal Form?

A

Every attribute in a relation is dependent on the whole key and nothing but the key.

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

Define the term foreign key.

A

An attribute in one relation/table that links to a primary key attribute in another relation/table.

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

Define an attribute.

A

A property or characteristic of an entity.

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

What makes a table un-normalised?

A

Contains a repeating group.

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

What is meant by a relational database?

A

A database structured as a series of tables/entities, where the DBMS provides tools for joining tables and selecting items.

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