0

databases Online Quiz - 196

Description: databases Online Quiz - 196
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

Each time you fetch a row from the cursor, it results in a network roundtrip

  1. True

  2. False


Correct Option: A

can we have a nested transaction

  1. True

  2. False


Correct Option: A

t-sql variables case sensitive?

  1. True

  2. False


Correct Option: B

A database is divided into:

  1. records

  2. fields

  3. articles

  4. names


Correct Option: A

AI Explanation

To answer this question, you need to understand the basic structure of a database.

A database is divided into:

A. records - This option is correct. In a database, a record is a collection of related data items that are grouped together. Each record represents a single entity or object, such as a customer, product, or employee.

B. fields - This option is also correct. A field is a specific piece of information within a record. It represents a single attribute or characteristic of the entity being stored in the database. For example, in a customer record, the fields may include the customer's name, address, and phone number.

C. articles - This option is incorrect. Articles are not typically used to divide a database. Articles are a more general term used for written content or publications.

D. names - This option is incorrect. Names are not used to divide a database. Names are used to identify individual entities or objects within a database, such as the name of a customer or a product.

The correct answer is A) records. This option is correct because records are the primary division of a database, representing individual entities or objects.

In a database of newspaper, journal or magazine articles, each record represents:

  1. one magazine, journal or newspaper

  2. one author

  3. one article from a magazine, journal or newspaper

  4. all of the above


Correct Option: C
Explanation:

To solve this question, the user needs to have a basic understanding of database management systems and the structure of a database.

The correct answer is:

C. one article from a magazine, journal or newspaper

Each record in a database of newspaper, journal or magazine articles represents a single article, not an entire publication or the author of the article. Therefore, option C is the correct answer.

Option A is incorrect because it suggests that each record represents a single magazine, journal or newspaper, which is not true.

Option B is also incorrect because it suggests that each record represents a single author, which is not true either.

Option D is incorrect because it includes options A and B, which are both incorrect.

In a library catalogue database, each record represents:

  1. one book, journal, video, CD, etc.

  2. one author

  3. one subject

  4. all of the above


Correct Option: A

AI Explanation

To answer this question, you need to understand the purpose and structure of a library catalogue database.

A library catalogue database is used to organize and provide access to the items in a library's collection. Each record in the database represents one item in the collection, such as a book, journal, video, CD, etc. Therefore, the correct answer is A) one book, journal, video, CD, etc.

Option B) one author is incorrect because the database may contain multiple records for different books written by the same author.

Option C) one subject is incorrect because the database may contain multiple records for different items on the same subject.

Option D) all of the above is incorrect because the database focuses on individual items rather than grouping them by authors or subjects.

Therefore, the correct answer is A) one book, journal, video, CD, etc.

You are searching an electronic article index that contains citations to journal articles. What part of each article does the database contain?

  1. the whole article

  2. a summary of the article

  3. the title of the article

  4. the author, title and source of the article


Correct Option: D

You are making your own database so you can organize information about your ‘Top 100' movies. You want to include information like Title, Actor(s), Director, Year, Genre, etc. Each record in your database will represent:

  1. an actor

  2. a director

  3. a year

  4. a movie


Correct Option: D

Which of the following is the lowest cost DB2 product that can be legally installed on a Windows server that has 2 CPUs?

  1. DB2 Everyplace

  2. DB2 Express Edition

  3. DB2 Workgroup Server Edition

  4. DB2 Enterprise Server Edition


Correct Option: B

AI Explanation

To answer this question, you need to understand the different editions of DB2 and their pricing.

Let's go through each option to understand why it is correct or incorrect:

Option A) DB2 Everyplace - This option is incorrect because DB2 Everyplace is designed for mobile devices and is not intended for installation on a Windows server.

Option B) DB2 Express Edition - This option is correct because DB2 Express Edition is the lowest cost DB2 product that can be legally installed on a Windows server with 2 CPUs. It is designed for small to medium-sized businesses and has a lower price point compared to other editions.

Option C) DB2 Workgroup Server Edition - This option is incorrect because DB2 Workgroup Server Edition is a more advanced edition compared to DB2 Express Edition. It is designed for larger workgroups and has a higher price point.

Option D) DB2 Enterprise Server Edition - This option is incorrect because DB2 Enterprise Server Edition is the most advanced edition of DB2 and is designed for enterprise-level applications. It has a higher price point compared to the other editions.

The correct answer is B) DB2 Express Edition. This option is correct because it is the lowest cost DB2 product that can be legally installed on a Windows server with 2 CPUs.

On which two of the following database objects may the SELECT privilege be controlled?

  1. Index

  2. Sequence

  3. Nickname

  4. View


Correct Option: C,D

AI Explanation

To answer this question, you need to understand the concept of privileges in a database. Privileges control what actions can be performed on database objects, such as selecting data from a table or modifying its structure.

Let's go through each option to understand why it is correct or incorrect:

Option A) Index - The SELECT privilege cannot be controlled on an index. An index is a database object that improves the performance of queries by allowing faster data retrieval. However, it does not store the actual data itself, so there is no need to control the SELECT privilege on an index.

Option B) Sequence - The SELECT privilege cannot be controlled on a sequence. A sequence is a database object that generates unique numbers, typically used for generating primary key values. The SELECT privilege is not relevant for sequences as they are not queried like tables or views.

Option C) Nickname - The SELECT privilege can be controlled on a nickname. A nickname is a database object that provides a local name or alias for a remote table or view in a distributed database system. Controlling the SELECT privilege on a nickname allows you to determine who can access the remote data through the nickname.

Option D) View - The SELECT privilege can be controlled on a view. A view is a virtual table based on the result of a query. By controlling the SELECT privilege on a view, you can restrict who can retrieve data from the view, providing an additional layer of security.

The correct answer is C) Nickname and D) View. These options are correct because the SELECT privilege can be controlled on both nicknames and views to regulate access to the data they represent.

Which of the following DB2 objects can be referenced by an INSERT statement to generate values for a column?

  1. Identity column

  2. Table function

  3. Sequence

  4. Trigger


Correct Option: C

Which of the following events will NOT cause a trigger to be activated?

  1. A select operation

  2. An update operation

  3. An insert operation

  4. A delete operation


Correct Option: A

Which of the following DB2 data types does NOT have a fixed length?

  1. INT

  2. XML

  3. CHAR

  4. DOUBLE


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) INT - This option is incorrect because INT is a fixed-length data type in DB2. It occupies a specific number of bytes, such as 4 bytes for a 32-bit integer.

Option B) XML - This option is correct because XML is a variable-length data type in DB2. The length of an XML value can vary depending on the specific XML document being stored.

Option C) CHAR - This option is incorrect because CHAR is a fixed-length character data type in DB2. It requires a specified length and pads any unused space with blanks.

Option D) DOUBLE - This option is incorrect because DOUBLE is a fixed-length floating-point data type in DB2. It occupies a specific number of bytes, such as 8 bytes for a 64-bit double precision floating-point number.

The correct answer is B) XML. This option is correct because XML is a variable-length data type in DB2, meaning its length can vary depending on the specific XML document being stored.

Which of the following DB2 data types can NOT be used to create an identity column?

  1. SMALLINT

  2. NUMERIC

  3. INTEGER

  4. DOUBLE


Correct Option: D

Which of the following are optional and do not have to be specified when creating a table?

  1. Default constraint

  2. Column data type

  3. Column name

  4. Table name


Correct Option: A

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Default constraint - This option is correct because a default constraint is not mandatory when creating a table. A default constraint specifies a default value for a column when no value is explicitly provided during an insert operation. However, it is not necessary to specify a default constraint when creating a table.

Option B) Column data type - This option is incorrect. When creating a table, it is mandatory to specify the data type for each column. The data type determines the type of data that can be stored in the column, such as integer, string, date, etc.

Option C) Column name - This option is incorrect. When creating a table, it is mandatory to specify the name of each column. The column name is used to identify and reference the specific column within the table.

Option D) Table name - This option is incorrect. When creating a table, it is mandatory to specify the name of the table. The table name is used to identify and reference the table itself.

The correct answer is A) Default constraint. This option is correct because a default constraint is optional and does not have to be specified when creating a table.

Which of the following can NOT be used to restrict specific values from being inserted into a column in a particular table?

  1. Index

  2. Check constraint

  3. Default constraint

  4. Referential constraint


Correct Option: C

When does a view get populated?

  1. When it is created

  2. When it is referenced in an INSERT statement

  3. Any time an executable SQL statement references it

  4. The first time any executable SQL statement references it


Correct Option: C

To which of the following resources can a lock NOT be applied?

  1. Tablespaces

  2. Buffer pools

  3. Tables

  4. Rows


Correct Option: B

In NPS, it's a best practice to use 'rowid' as a primary key in a database table to guarantee quick access

  1. True

  2. False


Correct Option: B
- Hide questions