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. a) An exception cannot propagate across remote procedure calls.

  2. b) An exception raised inside a declaration immediately propagates to the current block.

  3. c) The use of the RAISE; statement in an exception handler reprises the current exception

  4. d) An exception raised inside an exception handler immediately propagates to the enclosing block.

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

Exception propagation rules: (1) Exceptions cannot propagate across remote procedure calls (RPC boundary). (2) RAISE; in an exception handler re-raises the current exception. (3) An exception raised inside an exception handler immediately propagates to the enclosing block. Option B is false - exceptions in declarations propagate to the enclosing block, not the current one.

Multiple choice technology programming languages
  1. [_] [a] JDBC is an API to connect to relational-, object- and XML data sources

  2. [_] [b] JDBC stands for Java DataBase Connectivity

  3. [_] [c] JDBC is an API to access relational databases, spreadsheets and flat files

  4. [_] [d] JDBC is an API to bridge the object-relational mismatch between OO programs and relational

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

JDBC (Java DataBase Connectivity) is a Java API for connecting to databases. Option B correctly states what JDBC stands for. Option C is true because JDBC can access relational databases, spreadsheets (via JDBC-ODBC bridge or specific drivers), and flat files. Option A is incorrect because JDBC is primarily for relational databases - object and XML data sources require specialized adapters. Option D describes ORM tools like Hibernate, not JDBC itself.

Multiple choice technology programming languages
  1. O (a) java.jdbc and javax.jdbc

  2. O (b) java.jdbc and java.jdbc.sql

  3. O (c) java.sql and javax.sql

  4. O (d) java.rdb and javax.rdb

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

To answer this question, the user needs to have knowledge about the JDBC (Java Database Connectivity) API and its packages.

Option A: This option is incorrect. There is no package called javax.jdbc in the JDBC API.

Option B: This option is also incorrect. There is no package called java.jdbc.sql in the JDBC API.

Option C: This option is correct. The JDBC API contains two key packages: java.sql and javax.sql.

Option D: This option is incorrect. There is no package called java.rdb or javax.rdb in the JDBC API.

Therefore, the correct answer is:

The Answer is: C. java.sql and javax.sql.

Multiple choice technology programming languages
  1. O (a) Type 1 driver

  2. O (b) Type 2 driver

  3. O (c) Type 3 driver

  4. O (d) Type 4 driver

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

Type 1 JDBC drivers act as a bridge between JDBC and ODBC, translating JDBC calls into ODBC calls that are then processed by ODBC drivers. This was the earliest JDBC driver type and is now considered legacy technology, as it requires ODBC to be installed on the client machine.

Multiple choice technology programming languages
  1. O (a) Type 1 driver

  2. O (b) Type 2 driver

  3. O (c) Type 3 driver

  4. O (d) Type 4 driver

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

Type 4 JDBC drivers are pure Java implementations that convert JDBC calls directly into the database's native network protocol without any intermediate middleware. This makes them platform-independent and typically the fastest and most efficient driver type. Type 1 uses ODBC bridge, Type 2 uses native client libraries, and Type 3 uses middleware translation.

Multiple choice technology programming languages
  1. O (a) A DataSource is the basic service for managing a set of JDBC drivers

  2. O (b) A DataSource is the Java representation of a physical data source

  3. O (c) A DataSource is a registry point for JNDI-services

  4. O (d) A DataSource is a factory of connections to a physical data source

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

A JDBC DataSource is a factory object that provides connections to a physical data source. It is the preferred way to establish database connections in modern Java applications as it supports connection pooling, distributed transactions, and driver isolation. Unlike the DriverManager, a DataSource is registered with JNDI and encapsulates connection details.

Multiple choice technology programming languages
  1. [_] [a] A transaction is a set of successfully executed statements in the database

  2. [_] [b] A transaction is finished when commit() or rollback() is called on the Connection object,

  3. [_] [c] A transaction is finished when commit() or rollback() is called on the Transaction object

  4. [_] [d] A transaction is finished when close() is called on the Connection object.

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

A JDBC transaction is bound to a Connection object. It is completed when commit() or rollback() is called on that connection, or implicitly when the connection is closed.

Multiple choice technology programming languages
  1. O (a) Dirty reads, non-repeatable reads and phantom reads can occur

  2. O (b) Dirty reads are prevented; non-repeatable reads and phantom reads can occur

  3. O (c) Dirty reads and non-repeatable reads are prevented; phantom reads can occur

  4. O (d) Dirty reads, non-repeatable reads and phantom reads are prevented

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

To understand the meaning of the transaction isolation level TRANSACTION_REPEATABLE_READ, we need to know about transaction isolation levels in database management systems.

Transaction isolation level is a concept that ensures the correctness and consistency of database transactions. It defines the level of isolation between concurrent transactions in the system.

The TRANSACTION_REPEATABLE_READ isolation level guarantees that during the transaction, any row that is read will be locked for the duration of the transaction. This means that if the transaction tries to read the same row again, it will get the same value as before. This ensures that the transaction sees a consistent snapshot of the data.

Now let's go through each option to see which one is correct:

A. (a) Dirty reads, non-repeatable reads, and phantom reads can occur - This option is incorrect. The TRANSACTION_REPEATABLE_READ level prevents dirty reads and non-repeatable reads, but phantom reads can still occur.

B. (b) Dirty reads are prevented; non-repeatable reads and phantom reads can occur - This option is incorrect. The TRANSACTION_REPEATABLE_READ level prevents dirty reads, but non-repeatable reads and phantom reads can still occur.

C. (c) Dirty reads and non-repeatable reads are prevented; phantom reads can occur - This option is correct. The TRANSACTION_REPEATABLE_READ level prevents dirty reads and non-repeatable reads, but phantom reads can still occur.

D. (d) Dirty reads, non-repeatable reads, and phantom reads are prevented - This option is incorrect. The TRANSACTION_REPEATABLE_READ level only prevents dirty reads and non-repeatable reads, but phantom reads can still occur.

Therefore, the answer is: C. (c) Dirty reads and non-repeatable reads are prevented; phantom reads can occur.

Multiple choice technology databases
  1. data read format

  2. data interchange format

  3. data manipulation format

  4. protocol

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

JSON is specifically designed as a lightweight data interchange format - it's used to serialize and transmit structured data between different systems, particularly between client and server in web applications. Unlike HTML (markup), DHTML (dynamic HTML), or SOAP (protocol with XML), JSON is purely a data representation format.

Multiple choice technology databases
  1. True

  2. False

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

DBD (Database Description) is the DL/I control block that contains the physical database description including segment layouts, field definitions, and access methods. It defines how data is physically stored.

Multiple choice technology platforms and products
  1. Row Indicator

  2. Column Indicator

  3. File Indicator

  4. None of these

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

In Informatica's bad file (which contains rejected rows), the first column is the Row Indicator. This column shows why the row was rejected (e.g., D = deleted, I = insert, O = original, T = truncated). Options B and C incorrectly suggest column or file indicators exist.

Multiple choice technology platforms and products
  1. It extends the metadata stored in the repository by associating an repository object

  2. Vendor defined and User Defined are two types of Metadata Extensions

  3. It is mandatory to specify metadata extensions for every transformation.

  4. A new port can be added to the source by using metadata extensions

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

Metadata extensions in Informatica are optional, not mandatory. They allow users to associate custom metadata with repository objects, but are not required for every transformation.

Multiple choice technology platforms and products
  1. Dynamic Cache

  2. Shared Cache

  3. Distributed Cache

  4. Persistent Cache

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

Informatica Lookup transformation cache types include Static, Dynamic, Shared, Persistent, and Re-cache. 'Distributed Cache' is not a valid lookup cache type in Informatica PowerCenter. Options A, B, and D are all valid cache types.

Multiple choice technology mainframe
  1. Yes

  2. No

  3. Only for uncataloged datasets

  4. Only for cataloged datasets

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

VOL=SER (volume serial) specifications are required for tape datasets that are not cataloged. Cataloged tape datasets have their volume information recorded in the system catalog, so VOL=SER is optional. For uncataloged tape datasets, VOL=SER tells the system which tape volume to mount.

Multiple choice technology performance
  1. /opt/Netcool/var/logs

  2. /opt/Netcool/ism/datalogs

  3. /opt/Netcool/log/ism

  4. /opt/Netcool/ism/log

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

ISM (IBM Tivoli Netcool/ISM) stores its operational logs in /opt/Netcool/log/ism by default. Options A, B, and D are incorrect - they either point to wrong directories or reverse the correct path structure.