Week 4 - Logical Design Flashcards
List the steps(9) of mappings an ER to a relational schema.
- Mapping of regular entity types
- Mapping of weak entity types
- Binary 1:1
- Binary 1:N
- Binary N:M
- Multivalued attributes
- N-ary relationships
- Specializations or generalizations
- Union types
What is data normalization?
What are the stages of normalization?
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.
What is meant by a single and atomic in a value?
Single: single value from a domain of attributes. Not multivalued.
Atomic: value cannot be divided further. Not composite.
What is a prime attribute?
An attribute is prime if it appears as a candidate key. (a key value used to uniquely identify a record)
What is a transitive dependency?
An attribute that is not a prime key or a subset of any key. ???
What is a transaction?
What is a transaction processing system?
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.
What is multiprogramming?
Why is concurrency beneficial in db management?
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.
What is granularity?
The size of a data item.
List the problems that occur with concurrency(3)
- Lost update problem (eg)
- Temporary update (dirty read) problem (eg)
- Incorrect summary problem.
List 6 methods a transaction can fail. Give examples.
- Computer failure - software/ hardware/ network
- Transaction error - division by 0
- Local errors - data not found
- Concurrency control enforcements - serializable and deadlock
- Disk failure - read/write head crash
- Physical problem or catastrophe
What are the states of a transaction?
Active –> partially committed –> committed
Active –> partially committed –> failed –> aborted
What are the desirable properties of a transaction?
- Atomicity - executing all actions in one step or not at all.
- Consistency preservation - each transaction leaves the db in a consistent state.
- Isolation - each transaction is executed by itself.
- Durability or permanency - when a transaction commits all updates made in the db should persist even if the system crashes later.
What is the state of a database?
What is meant by consistency?
- The collection of data in a db at a given point.
- A state that satisfies all constraints.
What is a schedule?
A sequence of operations from a set of transactions, where the operations are in their original order.
How can conflicting operations be identified?(3)
-They belong to two transactaions.
-Are accessing the same data item X
- at lease one operation is a write operation.