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 databases
  1. DB2 Express Edition

  2. DB2 Personal Edition

  3. DB2 Workgroup Server Edition

  4. DB2 Enterprise Server Edition

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

For AIX servers in the DB2 product family, Workgroup Server Edition is positioned as the lowest-cost legally installable option. Express Edition is typically for smaller deployments or different platforms, Personal Edition is for single-user desktop scenarios, and Enterprise Server Edition includes premium features at higher cost. Workgroup Server Edition provides the minimal server-grade licensing for AIX.

Multiple choice technology databases
  1. SERVER

  2. SERVER_ENCRYPT

  3. CLIENT

  4. DCS

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

DB2 9 supports multiple authentication methods including SERVER (plaintext passwords), SERVER_ENCRYPT (encrypted passwords), and CLIENT (client-side authentication). DCS (Database Connection Services) is not an authentication method - it's a DRDA connectivity feature for connecting to other DRDA-compliant databases. Therefore, DCS is the correct answer as it's NOT a valid authentication type.

Multiple choice technology databases
  1. Sequence

  2. View

  3. Trigger

  4. Schema

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

In DB2, an alias is an alternate name that can be defined for a table or a view, allowing users to reference them without schema qualifiers. It cannot be created for triggers or schemas. Although sequences can have aliases in some versions, view is the primary standard option among the choices.

Multiple choice technology mainframe
  1. True

  2. False

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

Including DCLGEN (Declaration Generator) in COBOL-DB2 programs is not mandatory. DCLGEN generates COBOL data structure declarations matching DB2 table definitions, which provides type safety and simplifies host variable declarations. However, programmers can manually declare host variables without DCLGEN, making it optional despite being a best practice.

Multiple choice technology databases
  1. Routine

  2. Function

  3. Procedure

  4. Trigger

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

DB2 distinguishes between executable objects and event-driven objects. Routines, functions, and procedures are all executable using SQL statements like CALL or SELECT. However, triggers are not directly executed - they are defined to fire automatically when specific events (INSERT, UPDATE, DELETE) occur on a table. You cannot explicitly invoke a trigger with a SQL statement; it responds to data modification events. This is a fundamental architectural difference in how these objects operate.

Multiple choice technology databases
  1. NUMBER

  2. INTERVAL

  3. NUM

  4. BYTE

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

DB2 supports various built-in data types for different data storage needs. NUM is indeed a valid DB2 data type and serves as a synonym for NUMERIC, which stores exact numeric values with specified precision and scale. The other options are incorrect: NUMBER is an Oracle data type not used in DB2, INTERVAL is used for datetime arithmetic rather than being a standalone column type, and BYTE is not a standard DB2 data type. Understanding valid data types is crucial for proper database schema design.

Multiple choice technology databases
  1. SMALLINT

  2. INTEGER

  3. DOUBLE

  4. NUMERIC

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

Identity columns in DB2 automatically generate unique numeric values, typically used as primary keys. They require data types that guarantee consistent, predictable sequential values. SMALLINT, INTEGER, and NUMERIC are all exact numeric types suitable for identity columns. However, DOUBLE is a floating-point type that cannot guarantee precise sequential values due to rounding errors inherent in floating-point arithmetic. DB2 explicitly prohibits using approximate numeric types like DOUBLE, REAL, or FLOAT for identity columns to maintain data integrity and ensure reliable unique value generation.

Multiple choice technology databases
  1. Explain

  2. Xpeditor

  3. Alchemist

  4. Abendaid

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

The EXPLAIN statement or utility is used to capture and analyze the access paths chosen by the DB2 optimizer for executing SQL queries, which is vital for performance tuning. Other options like Xpediter, Alchemist, and Abend-AID are debugging, configuration management, or dump analysis tools instead.

Multiple choice technology databases
  1. Binds

  2. DBRMs

  3. Packages

  4. Collections

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

In DB2, a plan is an executable entity that contains one or more packages. Packages are the building blocks that contain the executable SQL statements and access paths. When you bind a plan, you're essentially organizing related packages together for execution. Binds (A) are the process of creating plans/packages, DBRMs (B) are database request modules containing SQL statements, and Collections (D) are logical groupings but not what plans directly contain. The plan-to-package relationship is fundamental to DB2's application management architecture.

Multiple choice technology databases
  1. sys_cn

  2. ora_cn

  3. tab_cn

  4. col_cn

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

When a constraint is created in Oracle without explicitly naming it, Oracle automatically generates a system constraint name in the format SYS_Cn where n is an incremental number. For example: SYS_C1234, SYS_C5678. This distinguishes system-generated names from user-defined constraint names.

Multiple choice technology databases
  1. Both are True

  2. i) Is Only True

  3. ii) is only True

  4. Neither is True

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

DB2 isolation levels trade off concurrency vs consistency. Cursor Stability locks only the current row, allowing higher concurrency. Repeatable Read locks all rows read, preventing changes and providing higher consistency. Both statements correctly describe these characteristics.

Multiple choice technology databases
  1. B - Tree format

  2. Hash Table

  3. AVL Tree

  4. Red Black Tree

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

DB2 stores indexes using B-tree structures, which provide efficient search, insert, and delete operations. B-trees are the industry standard for database indexes because they maintain sorted data and allow logarithmic time complexity. Hash tables, AVL trees, and Red-Black trees are not used for DB2 indexes.

Multiple choice technology databases
  1. Clusters

  2. Synonym

  3. Views

  4. Sequences

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

To solve this question, the user needs to have a basic understanding of databases and the different methods used to assign unique numbers to columns in a database.

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

A. Clusters: Clusters are used to group related data together in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

B. Synonym: Synonyms are used to provide an alternative name for a table or view in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

C. Views: Views are virtual tables that are created by combining data from one or more tables in a database. They are not used to assign unique numbers to columns in a database. Therefore, this option is incorrect.

D. Sequences: Sequences are used to generate unique numbers for a column in a database. They are often used to assign primary keys to tables in a database. Therefore, this option is correct.

The Answer is: D