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

Multiple choice technology programming languages
  1. a) remove data from in memory

  2. b) remove from database.

  3. c) remove from sessionFactory

  4. d) None of the above.

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

To understand what sess.delete() does, we need to know that it is a method used in SQLAlchemy, which is a Python library for working with SQL databases.

The sess.delete() method is used to delete an object from the database using the SQLAlchemy session object that it is called on.

Now let's go through each option and explain why it is right or wrong:

A. a) remove data from in-memory: This option is incorrect because calling sess.delete() does not remove data from in-memory, it only marks the object for deletion from the database.

B. b) remove from the database: This option is correct. Calling sess.delete() method marks the object for deletion from the database. The object is only removed from the database when the session is committed.

C. c) remove from sessionFactory: This option is incorrect because sess.delete() method does not remove an object from the sessionFactory.

D. d) None of the above: This option is incorrect because option B is correct.

Therefore, the answer is: B. remove from the database.

Multiple choice technology programming languages
  1. create tables automatically

  2. create session object automatically

  3. create Session Factory object automatically

  4. None

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

The hibernate.hbm2ddl.auto property is used to automatically create database tables based on the entity classes defined in the Hibernate configuration file.

Option A is correct. When set to create, the hibernate.hbm2ddl.auto property creates the necessary tables in the database based on the entity classes defined in the Hibernate configuration file.

Option B is incorrect. The hibernate.hbm2ddl.auto property doesn't create session objects automatically.

Option C is incorrect. The hibernate.hbm2ddl.auto property doesn't create Session Factory objects automatically.

Option D is incorrect. There is a functionality associated with the hibernate.hbm2ddl.auto property.

Therefore, The Answer is A.

Multiple choice technology databases
  1. Compression does not entail table or index compression and vice-versa.

  2. Encryption stores the encryption keys for the LOB columns inside the database.

  3. Encryption stores the encryption keys for the LOB columns outside the database.

  4. Compression stores identical data occurring two or more times in the same LOB column as a single copy for the table.

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

SecureFiles compression operates independently at the LOB level without affecting table or index compression. For encryption, Oracle stores encryption keys outside the database in the wallet for security, keeping them separate from the encrypted data itself.

Multiple choice technology databases
  1. tablespace

  2. to store data and control information

  3. datafile

  4. instance

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

The System Global Area (SGA) is a shared memory structure allocated when an Oracle Database instance starts. It stores cache data and control information for the database. Tablespaces, datafiles, and instances are other architectural database components.

Multiple choice technology databases
  1. V_BLOB should be initialized to EMPTY_BLOB().

  2. The WRITE routine of DBMS_LOB should be used instead of LOADFROMFILE.

  3. The return type of DBMS_LOB.FILEEXISTS is not compatible with the IF statement.

  4. OPEN, CLOSE, and READONLY routines of DBMS_LOB should be used instead of FILEOPEN, FILECLOSE, and FILE_READONLY.

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

DBMS_LOB.FILEEXISTS returns a BOOLEAN value which cannot be directly used in an IF statement without proper conversion or handling. The procedure requires explicit boolean comparison or conversion to work correctly.

Multiple choice technology databases
  1. mounted

  2. not mounted

  3. restricted

  4. open

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

When creating a control file (using the CREATE CONTROLFILE command or with CREATE DATABASE), the database must be in NOMOUNT state. In NOMOUNT state, the instance has started with SGA and background processes, but the database is not mounted or open - this is the required state for control file operations.

Multiple choice technology web technology
  1. Content Server Information

  2. Application Server Information

  3. Connection Broker Information

  4. Database Information

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

The dmcl.ini file in Documentum specifies Connection Broker information. It contains configuration details for the Documentum client library (DMCL) to connect to the connection broker, which manages client sessions and connections to the content server.

Multiple choice technology platforms and products
  1. Cover, Basic, Folder

  2. Folder, Cover, Basic

  3. Cover, Folder, Basic

  4. Basic, Folder, Cover

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

In the PRPC Work Object Model, the hierarchy is: Folder (top level) contains Cover pages, which in turn contain Basic pages. Folder → Cover → Basic is the correct containment structure. This organizes work from general (Folder) to specific (Basic pages).