Podcast
Questions and Answers
What is the key difference between transient and persistent objects?
What is the key difference between transient and persistent objects?
- Transient objects are immutable, while persistent objects are mutable.
- Transient objects can be referenced by other objects, while persistent objects cannot.
- Transient objects exist temporarily, while persistent objects are stored permanently. (correct)
- Transient objects retain their state after program termination, while persistent objects do not.
What is an example of behavior inheritance?
What is an example of behavior inheritance?
- A TEACHER class that implements the IS-A relationship with PERSON. (correct)
- A PERSON class inheriting properties from a HUMAN class.
- A STUDENT subtype having specific attributes like Major and Gpa.
- A BACHELOR subclass derived from the STUDENT class.
What does reachability imply in the context of persistent objects?
What does reachability imply in the context of persistent objects?
- The object can only be accessed locally within its execution scope.
- The object is permanently stored in the database and can be accessed by its identifier.
- The object can be located through references from other persistent objects. (correct)
- The object is deleted once the program terminates.
Which statement best describes fixed-length records?
Which statement best describes fixed-length records?
What is a dense index?
What is a dense index?
In what situation would spanned organization be used?
In what situation would spanned organization be used?
What is the purpose of tuning indexes?
What is the purpose of tuning indexes?
Which statement about variable-length records is accurate?
Which statement about variable-length records is accurate?
What is a potential impact of creating and dropping indexes?
What is a potential impact of creating and dropping indexes?
What does a write lock ensure in a transaction system?
What does a write lock ensure in a transaction system?
What defines a serial schedule in transaction management?
What defines a serial schedule in transaction management?
What occurs during a deadlock situation?
What occurs during a deadlock situation?
In the context of lock upgrading, what must a transaction do to upgrade from a read lock?
In the context of lock upgrading, what must a transaction do to upgrade from a read lock?
What characterizes starvation in a transaction system?
What characterizes starvation in a transaction system?
Which of the following is a recommended approach when detecting a deadlock?
Which of the following is a recommended approach when detecting a deadlock?
What does a read lock allow in a transaction environment?
What does a read lock allow in a transaction environment?
Flashcards are hidden until you start studying
Study Notes
Object Databases
- Object databases store complex objects, which consist of an identifier and a state.
- Object identifiers are immutable, while the state can be modified.
- Literals have a fixed value but lack an object identifier.
- Transient objects are temporary and exist only during program execution.
- Persistent objects are permanently stored in the database and survive program termination.
- Naming mechanism allows objects to be found by their unique names.
- Reachability enables objects to be located through references from other persistent objects.
- Inheritance allows the definition of new object types (subtypes) based on existing types (supertypes), creating a hierarchy of types or classes.
- Extents are named persistent objects that hold collections of all persistent objects for a specific class.
- Every object in a subtype's extent must also be a member of its supertype's extent.
- Objects are characterized by five aspects: identifier, name, lifetime, structure, and creation.
- Behavior inheritance, also known as "IS-A" or interface inheritance, allows subtypes to inherit the behavior of their supertypes.
File Organization
- Fixed-length records are all the same size within a file.
- Variable-length records have different sizes, and can be stored using spanned or unspanned organization.
- Spanned organization allows records to span multiple blocks when they exceed a single block size.
- Unspanned organization restricts records to a single block boundary.
- Dense indexes contain an index entry for each search key value in the data file.
- Sparse indexes contain index entries for only a subset of search key values.
- Secondary indexes provide an alternative access mechanism for data files.
- Index tuning, also known as index optimization, involves reviewing and adjusting database indexes to improve query performance.
Indexing & Performance
- Slow queries can occur due to the absence of suitable indexes.
- Unused indexes consume resources unnecessarily.
- Frequent updates to indexed data can decrease database performance.
- Index tuning needs dynamic evaluation due to the varying nature of database usage over time.
- Creating or dropping indexes can improve performance but can temporarily disrupt table updates.
Concurrency Control
- Binary locks offer two states: locked and unlocked (1 and 0).
- Read locks (share locks) allow multiple transactions to read an item concurrently.
- Write locks (exclusive locks) grant exclusive read/write access to a single transaction.
- Lock upgrade allows a transaction to transition from a read lock to a write lock if it's the only reader.
- Lock downgrade allows a transaction to transition from a write lock to a read lock.
- A serial schedule ensures that transactions execute one after another in a strict order.
- Deadlock occurs when two or more transactions wait for each other's locked resources.
- Starvation occurs when a transaction remains blocked for an extended period while other transactions proceed.
- When a deadlock is detected, a "victim" transaction is chosen to be terminated.
- Choosing long-running or high-update transactions as victims should be avoided to prevent significant data loss.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.