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) TRUE

  2. b) FALSE

  3. c) no matter

  4. d) none of the above

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

In Hibernate, the Session object is explicitly NOT thread-safe and is designed for use by a single thread at a time. Hibernate's documentation states that sharing a Session across threads without synchronization can cause unpredictable behavior. For concurrent access, you should use separate Session instances per thread or consider using Hibernate's SessionFactory with proper isolation. Each thread should obtain its own Session from the SessionFactory.

Multiple choice technology programming languages
  1. a) A Session will not obtain a JDBC Connection (or a Datasource) unless it is needed

  2. b) A Session will obtain a JDBC Connection (or a Datasource) on object create

  3. c) A Session has no relation with JDBC Connection (or a Datasource)

  4. d) none of the above

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

In Hibernate, a Session is lightweight and does not immediately acquire a JDBC connection from the connection pool or datasource upon creation. It only obtains a connection when a database transaction or query requires it.

Multiple choice technology programming languages
  1. a) hibernate.cache.query_cache true

  2. b) hibernate.cache.use_query_cache true

  3. c) hibernate.cache.query_cache yes

  4. d) none

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

To enable query cache in Hibernate, you set the property hibernate.cache.use_query_cache to true (not 'yes' or without the 'use_' prefix). This property, along with configuring a second-level cache provider, enables caching of query result sets. Option B correctly states the property name and value. Options A and C are incorrect because they use 'query_cache' instead of 'use_query_cache'. Option D is wrong because query cache can be enabled with the correct property.

Multiple choice technology mainframe
  1. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,MUL,+0.97,TO=ZD,LENGTH=6,31:31,185)

  2. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,MUL,+97,DIV,+100,TO=ZD,LENGTH=6,31:31,185)

  3. SORT FIELDS=COPY OUTREC FIELDS=(1:1,24,25,6,ZD,DIV,+100,MUL,+97,TO=ZD,LENGTH=6,31:31,185)

  4. All of the above

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

In DFSORT, decimal multiplication is simulated using integer arithmetic. Multiplying by 97 and dividing by 100 in OUTREC correctly scales the value. Both options B and C represent valid syntax configurations for this operation.

Multiple choice technology databases
  1. a) Raise Application procedure

  2. b) Raise Application Error procedure

  3. c) Application Error procedure

  4. d) None of the Above

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

The RAISE_APPLICATION_ERROR procedure is a built-in Oracle utility used to issue user-defined error messages and error codes (between -20000 and -20999) from stored subprograms and database triggers.

Multiple choice technology databases
  1. a) The package itself cannot be called, parameterized, or nested.

  2. b) The format of a package is similar to that of a subprogram.

  3. c) The contents can be shared by many applications once written.

  4. d) None of the above.

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

All statements (a, b, and c) are true: packages cannot be parameterized or nested, their format resembles subprograms, and their contents can be shared. Therefore, 'None of the above' is the false statement.

Multiple choice technology databases
  1. a) VARCHAR2

  2. b) BOOLEAN

  3. c) OUT

  4. d) IN

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

To solve this question, the user needs to be familiar with the different types of arguments that can be passed between a procedure and the calling environment.

A. VARCHAR2 is a data type used to store character strings in Oracle.

B. BOOLEAN is a data type used to store logical values (TRUE or FALSE) in Oracle.

C. OUT is a parameter mode that is used to pass values from a procedure to the calling environment.

D. IN is a parameter mode that is used to pass values from the calling environment to a procedure.

Therefore, the correct answer is:

The Answer is: C

Multiple choice technology databases
  1. a) Local variables.

  2. b) Arguments.

  3. c) Boolean variables.

  4. d) Substitution variables.

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

When creating stored procedures and functions, the option that allows you to transfer values to and from the calling environment is:

B. Arguments.

Arguments, also known as parameters, are variables that are defined within a stored procedure or function and can be used to receive values from the calling environment. These values can be passed to the procedure or function when it is executed, and the procedure or function can also return values back to the calling environment using these arguments.

Option A, local variables, are variables defined within the scope of the procedure or function and are not used for transferring values to and from the calling environment.

Option C, boolean variables, are variables that can hold a true or false value and are not specifically designed for transferring values to and from the calling environment.

Option D, substitution variables, are variables used in SQL*Plus and Oracle SQL Developer tools and are not used for passing values to and from the calling environment in stored procedures or functions.

So, the correct answer is B. Arguments.

Multiple choice technology databases
  1. a) When the procedure contains no SQL statements.

  2. b) When the procedure contains no PL/SQL commands.

  3. c) When the procedure needs to be used by many client applications accessing several remote databases.

  4. d) When the procedure needs to be used by many users accessing the same schema objects on a local database.

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

Server-side procedures are created when they need to be used by many users accessing the same schema objects on a local database (D). This centralizes business logic on the database server. Options A and B are incorrect - procedures contain both SQL and PL/SQL. Option C describes distributed scenarios, not the primary use case for server-side procedures.

Multiple choice technology databases
  1. a) VARCHER2.

  2. b) BOOLEAN.

  3. c) OUT.

  4. d) IN.

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

To answer this question, the user needs to have knowledge of different types of arguments in programming.

a) VARCHER2: This is not a type of argument. It is a data type used to store character strings in Oracle database.

b) BOOLEAN: This is not a type of argument that passes a value from a calling environment.

c) OUT: This type of argument passes a value to the calling environment. It is used when a function or procedure needs to return more than one value.

d) IN: This type of argument passes a value from the calling environment to the function or procedure. It is used when a function or procedure needs to receive values from the calling environment.

Therefore, the correct answer is:

The Answer is: D. IN.

Multiple choice technology databases
  1. True

  2. False

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

SQL has two main execution environments: interactive (where users type SQL commands directly via tools like SQL*Plus, mysql, or psql) and embedded (where SQL statements are embedded within host programming languages like Java, C, or Python using APIs like JDBC or ODBC). This is a fundamental characteristic of SQL usage.

Multiple choice technology
  1. Stored Procedure

  2. Business View

  3. Universe

  4. XML

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

Web Intelligence reports are primarily created using Universes (option C), which act as semantic layers that map to database structures. While Stored Procedures (A) can be used as data sources, they are not the primary creation method. Business Views (B) and XML (D) are not standard methods for creating WEBI reports. The question is marked MC-2 but only has one correct answer.

Multiple choice technology
  1. Import Wizard

  2. Report Conversion Tool

  3. Publish Wizard

  4. Designer

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

The Publish Wizard (option C) is the Business Objects tool used to export/publish Crystal Reports to the BO server for centralized management and scheduling. Import Wizard (A) is for importing, not exporting. Report Conversion Tool (B) is for format conversion. Designer (D) is for creating Universes, not publishing reports.

Multiple choice technology databases
  1. binary data up to 4 gigabytes

  2. character data up to 4 gigabytes

  3. raw binary data of variable length up to 2 gigabytes

  4. binary data stored in an external file, up to 4 gigabytes

  5. a hexadecimal string representing the unique address of a row in its table

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

ROWID is a pseudo-column that contains the hexadecimal string representing the unique physical address of a row in its table. It is not binary data, character data, or stored externally - it is an internal identifier used by Oracle to locate rows quickly.

Multiple choice technology programming languages
  1. a) A function must return a value.

  2. b) A procedure must return a value.

  3. c) A function executes a PL/SQL statement.

  4. d) A function is invoked as part of an expression.

  5. e) A procedure must have a return data type specify in its declaration.

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

In PL/SQL, a function must return a value and is invoked as part of an expression. Procedures do not return values in this manner and do not have a return data type in their declaration.