Suppose you want to compare three keys Primary Key Super Key and Candidate Key

# Suppose you want to compare three keys primary key

• 23
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 12 - 17 out of 23 pages.

28) Suppose you want to compare three keys (‘Primary Key’, ‘Super Key’ and‘Candidate Key’) in a database. Which of the following option(s) is/are correct?1.Minimal super key is a candidate key2.Only one Candidate Key can be Primary Key3.All super keys can be a candidate key4.We cannot find “Primary Key” from “Candidate Key”
C. 1 and 3D. 2 and 4E. 1, 2 and 3Q29) Consider a relation R with the schema R (A, B, C, D, E, F) with a set of functionaldependencies F as follows:{AB->C, BC->AD, D->E, CF->B}Which of the following will be the output of DA+?Note: For any X, X+ is closure of X.30) Suppose you have a table “Loan_Records”. SELECT Count(*)FROM( (SELECT Borrower, Bank_Manager FROMLoan_Records)AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROMLoan_Records) AS T);What is the output of the following SQL query?
D. 10 Q31) Is “SELECT” operation in SQL equivalent to “PROJECT” operation in relational algebra?A. Yes, both are equivalent in all the casesB. No, both are not equivalentTable: AV1Questions 32-36 are based on the above table.Q32) What will be the output of following query?
Q33) What will be the output for the below query?Query: SELECT Name from AV1 where Name LIKE '%______%';Note: The above operation contains 6 underscores (‘_’) used with LIKE operator.A. It will return names where number of characters in names are greater than or equals to 6B. It will return names where number of characters in names are greater than 6C. It will return names where number of characters in names are less than or equals to 6D. It will give an errorQ34) What will be the output of the below query?Query: SELECT Company, AVG(Salary) FROM AV1 HAVING AVG(Salary) > 1200 GROUP BY Company WHERE Salary > 1000 ;A. B.C.
Q35) What will be the output for the below Query 1 and Query 2?