0

databases Online Quiz - 163

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

Which SELECT statement should you use if you want to display unique combinations of the POSITION and MANAGER values from the EMPLOYEE table?

  1. SELECT DISTINCT position, manager FROM employee;

  2. SELECT position, manager DISTINCT FROM employee;

  3. SELECT position, manager FROM employee;

  4. SELECT position, DISTINCT manager FROM employee;


Correct Option: A
Explanation:

To solve this question, the user needs to know the syntax of the SELECT statement and the purpose of the DISTINCT keyword. The user must retrieve unique combinations of the POSITION and MANAGER values from the EMPLOYEE table.

Option A is the correct answer:

A. SELECT DISTINCT position, manager FROM employee;

This option retrieves unique combinations of the POSITION and MANAGER values from the EMPLOYEE table. The DISTINCT keyword ensures that each combination is unique and not repeated in the result set.

Option B is incorrect:

B. SELECT position, manager DISTINCT FROM employee;

This option is not valid because the keyword DISTINCT is in the wrong position. The correct syntax is SELECT DISTINCT, not SELECT column1, column2 DISTINCT.

Option C is incorrect:

C. SELECT position, manager FROM employee;

This option retrieves all combinations of the POSITION and MANAGER values from the EMPLOYEE table, including duplicates.

Option D is incorrect:

D. SELECT position, DISTINCT manager FROM employee;

This option is not valid because the keyword DISTINCT is in the wrong position. The correct syntax is SELECT DISTINCT, not SELECT column1, DISTINCT column2.

The Answer is: A

  1. /SQL*Plus commands cannot be abbreviated.

  2. /SQL*Plus commands are accesses from a browser.

  3. /SQL*Plus commands are used to manipulate data in tables.

  4. /SQL*Plus commands manipulate table definitions in the database.

  5. /SQL*Plus is the Oracle proprietary interface for executing SQL statements.


Correct Option: C,D

Which is an /SQL*Plus command?

  1. INSERT

  2. UPDATE

  3. SELECT

  4. DESCRIBE

  5. DELETE

  6. RENAME


Correct Option: D

Which two statements are true regarding the ORDER BY clause?

  1. The sort is in ascending by order by default.

  2. The sort is in descending order by default.

  3. The ORDER BY clause must precede the WHERE clause.

  4. The ORDER BY clause is executed on the client side.

  5. The ORDER BY clause comes last in the SELECT statement

  6. The ORDER BY clause is executed first in the query execution.


Correct Option: A,E

The size of a table does NOT need to be specified.

  1. True

  2. False


Correct Option: A

Can you use both HAVING and WHERE SQL clauses in one SQL statement?

  1. Yes

  2. No

  3. Sometimes possible

  4. Can't Say


Correct Option: A

What is the correct order of the ">" and the "=" operators, when we want to specify greater or equal search condition?

  1. =>

  2. >=

  3. Neither of the other two.

  4. >>


Correct Option: B

The table columns are also known as...

  1. Fields

  2. Attributes

  3. Records

  4. Schema


Correct Option: B

What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) >5

  1. Selects the total number of orders from the Sales table, if this number is greater than 5

  2. Selects all Customers from the Sales table

  3. Both of them above

  4. Selects all customers from table Sales that have made more than 5 orders


Correct Option: D
  1. Specifies data retrieved

  2. Specifies the tables to retrieve rows from.

  3. Specifies the columns we are retrieving.

  4. Specifies a search condition.


Correct Option: B

Which Service / Server would be used to host the OLTP data?

  1. SSAS

  2. SSIS

  3. SQL RDBMS

  4. SSRS


Correct Option: C
Explanation:

To solve this question, the user needs to have an understanding of the different services/servers in Microsoft SQL Server and their purposes.

SSAS (SQL Server Analysis Services) is used for creating and managing OLAP (Online Analytical Processing) databases, which are used for data analysis and business intelligence.

SSIS (SQL Server Integration Services) is used for data integration and migration, including ETL (Extract, Transform, Load) processes.

SSRS (SQL Server Reporting Services) is used for creating and managing reports based on data stored in a SQL Server database.

C. SQL RDBMS (Relational Database Management System) is the correct option for hosting OLTP (Online Transaction Processing) data. OLTP databases are optimized for the rapid processing of transactions, such as inserting, updating, and deleting data. SQL RDBMS is designed to manage relational databases, which are commonly used for OLTP applications.

Therefore, the correct answer is:

The Answer is: C

Which Service / Server would be used to host the Staging data

  1. SSAS

  2. SSIS

  3. SQL RDBMS

  4. SSRS


Correct Option: C

AI Explanation

To answer this question, we need to understand the purpose of each service/server and how they are typically used in a data environment:

Option A) SSAS (SQL Server Analysis Services) - This option is incorrect because SSAS is used for online analytical processing (OLAP), data mining, and business intelligence functionalities. It is not typically used for hosting staging data.

Option B) SSIS (SQL Server Integration Services) - This option is incorrect because SSIS is used for data integration, data transformation, and workflow tasks. While SSIS can be used to extract data from different sources and load it into a staging area, it is not specifically designed for hosting staging data.

Option C) SQL RDBMS (Relational Database Management System) - This option is correct because a SQL RDBMS, such as Microsoft SQL Server, is commonly used to host staging data. Staging data refers to a temporary storage area where data is prepared and transformed before being loaded into the final destination. SQL RDBMS provides the necessary tools and functionalities to store, manipulate, and manage data in a relational database structure, making it suitable for hosting staging data.

Option D) SSRS (SQL Server Reporting Services) - This option is incorrect because SSRS is used for creating, managing, and delivering reports. It is not specifically designed for hosting staging data.

Therefore, the correct answer is Option C) SQL RDBMS, as it is the most appropriate service/server for hosting staging data.

What are the reasons for switching to a solution using Business Intelligence? Select all the options that are applicable.

  1. Slow queries

  2. Disparate Data sources

  3. Invalid / Inconsistent report data

  4. Availability of data to all users


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) Slow queries - This option is correct because one of the reasons for switching to a solution using Business Intelligence is to address slow queries. Business Intelligence tools can optimize query performance and provide faster access to data.

Option B) Disparate Data sources - This option is incorrect. While disparate data sources can be a challenge, it is not a specific reason for switching to a solution using Business Intelligence. Business Intelligence can help consolidate and analyze data from different sources, but it is not the primary reason for switching to such a solution.

Option C) Invalid / Inconsistent report data - This option is incorrect. Although Business Intelligence can help improve data quality and consistency, it is not the main reason for switching to a Business Intelligence solution.

Option D) Availability of data to all users - This option is incorrect. While Business Intelligence solutions can provide access to data for all users, it is not the primary reason for switching to such a solution.

The correct answer is A) Slow queries. This option is correct because one of the primary reasons for switching to a solution using Business Intelligence is to address slow queries and improve query performance.

Limiting the rows in a select statement for a specific condition is done by the clause

  1. Distinct

  2. Projection

  3. Where

  4. All of the above


Correct Option: C

SYSDATE is a date function that returns the current database server date and time.

  1. True

  2. False


Correct Option: B

The value returned by the subquery is used by the main query.

  1. True

  2. False


Correct Option: B

To perform wild card search “Like” is used .

  1. True

  2. False


Correct Option: B

What is the output of the following? SELECT ROUND(1111.93412,3) FROM DUAL;

  1. 1112

  2. 1111.93

  3. 1111.93412

  4. 1111.934


Correct Option: D

AI Explanation

To answer this question, we need to understand the ROUND function in SQL.

The ROUND function in SQL is used to round a number to a specified number of decimal places.

In the given query, the ROUND function is applied to the number 1111.93412 with a precision of 3 decimal places.

The correct answer is D) 1111.934.

This is because the ROUND function rounds the number 1111.93412 to 3 decimal places, resulting in 1111.934.

- Hide questions