Professional Documents
Culture Documents
Advanced DB Review Questions
Advanced DB Review Questions
23. In case of transaction failure under a deferred update incremental logging scheme, which
of the following will be needed?
a. an undo operation
b. a redo operation
c. an undo and redo operation
d. none of the above
Answer: an undo and redo operation
24. For incremental logging with immediate updates, a log record for a transaction would
contain
a. a transaction name, a data item name, and the old and new value of the item
b. a transaction name, a data item name, and the old value of the item
c. a transaction name, a data item name, and the new value of the item
d. a transaction name and a data item name
Answer: a transaction name, a data item name, and the old and new value of the item
25. For correct behavior during recovery, undo and redo operations must be
a. Commutative
b. Associative
c. Idempotent
d. distributive
Answer c Idempotent
26. When a failure occurs, the log is consulted and each operation is either undone or redone.
This is a problem because
a. searching the entire log is time consuming
b. many redos are unnecessary
c. both (a) and (b)
d. none of the above
Answer: both (a) and (b)
27. Using a log-based recovery scheme might improve performance as well as provide a
recovery mechanism by
a. writing the log records to disk when each transaction commits
b. writing the appropriate log records to disk during the transaction’s execution
c. waiting to write the log records until multiple transactions commit and writing them
as a batch
d. never writing the log records to disk
Answer c: waiting to write the log records until multiple transactions commit and writing them
as a batch
28. There is a possibility of a cascading rollback when
a. a transaction writes items that have been written only by a committed transaction
b. a transaction writes an item that is previously written by an uncommitted transaction
c. a transaction reads an item that is previously written by an uncommitted transaction
d. both b and c
Answer; d both b and c
29. To cope with media (disk) failures, it is necessary
a. for the DBMS to only execute transactions in a single user environment
b. to keep a redundant copy of the database
c. to never abort a transaction
d. all of the above
Answer b: to keep a redundant copy of the database
30. If the shadowing approach is used for flushing a data item back to disk, then
a. the item is written to disk only after the transaction commits
b. the item is written to a different location on disk
c. the item is written to disk before the transaction commits
d. the item is written to the same disk location from which it was read
Answer: b the item is written to a different location on disk
31. Which of the following best describes database query processing?
a. The process of retrieving and manipulating data from a database
b. The process of designing a database schema
c. The process of securing a database against cyber threats
d. The process of backing up a database regularly
e. None
Answer: A) The process of retrieving and manipulating data from a database
32. What is the main goal of query optimization in database systems?
a. To maximize the size of the database
b. To minimize the number of users accessing the database
c. To minimize the cost of executing a query
d. To increase the complexity of database queries
Answer: C) To minimize the cost of executing a query
33. Which of the following is NOT a step in database query processing?
a. Query parsing
b. Query execution
c. Database design
d. Query optimization
Answer: C) Database design
34. What is the purpose of indexing in database query processing?
a. To slow down data retrieval
b. To organize data for faster search and retrieval
c. To increase the size of the database
d. To encrypt sensitive data
Answer: B) To organize data for faster search and retrieval
35. Which of the following is an example of a database query optimization technique?
a. Data replication
b. Denormalization
c. Indexing
d. Data encryption
Answer: C) Indexing
36. What does the term "query parsing" refer to in database query processing?
a. Converting a query into an executable plan
b. Executing the query on the database
c. Interpreting the query language syntax
d. Storing the query result in memory
Answer: C) Interpreting the query language syntax
37. How can query optimization contribute to improved system performance?
a. By increasing the complexity of queries
b. By reducing the time and resources required to execute queries
c. By adding more indexes to the database
d. By increasing the number of tables in the database
Answer: B) By reducing the time and resources required to execute queries
38. Which of the following is NOT a common database query optimization strategy?
a. Join reordering
b. Subquery elimination
c. Full table scan
d. Predicate pushdown
Answer: C) Full table scan
39. What is the role of query optimization in enhancing data retrieval efficiency?
a. To slow down data retrieval for security purposes
b. To maximize data redundancy
c. To minimize unnecessary data access and processing
d. To increase network latency
Answer: C) To minimize unnecessary data access and processing
40. Why is understanding database query processing and optimization important for
students?
a. To increase job opportunities in cybersecurity
b. To enhance data security through encryption techniques
c. To improve system performance and efficiency
d. To develop advanced programming skills
Answer: C) To improve system performance and efficiency
41. A heterogeneous distributed database is which of the following?
a. The same DBMS is used at each location and data are not distributed across all nodes.
b. The same DBMS is used at each location and data are distributed across all nodes.
c. A different DBMS is used at each location and data are distributed across all nodes.
d. A different DBMS is used at each location and data are not distributed across all
nodes.
e. None
Answer c
42. One of the following is the cause of data integrity problem
a. Unauthorized disclosure
b. Unauthorized change
c. Unanticipated disclosure
d. A and c
e. None
Answer b
43. Which of the following is NOT a common database security threat?
a. SQL injection
b. Denial of Service (DoS) attacks
c. Data leakage prevention
d. Insider threats
Answer: C
44. What is the primary goal of database encryption in terms of security?
a. To prevent unauthorized access to sensitive data
b. To increase the speed of data retrieval
c. To reduce the size of the database
d. To enhance data redundancy
Answer: A) To prevent unauthorized access to sensitive data
45. Which of the following is a best practice for securing a database against SQL injection
attacks?
a. Using weak passwords for database accounts
b. Sanitizing user input before executing queries
c. Storing sensitive data in plain text format
d. Disabling all security features for faster query processing
Answer: B) Sanitizing user input before executing queries
46. What role does access control play in database security?
a. It ensures that all data is stored in plaintext format
b. It restricts unauthorized users from accessing sensitive data
c. It increases the complexity of database queries
d. It eliminates the need for user authentication
Answer: B) It restricts unauthorized users from accessing sensitive data
47. What is the purpose of implementing database auditing in a secure environment?
a. To slow down data retrieval for security purposes
b. To track and monitor user activities and changes made to the database
c. To increase the size of the database
d. To improve system performance and efficiency
Answer: B) To track and monitor user activities and changes made to the database
48. Which of the following is NOT a common authentication method used in database
security?
a. Single Sign-On (SSO)
b. Multi-Factor Authentication (MFA)
c. Passwordless authentication
d. Public key encryption
Answer: D) Public key encryption
49. What is the significance of role-based access control (RBAC) in database security?
a. It allows all users to have full access to all data in the database
b. It restricts users based on their roles and responsibilities within an organization
c. It increases the risk of insider threats
d. It slows down query processing#
Answer: B) It restricts users based on their roles and responsibilities within an organization
50. How can regular database backups contribute to enhancing database security?
a. By increasing the risk of data loss in case of a security breach
b. B) By reducing the need for data encryption
c. C) By providing a way to restore data in case of a security incident
d. D) By increasing the complexity of database queries
Answer: C) By providing a way to restore data in case of a security incident
51. What role does patch management play in maintaining a secure database environment?
a. It increases the risk of cyber threats
b. It ensures that all software vulnerabilities are left unaddressed
c. It involves regularly updating and applying security patches to prevent exploitation of
known vulnerabilities
d. It eliminates the need for user authentication
Answer: C) It involves regularly updating and applying security patches to prevent exploitation
of known vulnerabilities
52. Which of the following is not a minimum condition for a database to be called
distributed?
a. Connection of database nodes over a computer network.
b. Logical interrelation of the connected databases.
c. Possible absence of homogeneity among connected nodes.
d. Physical proximity or geographical distribution.
e. None of the above.
Answer d
53. Which type of transparency in distributed database environment deal with copies of the
same data objects may be stored at multiple sites for better availability, performance, and
reliability.
a. Naming transparency
b. Location transparency
c. Fragmentation transparency
d. Data organization transparency
e. None
Answer e
54. ______________ autonomy refers to independence of data model usage and transaction
management techniques among nodes in distributed database environment.
a. Execution
b. Communication
c. Design
d. Load
e. None