0

databases Online Quiz - 59

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

What does a node refers to in terms of ETL concepts?

  1. Physical machines on which PowerCenter services are installed

  2. Logical ETL environment

  3. ETL and metadata services

  4. House keeping the ETL environment


Correct Option: A

Which of the following is a mandatory mapping component

  1. Mapplets

  2. Sessions

  3. Transformations

  4. Workflows


Correct Option: C

A source can be modified from Mapping designer

  1. True

  2. False


Correct Option: B

Which of the following is not a part of Designer Interface

  1. Source Analyzer

  2. Target Designer

  3. Workflow Monitor

  4. Mapplet Designer


Correct Option: C

Which of the following interfaces can be used to create a Transformation

  1. Transformation Developer

  2. Source Analyzer

  3. Target Designer

  4. Mapping Designer


Correct Option: A,D

Transformation Developer is used only for creating reusable transformations

  1. True

  2. False


Correct Option: A

A mapplet is a combination of reusable mappings

  1. True

  2. False


Correct Option: A

Which of the following can be modified in Source Analyzer

  1. Source/Table Name

  2. Database Name

  3. Source/Table Structure

  4. All of the above


Correct Option: D

How can a source defination created in Informatica?

  1. Import from database

  2. By draging a target defination

  3. By using create option in Sources tag

  4. All of the above


Correct Option: A,C

Which SQL statement is used to extract data from a database?

  1. SELECT

  2. GET

  3. OPEN

  4. EXTRACT


Correct Option: A

AI Explanation

To answer this question, you need to understand SQL (Structured Query Language) and the basic syntax used to extract data from a database.

The correct answer is A) SELECT.

Option A) SELECT - This option is correct because the SELECT statement is used to retrieve data from a database. It allows you to specify the columns you want to retrieve and the table(s) from which you want to retrieve the data. The SELECT statement is one of the fundamental statements in SQL and is used in almost every query.

Option B) GET - This option is incorrect because there is no GET statement in SQL for extracting data from a database. The GET statement is not a standard SQL statement.

Option C) OPEN - This option is incorrect because the OPEN statement is not used to extract data from a database. The OPEN statement is typically used to open a cursor in SQL, which is used to fetch rows from a result set.

Option D) EXTRACT - This option is incorrect because the EXTRACT statement is not used to extract data from a database. The EXTRACT statement is used to extract specific parts (such as year, month, day, etc.) from a date or time value in SQL.

Therefore, the correct answer is A) SELECT. This option is correct because the SELECT statement is used to extract data from a database.

Which SQL statement is used to update data in a database?

  1. SAVE

  2. MODIFY

  3. UPDATE

  4. SAVE AS


Correct Option: C

Which SQL statement is used to insert new data in a database?

  1. ADD RECORD

  2. ADD NEW

  3. INSERT

  4. INSERT NEW


Correct Option: C

AI Explanation

To answer this question, you need to understand SQL statements for inserting new data into a database. Let's go through each option to understand why it is correct or incorrect:

Option A) ADD RECORD - This option is incorrect because there is no SQL statement called "ADD RECORD" to insert new data in a database.

Option B) ADD NEW - This option is incorrect because there is no SQL statement called "ADD NEW" to insert new data in a database.

Option C) INSERT - This option is correct because the SQL statement "INSERT" is used to insert new data into a database. The INSERT statement allows you to specify the table name and the values for the columns you want to insert data into.

Option D) INSERT NEW - This option is incorrect because there is no SQL statement called "INSERT NEW" to insert new data in a database.

The correct answer is C) INSERT. This option is correct because the INSERT statement is used to insert new data into a database.

With SQL, how do you select all the columns from a table named "Persons"?

  1. SELECT [all] FROM Persons ;

  2. SELECT *. FROM Persons ;

  3. SELECT *.Persons ;

  4. SELECT * FROM Persons ;


Correct Option: D

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

  1. SELECT [all] FROM Persons WHERE FirstName='Peter' ;

  2. SELECT * FROM Persons WHERE FirstName='Peter' ;

  3. SELECT * FROM Persons WHERE FirstName LIKE 'Peter' ;

  4. SELECT [all] FROM Persons WHERE FirstName LIKE 'Peter' ;


Correct Option: B

AI Explanation

To select all the records from a table named "Persons" where the value of the column "FirstName" is "Peter", you can use the following SQL query:

B. SELECT * FROM Persons WHERE FirstName='Peter';

Explanation:

  • The "SELECT" statement is used to retrieve data from a database table.
  • The asterisk (*) is a wildcard character that represents all columns in the table.
  • "FROM Persons" specifies the table name from which the data will be retrieved.
  • "WHERE FirstName='Peter'" is the condition that filters the records to only those where the value of the "FirstName" column is "Peter".

With SQL, how do you select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

  1. SELECT * FROM Persons WHERE FirstName LIKE '%a';

  2. SELECT * FROM Persons WHERE FirstName='a' ;

  3. SELECT * FROM Persons WHERE FirstName LIKE 'a%' ;

  4. SELECT * FROM Persons WHERE FirstName='%a%;


Correct Option: C

AI Explanation

To select all the records from a table named "Persons" where the value of the column "FirstName" starts with an "a," you can use the SQL query:

C. SELECT * FROM Persons WHERE FirstName LIKE 'a%';

Explanation:

Option A) SELECT * FROM Persons WHERE FirstName LIKE '%a'; This option is incorrect because the LIKE condition '%a' will match any FirstName that ends with 'a', not those that start with 'a'.

Option B) SELECT * FROM Persons WHERE FirstName='a'; This option is incorrect because it will only select records where the FirstName is exactly equal to 'a', not those that start with 'a'.

Option C) SELECT * FROM Persons WHERE FirstName LIKE 'a%'; This option is correct because the LIKE condition 'a%' will match any FirstName that starts with 'a'.

Option D) SELECT * FROM Persons WHERE FirstName='%a%'; This option is incorrect because the LIKE condition '%a%' will match any FirstName that contains 'a' anywhere in the string, not just at the beginning.

Therefore, the correct answer is C) SELECT * FROM Persons WHERE FirstName LIKE 'a%'.

Which SQL keyword is used to sort the result-set?

  1. ORDER

  2. SORT

  3. SORT BY

  4. ORDER BY


Correct Option: D

AI Explanation

To answer this question, you need to understand how to sort the result-set in SQL.

Option A) ORDER - This option is incorrect because the keyword "ORDER" alone is not used to sort the result-set in SQL.

Option B) SORT - This option is incorrect because the keyword "SORT" alone is not used to sort the result-set in SQL.

Option C) SORT BY - This option is incorrect because the keyword "SORT BY" is not used to sort the result-set in SQL. The correct keyword to use is "ORDER BY".

Option D) ORDER BY - This option is correct because the keyword "ORDER BY" is used in SQL to sort the result-set in ascending or descending order based on one or more columns.

The correct answer is D. This option is correct because "ORDER BY" is the SQL keyword used to sort the result-set.

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

  1. SELECT * FROM Persons SORT 'FirstName' DESC ;

  2. SELECT * FROM Persons ORDER BY FirstName DESC;

  3. SELECT * FROM Persons ORDER FirstName DESC ;

  4. SELECT * FROM Persons SORT BY 'FirstName' DESC ;


Correct Option: B

AI Explanation

To answer this question, you need to understand the syntax of the SQL SELECT statement and the ORDER BY clause.

The correct answer is B) SELECT * FROM Persons ORDER BY FirstName DESC;

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

Option A) SELECT * FROM Persons SORT 'FirstName' DESC; This option is incorrect because the correct keyword to use for sorting in SQL is ORDER BY, not SORT. Additionally, the column name should not be enclosed in single quotes.

Option B) SELECT * FROM Persons ORDER BY FirstName DESC; This option is correct because it uses the correct syntax for sorting records in descending order. The ORDER BY clause is used to sort the records based on the column specified (in this case, FirstName), and the DESC keyword is used to specify descending order.

Option C) SELECT * FROM Persons ORDER FirstName DESC; This option is incorrect because the ORDER keyword is missing before the column name. The correct syntax is ORDER BY.

Option D) SELECT * FROM Persons SORT BY 'FirstName' DESC; This option is incorrect because the correct keyword to use for sorting in SQL is ORDER BY, not SORT. Additionally, the column name should not be enclosed in single quotes.

The correct answer is B) SELECT * FROM Persons ORDER BY FirstName DESC. This option is correct because it uses the correct syntax for sorting records in descending order.

How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons table?

  1. UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen';

  2. MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen ;

  3. UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen' ;

  4. MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen' ;


Correct Option: A

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

  1. DELETE FROM Persons WHERE FirstName = 'Peter' ;

  2. DELETE FirstName='Peter' FROM Persons;

  3. DELETE ROW FirstName='Peter' FROM Persons ;

  4. TRUNCATE FROM Persons WHERE FirstName='Peter'


Correct Option: A
Explanation:

To solve this question, the user needs to know the basic syntax for deleting records in SQL, including the correct use of the DELETE command and WHERE clause.

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

A. DELETE FROM Persons WHERE FirstName = 'Peter' ; This option is correct. The DELETE command is used to delete records from a table in SQL. The WHERE clause is used to specify the condition that must be met for a record to be deleted. In this case, we want to delete all records where the FirstName is Peter, so we use the WHERE FirstName = 'Peter' condition.

B. DELETE FirstName='Peter' FROM Persons; This option is incorrect. The correct syntax for the DELETE command is DELETE FROM table_name, followed by the WHERE clause. In this option, the syntax is incorrect because the table name is missing, and the condition is in the wrong place.

C. DELETE ROW FirstName='Peter' FROM Persons ; This option is incorrect. The correct syntax for the DELETE command is DELETE FROM table_name, followed by the WHERE clause. In this option, the syntax is incorrect because the ROW keyword is not used in the correct way.

D. TRUNCATE FROM Persons WHERE FirstName='Peter' This option is incorrect. The TRUNCATE command is used to delete all records from a table, not specific records that meet a certain condition. Also, the syntax is incorrect because the WHERE clause is used in the wrong place.

The Answer is: A. DELETE FROM Persons WHERE FirstName = 'Peter' ;

With SQL, how can you return the number of records in the "Persons" table?

  1. SELECT COLUMNS(*) FROM Persons ;

  2. SELECT COUNT() FROM Persons;

  3. SELECT COUNT(*) FROM Persons;

  4. SELECT COLUMNS() FROM Persons;


Correct Option: C
- Hide questions