Computer Knowledge

Database Management Systems

5,543 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 technology programming languages
  1. A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed

  2. A Session will obtain a JDBC Connection (or a Datasource) on object create

  3. A Session has no relation with JDBC Connection (or a Datasource)

  4. None of the above

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

A Hibernate Session obtains a JDBC connection lazily - only when it's actually needed for an operation. This improves efficiency by avoiding unnecessary database connections. The session doesn't grab a connection at creation time.

Multiple choice technology programming languages
  1. Hibernate.cache.query_cache true

  2. Hibernate.cache.use_query_cache true

  3. Hibernate.cache.query_cache yes

  4. None

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

To enable the query cache in Hibernate, you must set the configuration property hibernate.cache.use_query_cache to true in the configuration file. The option hibernate.cache.query_cache is incorrect because it is not a valid Hibernate configuration property name.

Multiple choice technology programming languages
  1. StandardQueryCache and UpdateTimestampsCache

  2. StandardQueryCache

  3. QueryCache

  4. QueryCache and TimestampsCache

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

Setting hibernate.cache.use_query_cache to true enables two cache regions: StandardQueryCache for storing query results and UpdateTimestampsCache for tracking timestamp information. This allows Hibernate to cache query results and invalidate them appropriately when underlying data changes. The UpdateTimestampsCache is essential for maintaining cache consistency.

Multiple choice technology programming languages
  1. The size of an undo block

  2. The size of the redo log files

  3. The size of the database buffer cache.

  4. The value of the UNDO_RETENTION parameter.

  5. Undo blocks generated per second.

Reveal answer Fill a bubble to check yourself
A,D,E Correct answer
Explanation

When sizing undo tablespace, you need to consider: the undo block size (determines space efficiency per transaction), the UNDO_RETENTION parameter (how long undo data must be kept for flashback/consistency), and the rate of undo blocks generated per second (transaction workload). Redo log files and buffer cache size don't directly determine undo tablespace requirements.

Multiple choice technology programming languages
  1. DROP TABLESPACE USERS

  2. ALTER TABLE SALES_REP DROP PARTITION P1

  3. DROP TABLE EMPLOYEES

  4. DROP USER SMITH

  5. ALTER TABLE EMPLOYEES DROP COLUMN DESIGN_ID

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

Flashback Technology can recover DROP TABLE and DROP USER operations using Flashback Drop (recyclebin feature). DROP TABLESPACE and DROP PARTITION cannot be flashed back. ALTER TABLE DROP COLUMN also cannot be recovered with Flashback - you'd need point-in-time recovery or restore from backup. Flashback Drop works at the schema object level, not for structural changes within objects.

Multiple choice technology programming languages
  1. Adding a new user to database

  2. Adding a new tablespace to database.

  3. Dropping a table from the database.

  4. Dropping a user from the database.

  5. Dropping a datafile from a tablespace.

Reveal answer Fill a bubble to check yourself
B,E Correct answer
Explanation

In NOARCHIVELOG mode, database structural modifications such as adding a new tablespace or dropping a datafile alter the control file's structure. Backing up the control file immediately after these operations is critical since transactions are not archived, making recovery of structural changes impossible without a recent control file backup.

Multiple choice technology programming languages
  1. SGA

  2. Streams Pool

  3. PGA

  4. Shared Pool

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

PGA (Program Global Area) is created when a dedicated server process starts and contains data and information specific to that server process. SGA (System Global Area) is shared by all processes. Streams Pool and Shared Pool are components within the SGA, not separate memory areas for dedicated processes. PGA is private to each process.

Multiple choice technology programming languages
  1. Flashback

  2. Data guard

  3. ASM

  4. Tivoli data protection

  5. Flash recovery

Reveal answer Fill a bubble to check yourself
A,B,C,E Correct answer
Explanation

Oracle Database 10g Release 2 introduced significant enhancements to Automatic Storage Management (ASM), Flashback technologies, Data Guard, and the Flash Recovery Area (now Fast Recovery Area). Tivoli Data Protection is a third-party IBM product and not an Oracle database component.

Multiple choice technology programming languages
  1. It specifies the directory containing the oracle managed files

  2. It specifies the directory for database files, if not specified explicitly

  3. It specifies the directory containing the oracle software

  4. It specifies the directory of Optimal Flexible Architecture.

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

The ORACLE_HOME environment variable points to the directory where the Oracle database software executable binaries, libraries, and helper files are installed. It does not dictate the directory for Oracle Managed Files or database files, which are managed by parameter configuration files.

Multiple choice technology programming languages
  1. Online redo log files can be backed up

  2. RMAN backup can be taken only if the database is configured in ARCHIEVELOG mode.

  3. Only used data blocks can be backed up as backup sets

  4. Archived redo log files are backed up.

  5. Only consistent database backed up can be performed.

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

RMAN backup can back up only used data blocks (skip empty blocks in datafiles) - this is called unused block compression. Archived redo log files can and should be backed up with RMAN. Online redo log files are NOT backed up by RMAN (they're managed through log switches/archiving). RMAN can backup in both ARCHIVELOG and NOARCHIVELOG mode, though some features require ARCHIVELOG.

Multiple choice technology programming languages
  1. Control file and password file

  2. Password file

  3. Control file

  4. Listener control file

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

For remote SYSDBA authentication, Oracle uses a password file to authenticate administrative users. The password file stores usernames and password hashes for users with SYSDBA, SYSOPER, or SYSASM privileges. Control files contain database structure information, not authentication data. Listener configuration files manage connection requests, not authentication.

Multiple choice technology programming languages
  1. Create the new text file as ALERT.log

  2. You have to recover the alert log file from the valid backup.

  3. No action required. The file will be created automatically by the instance.

  4. Change the value for the BACKGROUND_DUMP_DEST parameter.

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

The alert log file is automatically recreated by the Oracle instance if it's deleted. There's no manual action required - the instance will create a new file on the next startup or when it needs to write to the alert log. You don't need to recover from backup or change initialization parameters. The BACKGROUND_DUMP_DEST parameter (or DIAGNOSTIC_DEST in newer versions) determines the location but doesn't affect automatic creation.

Multiple choice technology programming languages
  1. A role can contain both system and object privileges.

  2. A role cannot be assigned external authentication.

  3. A role can be granted to itself.

  4. Roles are owned by the SYS user

  5. Roles can be granted to other roles

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

Roles in Oracle can contain both system privileges (like CREATE TABLE) and object privileges (like SELECT on a table). Roles can be granted to other roles, enabling privilege hierarchies. Roles cannot be granted to themselves (circular reference). Roles are not owned by SYS specifically - they're schema-independent objects. External authentication can be assigned to roles.

Multiple choice technology programming languages
  1. The database services to be registered with the listener

  2. The log file and trace file destination for the listener.

  3. The protocol used by the listener

  4. The server name where the listener runs.

  5. The port used by the listener.

Reveal answer Fill a bubble to check yourself
C,D,E Correct answer
Explanation

When creating a new listener through Enterprise Manager, you must specify: the protocol (TCP, TCPS, etc.), the server/hostname where the listener runs, and the port number it listens on. Database services register dynamically with the listener. Log and trace file locations use default values or are configured later. These three parameters are the minimum required for listener creation and basic operation.

Multiple choice technology programming languages
  1. Extents would be managed by freelists.

  2. Free space would be managed by data dictionary

  3. The segment would be managed by bitmaps.

  4. The segment would be managed by freelists.

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

Automatic segment space management uses bitmaps to track free and used space within segments instead of freelists. When you specify automatic segment space management for a tablespace, Oracle uses bitmaps to manage space allocation, which is more efficient than the manual freelists method. Freelists (A and D) are used in manual segment space management, while data dictionary (B) management is an older, deprecated approach.