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. TRUE

  2. FALSE

  3. No matter

  4. None of the above

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

Hibernate Session objects are NOT thread-safe. Each thread should have its own Session instance, or you need to implement proper synchronization. Sharing a Session across threads can lead to race conditions, data corruption, and unpredictable behavior. This is a fundamental design choice in Hibernate.

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

Hibernate Sessions use lazy connection acquisition - they only obtain a JDBC Connection or DataSource when actually needed for database operations. This reduces unnecessary database connections and improves resource utilization. The connection isn't created on Session instantiation or object creation.

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

Query cache in Hibernate is enabled by setting hibernate.cache.use_query_cache to true. This caches the actual query results along with identifiers. Note that you must also enable second-level cache and mark specific queries as cacheable using setCacheable(true).

Multiple choice technology databases
  1. Read stability (RS)

  2. Repeatable Read (RR)

  3. Uncommited Read (UR)

  4. Cursor Stability (CS)

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

The Repeatable Read (RR) isolation level prevents phantom reads, ensuring that a query executed multiple times in the same transaction does not see new rows inserted by other applications. Read Stability (RS) only prevents modifications to existing rows but allows new rows to appear, making it incorrect here.

Multiple choice technology packaged enterprise solutions
  1. LO DataSources

  2. FI-GL DataSources

  3. CO-PA and FI-SL DataSources

  4. Generic DataSources

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

CO-PA and FI-SL DataSources in SAP BW are dynamically generated based on operating concerns and special ledgers, preventing direct enhancements in the source system using standard tools. In contrast, LO, FI-GL, and generic DataSources are designed to be easily enhanced with append structures in the source system.

Multiple choice technology web technology
  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

Hibernate uses lazy connection acquisition - a Session only obtains a JDBC Connection when actually needed (e.g., executing a query). It doesn't fetch connections on Session creation or maintain a constant connection.

Multiple choice technology web technology
  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

The correct property name is hibernate.cache.use_query_cache with value 'true'. This enables caching of query result sets. Option A has the wrong property name, and option C uses 'yes' instead of 'true'.

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

When hibernate.cache.use_query_cache is set to true, Hibernate enables two cache regions: StandardQueryCache (stores query results) and UpdateTimestampsCache (tracks table modification timestamps). UpdateTimestampsCache is crucial for validating cached query results. Options B and C miss the UpdateTimestampsCache region.

Multiple choice technology programming languages
  1. NULL

  2. Empty Object

  3. Unrecoverable exception

  4. None of the above

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

session.load() throws an unrecoverable ObjectNotFoundException if no matching database row exists, because load() expects the row to exist (it may return a proxy). This differs from session.get(), which returns null if no row is found. Options A and B are incorrect because load() does not return null or empty objects - it throws an exception.

Multiple choice technology programming languages
  1. controls how a particular SessionFactory interacts with the Data Base.

  2. controls how a particular SessionFactory interacts with the second-level cache.

  3. controls how a particular session interacts with the second-level cache.

  4. None

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

CacheMode is configured on a per-Session basis to determine how that specific session interacts with the second-level cache (e.g. bypass, refresh, or read-only). The SessionFactory manages global configurations rather than individual session cache behaviors.

Multiple choice technology programming languages
  1. Query.list()

  2. Query.iterate()

  3. Both are same

  4. None of the above

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

Query.list() retrieves all matching records in a single SQL SELECT query. Query.iterate() initially fetches only the database identifiers, requiring subsequent individual database queries for each entity not cached, resulting in poor N+1 query performance.