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
-
Store the workflow state information into database
-
Store the workflow state information to any persistence store
-
Accessing workflow as XML file
-
None of the above
B
Correct answer
Explanation
Workflow persistence refers to saving the runtime state of a workflow instance to any durable storage medium (persistence store) so it can be resumed later. While databases are commonly used, persistence is not strictly limited to databases, making the broader definition correct.
-
Execute the DbConnection object's Cleanup method.
-
Assign Nothing (C# null) to the variable that references the DbConnection object.
-
Execute the DbConnection object's Close method.
-
Execute the DbConnection object's Disconnect method.
C
Correct answer
Explanation
DbConnection objects provide a Close() method to properly close the connection and release database resources. Simply nulling the reference doesn't close the connection (it may remain open until garbage collection), and there are no built-in Cleanup or Disconnect methods. Best practice is using 'using' statements or explicitly calling Close()/Dispose().
-
System.Data.SqlClient
-
System.Data.OracleClient
-
System.Data.Odbc
-
System.Data.Oledb
A
Correct answer
Explanation
System.Data.SqlClient is the default provider for SQL Server in ADO.NET. OracleClient, Odbc, and Oledb are alternative providers for different database systems. This question assumes SQL Server context, which is the most common default.
-
session.contains() method to determine if an instance belongs to the session cache.
-
session.contains() method to determine if an instance belongs to the data base
-
Both are correct
-
none of the above
A
Correct answer
Explanation
In Hibernate, the session.contains() method checks whether a given instance is present in the first-level cache (session cache), not whether it exists in the database. To check database existence, you would use a query or get() method. The statement correctly identifies this.
-
TRUE
-
FALSE
-
No matter
-
None of the above
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.
-
A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed
-
A Session will obtain a JDBC Connection (or a Datasource) on object create
-
A Session has no relation with JDBC Connection (or a Datasource)
-
None of the above
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.
-
Hibernate.cache.query_cache true
-
Hibernate.cache.use_query_cache true
-
Hibernate.cache.query_cache yes
-
None
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).
A
Correct answer
Explanation
XML is a variable-length data type in DB2 that stores hierarchical data without a fixed size. INT, CHAR, and DOUBLE all have fixed storage lengths (4 bytes, defined length, and 8 bytes respectively).
-
Table Space
-
Bufferpools
-
Table
-
Rows
B
Correct answer
Explanation
Bufferpools are memory cache areas used by DB2 for data buffering, not database objects that can be locked. Locks can be applied to table spaces, tables, and rows to control concurrent access.
-
Read stability (RS)
-
Repeatable Read (RR)
-
Uncommited Read (UR)
-
Cursor Stability (CS)
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.
-
View
-
Table
-
Routine
-
Package
C
Correct answer
Explanation
Routines (stored procedures and functions) contain executable code that can be invoked using SQL statements like CALL or in expressions. Views and tables are data structures only. Packages are containers for routines but aren't directly executed.
-
LO DataSources
-
FI-GL DataSources
-
CO-PA and FI-SL DataSources
-
Generic DataSources
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.
-
TRUE
-
FALSE
-
No matter
-
None of the above
B
Correct answer
Explanation
Hibernate Session objects are NOT thread-safe. Each thread should use its own Session instance. Sharing a Session across threads can cause race conditions and data corruption.
-
A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed
-
A Session will obtain a JDBC Connection (or a Datasource) on object create
-
A Session has no relation with JDBC Connection (or a Datasource)
-
none of the above
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.
-
hibernate.cache.query_cache true
-
hibernate.cache.use_query_cache true
-
hibernate.cache.query_cache yes
-
none
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'.