Question 71
HardWhat does a write-ahead log let a DBMS do with dirty pages in its buffer pool?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
What does a write-ahead log let a DBMS do with dirty pages in its buffer pool?
Discard them on commit
Write them before the log
Never write them
Write them to disk lazily, because the log already records the changes
Sign up free to see the answer and a step-by-step explanation.
A table is defined with CHECK (salary > 0) and an UPDATE sets one row's salary to −5. What happens?
The salary becomes 5
The salary becomes 0
Only a warning is shown
The UPDATE fails and the row is unchanged
Sign up free to see the answer and a step-by-step explanation.
What is a stored procedure mainly useful for?
Drawing diagrams
Storing backups
Running a set of SQL statements on the server as one named routine, reducing round trips
Encrypting the whole database
Sign up free to see the answer and a step-by-step explanation.
What does a trigger do?
Runs only when a user calls it by name
Runs automatically when a specified event, such as an INSERT, happens on a table
Schedules backups
Locks the database
Sign up free to see the answer and a step-by-step explanation.
A materialised view differs from an ordinary view in that it:
Cannot be queried
Is always up to date automatically
Has no columns
Stores the query's result physically and must be refreshed
Sign up free to see the answer and a step-by-step explanation.
Which is an advantage of an object–relational mapper (ORM) such as Hibernate?
It removes the need for a database
It maps tables to classes, so application code works with objects instead of raw SQL
It prevents all bugs
It always produces the fastest queries
Sign up free to see the answer and a step-by-step explanation.
Which is the main purpose of database normal forms?
Reducing the number of tables
Encrypting data
Making queries faster in every case
Reducing redundancy and update anomalies
Sign up free to see the answer and a step-by-step explanation.
In a client–server DBMS, what is connection pooling?
Opening one connection per row
Merging two databases
Storing connections on disk
Reusing a set of open database connections across many requests
Sign up free to see the answer and a step-by-step explanation.
Which feature lets a database recover to the state it was in at 10:42 a.m. yesterday?
Indexes
Point-in-time recovery using a backup plus replay of the logs
Views
Normalisation
Sign up free to see the answer and a step-by-step explanation.
What is the purpose of a database's system catalog?
To cache query results
To list printers
To store metadata about tables, columns, indexes, users and privileges
To store users' passwords in plain text
Sign up free to see the answer and a step-by-step explanation.