Question

In: Computer Science

Subject - DataBase / MySQL * Which of the following is not correct about the statement...

Subject - DataBase / MySQL

* Which of the following is not correct about the statement provided?

SELECT Customer#, FirstName, LastName

FROM Customers C JOIN Orders O ON C.Customer# = O.Customer#

JOIN OrderItems OI ON O.Order# = OI.Order#

JOIN Books B ON OI.ISBN = B.ISBN

WHERE Category = 'Fitness' AND Category = 'Computers';

Select one:
a. Joins the OrderItems table to the Books table using the field ISBN
b. All of these are correct
c. Joins the Customer table to the Books table using Customer#
d. Joins the Customer table to the Orders table using the field Customer#
e. Joins the Orders table to the OrderItems table using the field Order#

* Which statement is NOT true about joining tables using an inner join?

Select one:
a. Only records that exist in both tables will be returned
b. The field names used to join must to be identical
c. The values in the fields used to join must be identical

* Which join type returns all possible combination of records, so that if a table that has 5 records is joined to a table with 3 records, 15 records are listed?

Select one:
a. Full join
b. Outer join
c. Inner join
d. Cross Join
e. Self-join

-THANK YOU

Solutions

Expert Solution

Answers:

Which of the following is not correct about the statement provided?
Answer: C.
Joins the Customer table to the Books table using Customer#
There is no join between Customer and Booka table using Customer#. rest 3 statements about join is correct.


Which statement is NOT true about joining tables using an inner join?
Answer: B. The field names used to join must to be identical
It is possible to join two tables with different column names but values must be identicle.
Example:

SELECT *
FROM dbo.Table1 t1
INNER JOIN dbo.Table2 t2 ON t1.OID = t2.TaskID;
-- The INNER JOIN will take rows from dbo.Table1 where the OID column values match 
values contained in the TaskID column from the Table2 table.

Which join type returns all possible combination of records, so that if a table that has 5 records is joined to a table with 3 records, 15 records are listed?
Answer: D.
Cross Join
Cross Join gets a row from the first table and then creates a new row for every row in the second table. Then It does same for the next row for in the first table and so on. So at the end we get (Number of rows in table one) * (Number of rows in table two).


Related Solutions

QUESTION 1 Which of the following statement is CORRECT about normalisation? A database that is not...
QUESTION 1 Which of the following statement is CORRECT about normalisation? A database that is not in at least third normal form cannot be implemented with MySQL. A database that is only in first normal form would breach the CAP theorem. Normalisation ensures consistent formatting, for example, that all the phone numbers would have the same number of digits. All of the above. None of the above. 0.5 points    QUESTION 2 Complete the four blanks in the following SQL...
Subject DataBase/MySQL What is wrong with this statement? SELECT vendor_id, (SELECT vendor_name FROM vendors), avg(invoice_total) FROM...
Subject DataBase/MySQL What is wrong with this statement? SELECT vendor_id, (SELECT vendor_name FROM vendors), avg(invoice_total) FROM invoices GROUP BY vendor_id; Select one: a. The subquery returns more than 1 row. b. You need a JOIN ON clause to pull from multiple tables. c. You cannot have a subquery in the SELECT statement. d. The result is a Cartesian Product. e. There is nothing wrong with this statement. What is wrong with this statement? SELECT vendor_name, avg(invoice_total) AS 'Invoice Total' FROM...
In MySql, using Application MYSQL Workbench and the Chinook database, please answer the following: -- 12....
In MySql, using Application MYSQL Workbench and the Chinook database, please answer the following: -- 12. SELECT the trackid, name and filesize (as shown in the bytes column) for all tracks that have a file size less than 2000000 and a GenreId of 1 or a file size less than 2000000 and a Genreid of 2 -- 13. Add a sort to the query from number 12 to sort by GenreID; -- 14. List all columns from the customer table...
Which of the following is a correct statement about a concave mirror?
Which of the following is a correct statement about a concave mirror? All of the other choices are not correct.A light ray through the center of curvature ofthe mirror is reflected parallel to theprincipal axisA light ray directed to the center of the mirrorreturns in its own path.A light ray parallel to the principal axis isreflected back through the center of curvature.A light ray through the focal point isreflected parallel to the principal axis.When an object is placed beyond the center...
Which statement about sponges is correct?
1.Which statement about sponges is correct?Sponges have two germ layers, which give rise to well-organized tissues.Sponges can only reproduce asexually by fragmentation or budding.Most sponges have bilateral symmetry.Sponges belong to the group of invertebrates known as cnidarians.Sponges are filter feeders.2.  Which are invertebrate chordates?tunicates onlylancelets onlyjawless fishes onlytunicates and lancelets but not jawless fishestunicates, lancelets, and jawless fishes
1. Which of the following is correct about the income statement: * It is an equation...
1. Which of the following is correct about the income statement: * It is an equation used by financial analysts It is an equation used by politicians It is a report that shows the cash inflows and cash outflows of the company It is a report that shows the revenues and expenses of the company None of the above 2. Which of the following is correct about cash flows statement: * It includes only the cash outflows It shows the...
1. Which of the following is correct about the income statement: * It is an equation...
1. Which of the following is correct about the income statement: * It is an equation used by financial analysts It is an equation used by politicians It is a report that shows the cash inflows and cash outflows of the company It is a report that shows the revenues and expenses of the company None of the above 2. Which of the following is correct about cash flows statement: * It includes only the cash outflows It shows the...
1 - Which of the following is not a correct statement about competitive advantage? a. If...
1 - Which of the following is not a correct statement about competitive advantage? a. If France produces 50 bottles of wine per labor hour while Germany 5, France has absolute advantage over Germany in wine. b. If France produces 25 bottles of beer per labor hour while Germany 20, France has comparative advantage over Germany in beer. c. If France produces 50 bottles of wine per labor hour while Germany 5 and beer production is as in “b”, France...
Choose the correct answer. 1.Which of the following statements about the income statement is correct? The...
Choose the correct answer. 1.Which of the following statements about the income statement is correct? The income statement covers a specific point in time. The elements of the income statement include income from operations and distributions to owners. The income statement summarizes the results of a company's operations for a period. All of the above. 2. A company's balance sheet shows the value of assets, liabilities, and stockholders' equity: Over a period of time for any given period of time...
1. Which of the following statement about the CPI is not correct? a. the CPI tracks...
1. Which of the following statement about the CPI is not correct? a. the CPI tracks changes in the price of import goods. b. the CPI tracks changes in the price of export goods. c. the CPI is based on the same set of goods over a multi-year period. d. the CPI only includes consumption goods – it does not include capital investment goods. 2. Suppose 60% of money is held as currency and the reserve ratio is 0.3. The...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT