Quiz Space

Database Management Systems · Quiz 1 · 27 Oct 2024 · September 2024 term

Question 14: Using the SQL query shown below, a view named BestTeam i…

Question 14

+4 marksOne correct option

Consider the tables 3 and 4 and answer the given subquestions.

Table 3: Relation team

team_idnamerankingcountry
Cric-1BCCI1India
Cric-2ACB3Australia
Cric-3PCB10Pakistan
Cric-4NCB9Nepal
Cric-5ECB4England

Table 4: Relation players

team_idplayer_idnameranking
Cric-1BCCI-11Virat1
Cric-1BCCI-23Rohit3
Cric-3PCB-22Azam2
Cric-2ACB-12David6
Cric-2ACB-29Smith3
Cric-5ECB-88Cris4
Cric-5ECB-82Ben1

Using the SQL query shown below, a view named BestTeam is created.

sql
CREATE VIEW BestTeam AS
SELECT p.player_id, p.name, t.country
FROM players p join team t on p.team_id = t.team_id
WHERE t.ranking < 4

Which among the following SQL queries will display the table shown below?

player_idname
BCCI-11Virat
BCCI-23Rohit
  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • B

Question 14 of 14 in the IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 27 Oct 2024, in the September 2024 term (IIT M DIPLOMA AN EXAM QDD2 27 Oct 2024). It carries 4 marks.

More questions from this paper

  1. Q1Which of the following is the correct sequence for query processing?
  2. Q2Figure question
  3. Q3A relational database contains two separate tables called Employee and Department.\ The Employee table has the attribut…
  4. Q4The relation Students(Name, Total_Marks) contains the names and marks of different students where no two students have …
  5. Q5Consider the table Faculty(ID, Name, Department, Salary) and the two queries Q1 and Q2 given below. Our goal is to find…
  6. Q6Consider the following Entity Relationship Diagram: Choose the correct statements.
  7. Q7We want to create the table nominee by using following SQL statements: Which of the following is/are the correct SQL st…
  8. Q8Consider relations Book and Author shown in Table 1 and Table 2 | BookID | Title | AuthorID | Genre | |---|---|---|---|…
  9. Q9Consider the following relations:\ Instructor(<u>InsID</u>, InsName, email)\ Course(<u>CID</u>, CName)\ Teaches(<u>InsI…
  10. Q10Questions: Find the first names of players whose names start with 'A' and have at least 4 characters. Find out the numb…
  11. Q11Consider the following relational schema and answer the given subquestions.
  12. Q12Consider the tables 3 and 4 and answer the given subquestions. Table 3: Relation team | team_id | name | ranking | coun…
  13. Q13Consider the tables 3 and 4 and answer the given subquestions. Table 3: Relation team | team_id | name | ranking | coun…