Computer Knowledge

Database Management Systems

5,344 Questions

Database Management Systems (DBMS) form the core framework for data storage, retrieval, and security in modern software applications. Concepts such as the E-R model, backup planning, SQL integration, and big data architecture are essential for computer knowledge sections. This hub offers a comprehensive set of practice questions to master DBMS fundamentals and advanced database operations.

E-R Model ConceptsBackup and RecoverySQL Server UpgradesJDBC and ODBCBig Data CharacteristicsData VirtualizationOracle Database

Database Management Systems Questions

Multiple choice
  1. Only LOBS

  2. Only nested tables

  3. Nested tables and index-organized tables

  4. Nested tables, LOBS, index-organized tables, and boot straps

  5. All of the above

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Oracle recognizes LOBs, nested tables, and index-organized tables as types of segments. Bootstrap segments exist internally but are not user-accessible segment types. Options A, B, C are incomplete (each lists only some types). Option E would be correct if D stated 'All of the above', but D lists specific types accurately.

Multiple choice
  1. ALTER ANY ROLE

  2. MANAGE ANY ROLE

  3. UPDATE ANY ROLE

  4. MODIFY ANY ROLE

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To modify a role's authentication method, a user needs the ALTER ANY ROLE system privilege. JOHN only has the PAYCLERK role granted to him, but this doesn't include the privilege to alter the role's properties. Option B (MANAGE ANY ROLE) doesn't exist in Oracle. Options C and D are also non-existent privilege names. Only SYSDBA or a user with ALTER ANY ROLE can change role authentication methods.

Multiple choice
  1. Defers writes for I/O optimization

  2. Uses a LRU algorithm to keep most recently used blocks in memory

  3. Writes to database redo log files as people COMMIT data

  4. Writes all changed (i.e. dirty) buffers to datafiles

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The DBWR (Database Writer) process writes dirty buffers to datafiles, uses LRU algorithm for buffer management, and can defer writes for I/O optimization. Writing to redo log files is the responsibility of LGWR (Log Writer), not DBWR. LGWR writes redo entries as users COMMIT data. This is a fundamental separation of duties in Oracle's process architecture.

Multiple choice
  1. 0

  2. 1

  3. 2

  4. 3

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When roles are granted to other roles, access cascades through the role hierarchy. HR is granted DIRECTOR, which is granted MANAGER, which is granted CLERK. Therefore HR has access to all three roles: DIRECTOR (directly), MANAGER (via DIRECTOR), and CLERK (via MANAGER). This hierarchical role granting is a key feature of Oracle's role-based access control.

Multiple choice
  1. default tablespace

  2. profile

  3. idle_time

  4. default role

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When creating a user, Oracle allows specifying default tablespace, profile, and default roles. The idle_time parameter is a resource limit that belongs in a PROFILE, not a direct user creation parameter. You must create or modify a profile with idle_time settings, then assign that profile to the user. Resource limits are profile-level settings, not user-level.

Multiple choice
  1. materialized views

  2. dynamic performance views

  3. oracle view

  4. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Materialized views can be set to continuously refresh even while the database is open and active through the ON COMMIT refresh option. Dynamic performance views (V$ views) are updated continuously as well, but the question specifies 'views' in the context of stored data objects. 'Oracle view' is not a standard category name. Option A is correct as materialized views are designed to maintain pre-computed results with ongoing refresh capabilities.

Multiple choice
  1. RMAN> STARTUP NOMOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; RMAN> ALTER DATABASE OPEN;

  2. RMAN> STARTUP MOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; RMAN> ALTER DATABASE OPEN

  3. RMAN> STARTUP NOMOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; RMAN> ALTER DATABASE OPEN RESETLOGS;

  4. RMAN> STARTUP MOUNT; RMAN> RESTORE DATABASE; RMAN> RECOVER DATABASE; RMAN> ALTER DATABASE OPEN RESETLOGS;

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When data files are lost but control files are intact, the database starts in NOMOUNT state to read control files, then RESTORE DATABASE recovers the data files from backup, RECOVER DATABASE applies archived and online redo logs, and ALTER DATABASE OPEN opens normally without RESETLOGS since no control file creation occurred. Option B is incorrect because NOMOUNT is required when instance is down. Option C and D incorrectly use RESETLOGS unnecessarily.

Multiple choice
  1. IOT

  2. Cluster

  3. Materialized View

  4. Partion Table

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Materialized Views pre-compute and store complex query results, especially aggregations from multiple tables. For a DSS (Decision Support System) reporting query joining 7 tables with GROUP BY operations, a Materialized View eliminates the need to re-execute the expensive join and aggregation on each report run.

Multiple choice
  1. The Record Group is associated with a query.

  2. The Record Group can be created only at run time.

  3. The Record Group can be created and modified only at design time.

  4. The Record Group can be created and modified at design time or at run time.

  5. The query associated with this Record Group can be defined only at design time.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A Query Record Group is specifically defined by its association with a query. This is its fundamental characteristic - it's created based on a SQL query and populated with the query's result set. Other record group types exist (static, non-query), but the defining feature of a Query Record Group is this query association.

Multiple choice
  1. The control file was copied before shutting down the instance.

  2. An operating system command was used to copy the control file.

  3. The Oracle server does not know the name of the new control file.

  4. A new control file name was added to the CONTROL_FILES parameter before shutting down the instance.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Control files must be copied when the database is completely shut down. Copying a control file while the database is open results in an inconsistent copy because the control file is being actively updated. When you try to mount using this inconsistent copy, Oracle detects the mismatch and fails the mount operation.

Multiple choice
  1. When a backup is taken, the Archiver process is disabled.

  2. The Archiver can only be started by issuing the ALTER DATABASE ARCHIVELOG command.

  3. LOG_ARCHIVE_START is still set to FALSE because the PFILE is not updated when you issue the ALTER SYSTEM command.

  4. The Archiver can only be started by issuing the ALTER SYSTEM ARCHIVE LOG START command each time the database is opened.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

ALTER SYSTEM commands only affect the running instance's memory (SGA). They do not modify the PFILE (text parameter file) on disk. When you restart with the same PFILE, it still contains LOG_ARCHIVE_START=FALSE, so the Archiver remains disabled. To make the change persistent, you need to update the PFILE manually or use SPFILE.

Multiple choice
  1. He must define a new LOV for the Choose_Event.Event_Name item that uses a different record group.

  2. He must define a new LOV for the Choose_Event.Event_Name item, but he can base it on the same record group.

  3. He can use the same LOV and record group for the Choose_Event.Event_Name item that he used for the Tickets.Date item.

  4. He can use the same LOV for both items, but he should specify that each item must use a different record group for the LOV.

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The two LOVs require different sorting - one by event_date (for the Date item) and one by event_name (for the Event_Name item). Since record groups contain the query including the ORDER BY clause, each LOV needs its own record group with the appropriate ORDER BY. They cannot share a record group because the sorting requirements are different.

Multiple choice
  1. Alert log

  2. Online redo log

  3. Archiver redo log

  4. System user's trace file

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When an Oracle instance starts with non-default initialization parameters, these are recorded in the alert log file. The alert log serves as the primary diagnostic log for instance startup messages, parameter changes, and critical events. Options B, C, and D are incorrect because online redo logs, archiver logs, and trace files serve different purposes: redo logs record transaction changes, archiver logs store archived redo data, and trace files capture session-level diagnostics.

Multiple choice
  1. The shared pool cannot be dynamically resized.

  2. The shared pool contains only fixed structures.

  3. The shared pool consists of the library cache and buffer cache.

  4. The shared pool stores the most recently executed SQL statements and the most recently accessed data definitions.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The shared pool stores the most recently executed SQL statements and the most recently accessed data definitions.