Question

In: Computer Science

1. What is one of the most powerful features of SQL? Operators Functions Table Joins 2....

1. What is one of the most powerful features of SQL?

Operators

Functions

Table Joins

2. A JOIN is a mechanism used to associate tables within a SELECT statement?

True

False

3. A JOIN can modify existing database tables

True

False

None of the above

4. The WHERE clause acts as a filter to only include rows that match the filter condition.

True

False

5. The more tables you JOIN the less resources the system uses.

True

False

6. The most commonly used JOIN is the INNER JOIN

True

False

7.Excluding the INNER JOIN, which of the following is not one of the three additional types of table JOINS

SELF JOIN

NATURAL JOIN

8. What OPERATOR is used to combine queries

FROM

UNION

EXCLUDE

9. When combining queries, how many ORDER BY clauses does the UNION operator use?

1

Can vary based on the number of queries being combined.

0

10. What two scenarios call for using combined queries. (Select two answers)

To return similarly structured data from different tables.

To perform multiple queries against a single table returning the data using one query.

To return data that creates new columns that don’t exist across the tables in the query.

To return data and find the intersection of the data across tables in the query.

Solutions

Expert Solution

Question 1: What is one of the most powerful features of SQL?

Answer: The most powerful feature of SQL is Joining of multiple tables. Using this feature, multiple tables can be related with each other to get requried result.

Correct choice: Table joins.     [option 3]

Question 2: A JOIN is a mechanism used to associate tables within a SELECT statement?

Answer: JOIN clause is used to relate or associate two or more tables within a SELECT statement. So the given statement is TRUE.

Correct choice: True.    [option 1]

Question 3: A JOIN can modify existing database tables

Answer: JOIN statement itself cannot modify existing database tables. Rather JOIN statement creates a new table (intermediate) containing the related data from multiple tables. It can also contain the cross product of the data of multiple tables. The existing tables are remained untouched.

Correct choice: False.     [option 2]

Question 4: The WHERE clause acts as a filter to only include rows that match the filter condition.

Answer: The WHERE clause filters only rows that matches the condition. Column wise filter is not done by WHERE clause. So the statement is correct.

Correct choice: True.     [option 1]

Question 5: The more tables you JOIN the less resources the system uses.

Answer: Joining of multiple tables means creating a new table with the existing tables based on some relation among them. It means more number of data will be present in the joined table. Thus the more tables are joined, the more resources the system uses.

Correct choice: False.     [option 2]

Question 6: The most commonly used JOIN is the INNER JOIN

Answer: INNER JOIN is the most commonly used join that selects all the rows which is common (or matches) in the joined tables between the columns.

Correct choice: True.     [option 1]

Question 7: Excluding the INNER JOIN, which of the following is not one of the three additional types of table JOINS

Answer: SELF JOIN is the type of join when a table is related to itself. NATURAL JOIN is the type of join that compares and selects all columns of two tables which have the same column-name and holds the corresponding same values.

If JOINS is one of the option in the question, which is not clear, then the answer to the question would be JOINS.

Correct choice: JOINS     [option 1]

### NOTE: If JOINS is not an option in the question, then the correct choice would be SELF JOIN (option 1).

Question 8: What OPERATOR is used to combine queries?

Answer: UNION operator is used to combine two or more queries.

Correct choice: UNION     [option 2]

Question 9: When combining queries, how many ORDER BY clauses does the UNION operator use?

Answer: When combining queries using UNION, ORDER BY clause is not required (in a normal query). Thus, 0 ORDER BY clause is required here.

Correct choice: 0.     [option 3]

Question 10: What two scenarios call for using combined queries. (Select two answers)

Answer: Combined queries are called for scenarios like:

Option 2: To perform multiple queries against a single table returning the data using one query. Here different queries on a single table can be combined to get the final result.

Option 4: To return data and find the intersection of the data across tables in the query. Here, different queries can be applied on different tables and combination of them can give the required result.

Correct Answer: Option 2 and Option 4.


Related Solutions

1. Write a SQL statement which joins the rider_student table with the rider_major table and lists...
1. Write a SQL statement which joins the rider_student table with the rider_major table and lists the rider student name and the name of the major (major_name) and the description of the major for which they are currently assigned. (You may use the SQL 'join' subclause, or simply express the join as part of the 'where' clause by indicating that you only want records where the primary key of the child table, rider_major, equals the corresponding foreign key of the...
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
1. SQL is considered one of the most valuable skills to empower managers as data analysts....
1. SQL is considered one of the most valuable skills to empower managers as data analysts. Search the Web for free resources that teach SQL. Try a free introductory lesson (you might find these in sites like Khan Academy, and Code Academy, among others). Is this something you might continue to explore on your own? Does your university offer classes where you can learn SQL and other methods and technologies used in data analytics? 2. Name and define the terms...
What is the most powerful and the most versatile line source of radiation? Explain.
What is the most powerful and the most versatile line source of radiation? Explain.
Economies of scale are one of the most powerful forces in economics. Answer the following questions...
Economies of scale are one of the most powerful forces in economics. Answer the following questions related to this very important principle of economics: A. Explain how economies of scale are particularly important to a monopolist, be they real (in reality, there are very few examples of monopoly in the real economy) or hypothetical. B. Building on question (a.) above, in the event that a new competitor decided to enter this otherwise monopolistic market and building on their natural competitive...
One of the most important features of most prokaryotes is their cell wall. Please explain the...
One of the most important features of most prokaryotes is their cell wall. Please explain the structural and functional properties of the cell walls in gram-positive and gram-negative bacteria.?
In SQL we are working with functions 1. Write a SELECT statement that returns these columns...
In SQL we are working with functions 1. Write a SELECT statement that returns these columns from the Instructors table: a. The AnnualSalary column b. A column named MonthlySalary that is the result of dividing the AnnualSalary column by 12 c. A column named MonthlySalaryRounded that calculates the monthly salary and then uses the ROUND function to round the result to 2 decimal places 2. Write a SELECT statement that returns these columns from the Students table: a. The EnrollmentDate...
1. What are the biological functions of lectins? 2. What are the biological functions of peroxidase?...
1. What are the biological functions of lectins? 2. What are the biological functions of peroxidase? (Answer Must be brief)
Choose the correct answer to fill in the blanks: 1) Regular ___________ is the most powerful...
Choose the correct answer to fill in the blanks: 1) Regular ___________ is the most powerful predictor of a person’s mobility in later years. a. Doctor's Appointments b. Medication c. Physical Activity d. Vitamin Supplementation 2) While the slow, natural loss of muscle mass and strength does result in lower ____________, nutrient needs, for the most part, remain consistent in our later years. It’s also important to note that less muscle mass doesn’t mean less desire or ability to participate...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT