Week 4 - Logical Design Flashcards

1
Q

List the steps(9) of mappings an ER to a relational schema.

A
  1. Mapping of regular entity types
  2. Mapping of weak entity types
  3. Binary 1:1
  4. Binary 1:N
  5. Binary N:M
  6. Multivalued attributes
  7. N-ary relationships
  8. Specializations or generalizations
  9. Union types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is data normalization?
What are the stages of normalization?

A

The process of analyzing given relational schemas based on their primary keys and functional dependencies to minimize data redundancy and update anomalies.
1. 1NF - if attributes only take single and atomic values.
2. 2NF - every non-prime attribute fully funactionally depends on every candidate key.
3. 3NF - No non-prime attribute in transitively dependent on the primary key.
4. BCNF - only if every determinant is a key.

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

What is meant by a single and atomic in a value?

A

Single: single value from a domain of attributes. Not multivalued.
Atomic: value cannot be divided further. Not composite.

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

What is a prime attribute?

A

An attribute is prime if it appears as a candidate key. (a key value used to uniquely identify a record)

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

What is a transitive dependency?

A

An attribute that is not a prime key or a subset of any key. ???

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

What is a transaction?
What is a transaction processing system?

A

A transaction provides means of describing logical units of database processing.
A system with large databases and a large amount of concurrent users executing db transactions.

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

What is multiprogramming?
Why is concurrency beneficial in db management?

A

In Multiprogramming execution of programs are interleaved. Processes suspend and resume as needed with commands. Allows multiple users to access the db at the same time.
Serial execution provides poor performance.
Since disk assesses are frequent and slow, it’s better to work on multiple programs at once.

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

What is granularity?

A

The size of a data item.

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

List the problems that occur with concurrency(3)

A
  1. Lost update problem (eg)
  2. Temporary update (dirty read) problem (eg)
  3. Incorrect summary problem.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

List 6 methods a transaction can fail. Give examples.

A
  1. Computer failure - software/ hardware/ network
  2. Transaction error - division by 0
  3. Local errors - data not found
  4. Concurrency control enforcements - serializable and deadlock
  5. Disk failure - read/write head crash
  6. Physical problem or catastrophe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the states of a transaction?

A

Active –> partially committed –> committed
Active –> partially committed –> failed –> aborted

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

What are the desirable properties of a transaction?

A
  1. Atomicity - executing all actions in one step or not at all.
  2. Consistency preservation - each transaction leaves the db in a consistent state.
  3. Isolation - each transaction is executed by itself.
  4. Durability or permanency - when a transaction commits all updates made in the db should persist even if the system crashes later.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the state of a database?
What is meant by consistency?

A
  • The collection of data in a db at a given point.
  • A state that satisfies all constraints.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a schedule?

A

A sequence of operations from a set of transactions, where the operations are in their original order.

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

How can conflicting operations be identified?(3)

A

-They belong to two transactaions.
-Are accessing the same data item X
- at lease one operation is a write operation.

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

Conflict equivalent?
Conflict serializable?

A

?
?