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
-
session..commit()
-
session.getCommitTransaction()
-
session.getTransaction().commit()
-
session.getTransaction().save()
C
Correct answer
Explanation
To commit a transaction in Hibernate, you must call session.getTransaction().commit(). This retrieves the current Transaction object associated with the session and commits it. The other options don't represent valid Hibernate API methods.
-
Every table must have a separate mapping file
-
Only parent table needs separate mapping fie
-
Only child table need separate mapping file
-
One mapping file can have mappings for one or more table.
D
Correct answer
Explanation
Hibernate mapping files are flexible - one mapping file can contain mappings for multiple tables. You're not required to have separate files for parent, child, or each table. A single mapping file can define multiple class mappings.
-
Using several dialect
-
Using several <session-factory>
-
Using several connection properties
-
Not possible to map more than one database
B
Correct answer
Explanation
Hibernate can map multiple databases by defining multiple elements in the configuration. Each session-factory represents a separate database connection with its own dialect and connection properties. You cannot use multiple dialects for a single session factory.
-
connection.driver_class property should be changed
-
connection.url property should be changed
-
dialect property should be changed
-
All the above
D
Correct answer
Explanation
To switch the underlying database in a Hibernate application, you must update the driver class, the connection URL, and the SQL dialect property to match the target database system. Thus, all of the above properties must be changed.
-
Native SQL
-
HSQL
-
Both
-
None of the above
C
Correct answer
Explanation
Hibernate supports multiple query approaches: Native SQL (direct database queries) and HQL (Hibernate Query Language, an object-oriented query language). Both can be used depending on the use case, giving developers flexibility in how they query data.
-
connection.driver_class property should be changed
-
connection.url property should be changed
-
dialect property should be changed
-
All the above
D
Correct answer
Explanation
Changing the underlying database system requires updating multiple properties: the driver class (connection.driver_class) to load the correct JDBC driver, the connection URL (connection.url) to point to the new database, and the dialect property to use the appropriate SQL dialect for optimal performance.
-
Use the output cache.
-
Use the cache object.
-
Use the ASP.NET central cache.
-
Use the client cache
B
Correct answer
Explanation
For caching historical library information retrieved from a database, using the Cache object provides the best performance. The Cache object allows explicit control over what data is cached, duration, and expiration policies. Output cache is for entire page responses, ASP.NET central cache is not a standard term, and client cache relies on browser caching which is less reliable for server-fetched data.
-
SYS1.LINKLIB
-
SYS1.SOTREPROC
-
SYS1.CATPROC
-
SYS1.PROCLIB
A
Correct answer
Explanation
SYS1.LINKLIB contains the load modules (executable programs) for IBM system utilities and commonly-used programs. Option B appears to be a typo for SYS1.SYSPROC which contains cataloged procedures. SYS1.PROCLIB contains JCL procedure definitions, not load modules.
-
In compiled form
-
As source code
-
Both A and B
-
None of the above
C
Correct answer
Explanation
Database stored procedures, triggers, and views are typically stored in the database dictionary as both the original source code (for viewing/editing) and in a compiled/p-code form (for execution efficiency).
-
ODBC can be directly used with Java because it uses a C interface
-
ODBC makes uses of pointers which has been totally removed from JAVA
-
ODBC is from Microsoft while JDBC is from java applications
-
ODBC requires manual installation of the ODBC driver manager and driver on all client machines. While for JDBC driver are written in Java and JDBC code is automatically installable, secure and portable on all platforms.
A
Correct answer
Explanation
The question asks which statement does NOT correctly define the JDBC-ODBC difference. Option A claims 'ODBC can be directly used with Java' which is FALSE - ODBC cannot be directly used with Java because it uses a C interface. This makes A the incorrect statement, which is what the question seeks. Options B, C, D correctly describe real differences (pointers removed from Java, vendor origins, manual vs automatic installation).
-
Database Mirroring
-
Integration Services
-
Notification Services
-
All of the above
C
Correct answer
Explanation
SQL Server 2005 Notification Services was designed for sending personalized messages to large groups. Database Mirroring is for high availability, and Integration Services is for ETL/data transformation.
-
SQL Server 2005 Developer Edition
-
SQL Server 2005 Enterprise Edition
-
SQL Server 2005 Express Edition
-
SQL Server 2005 Standard Edition
D
Correct answer
Explanation
When upgrading from SQL Server 7.0 Standard Edition SP4, you can only upgrade to SQL Server 2005 Standard Edition. You cannot directly upgrade to Developer, Express, or Enterprise editions from a Standard edition base.
-
Developer Edition
-
Express Edition
-
Integration Edition
-
Standard Edition
-
DTUTIL
-
BCP
-
Object Explorer
-
None of the above
D
Correct answer
Explanation
The correct tool for running T-SQL queries from command prompt in SQL Server 2005 is sqlcmd, which is not listed among the options. DTUTIL is used for SSIS package utilities, BCP is for bulk data copy operations, and Object Explorer is a GUI component in SQL Server Management Studio.
-
Model database
-
Master Database
-
msdb
-
Temporary database