0

databases Online Quiz - 64

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

Which two describe a stored procedure?

  1. A stored procedure is typically written in SQL.

  2. A stored procedure is a named PL/SQL block that can accept parameters.

  3. A stored procedure is a type of PL/SQL subprogram that performs an action.

  4. A stored procedure has three parts: the specification, the body, and the exception handler part.

  5. The executable section of a stored procedure contains statements that assigns values, control execution, and return values to the calling environment.


Correct Option: B,C

Referring to the above scenario, what structure will you deploy?

  1. Cursor table

  2. Table filter

  3. Dynamic procedure

  4. View

  5. Summary table


Correct Option: D

Referring to the scenario above, which one of the following is a valid ongoing "operational process?"

  1. OS requirement

  2. User analysis

  3. Performance monitoring

  4. Data dictionary specification

  5. System requirement


Correct Option: C

Which phase of the data modeling process contains security review?

  1. Structure

  2. Design issue

  3. Data source

  4. Storage issue

  5. Operational process


Correct Option: B

Which one of the following is NOT a characteristic of metadata?

  1. Data about data

  2. Describes a data dictionary

  3. Self-describing

  4. Includes user data

  5. Supports its own structure


Correct Option: D

Referring to the scenario above, what clause or command do you use in the query to help avoid a costly tablescan?

  1. GROUP BY clause

  2. INDEX command

  3. HAVING clause

  4. FROM clause

  5. WHERE clause


Correct Option: B

How to specify a column alias?

  1. Place the alias at the beginning of the statement to describe the table.

  2. Place the alias after each column, separated by white space, to describe the column

  3. Place the alias after each column, separated by a comma, to describe the column.

  4. Place the alias at the end of the statement to describe the table.

  5. Place the alias at the end of where clause to describe each table


Correct Option: B

AI Explanation

To specify a column alias in a SQL statement, you can use option B, which involves placing the alias after each column, separated by white space, to describe the column.

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

Option A) Place the alias at the beginning of the statement to describe the table - This option is incorrect because column aliases are used to rename individual columns, not the entire table.

Option B) Place the alias after each column, separated by white space, to describe the column - This option is correct. In SQL, you can use the "AS" keyword followed by the alias name after each column to specify a column alias.

Option C) Place the alias after each column, separated by a comma, to describe the column - This option is incorrect because column aliases in SQL are typically separated by white space, not commas.

Option D) Place the alias at the end of the statement to describe the table - This option is incorrect because, as mentioned earlier, column aliases are used to rename individual columns, not the entire table.

Option E) Place the alias at the end of the WHERE clause to describe each table - This option is incorrect because column aliases are not typically used in the WHERE clause. They are used to rename columns in the SELECT clause.

Therefore, the correct answer is option B.

Indicate whether above statement is true or false.

  1. True

  2. False


Correct Option: A

Indicate whether above statement is true or false.

  1. True

  2. False


Correct Option: B

Indicate whether above statement is true or false.

  1. True

  2. False


Correct Option: A

An RDBMS is a

  1. Remote DBMS

  2. Relative DBMS

  3. Relational DBMS

  4. Reliable DBMS


Correct Option: C

Indicate whether this statement is true or false. The domain of a column containing the month number of the date of birth of employees differs from the domain of a column with the day number of that date.

  1. True

  2. False


Correct Option: A

Indicate whether this statement is true or false. Restricting the domain of a numeric column to non-negative values can be implemented with a check constraint.

  1. True

  2. False


Correct Option: A
Explanation:

To solve this question, the user needs to know what a check constraint is and the concept of restricting the domain of a numeric column.

A check constraint is a rule that limits the values that can be inserted into a column. It ensures that the data is valid and meets certain criteria. Restricting the domain of a numeric column to non-negative values means that only values greater than or equal to zero can be inserted into the column.

Now, let's go through each option:

A. True: This option is correct. A check constraint can be used to restrict the domain of a numeric column to non-negative values. For example, the following SQL code creates a check constraint that restricts the values in the "age" column to be greater than or equal to zero:

ALTER TABLE students
ADD CONSTRAINT non_negative_age CHECK (age >= 0);

B. False: This option is incorrect. As explained above, a check constraint can be used to restrict the domain of a numeric column to non-negative values. Therefore, option A is the correct answer.

The Answer is: A

Indicate whether this statement is true or false. The primary key column must contain unique values.

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, you need to understand the concept of a primary key in a database.

A primary key is a column or a set of columns in a table that uniquely identifies each row in the table. It ensures that each row has a unique identifier. Therefore, the statement "The primary key column must contain unique values" is true.

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

Option A) True - This option is correct because the primary key column must contain unique values to uniquely identify each row in the table.

Option B) False - This option is incorrect because the primary key column must contain unique values.

The correct answer is A) True. This option is correct because the primary key column must contain unique values.

Indicate whether this statement is true or false.A view is an alternative method to store data.

  1. True

  2. False


Correct Option: A

AI Explanation

To answer this question, we need to understand what a "view" is in the context of data storage.

A view is a virtual table that is based on the result of a query. It is not a physical storage method for data, but rather a way to present data from one or more tables in a customized way.

Therefore, the statement "A view is an alternative method to store data" is false.

The correct answer is B) False.

Indicate whether this statement is true or false. A stored procedure is only executed when asked for explicitly.

  1. True

  2. False


Correct Option: A

Indicate whether this statement is true or false. A trigger can be used instead of a foreign key to implement referential integrity.

  1. True

  2. False


Correct Option: A

Which of the following is not a logical database structure?

  1. Chain

  2. Network

  3. Tree

  4. Relational


Correct Option: A

Which of the following is not a schema object?

  1. Indexes

  2. Public synonyms

  3. Triggers

  4. Packages


Correct Option: B

RAISE_APPLICATION_ERROR is a built-in procedure in oracle which is used to display the user-defined error messages along with the error number. What is the range of the error number for user defined error messages:

  1. Between -20000 and -20999

  2. Between -200000 and -209999

  3. Between -20001 and -20999

  4. Between -200001 and -209999


Correct Option: A
- Hide questions