Quiz Space

Database Management Systems · End Term · 21 Dec 2025 · September 2025 term

Question 19: Choose the correct SQL code which is used to create the …

Question 19

+2 marksOne or more correct options

Consider the following schema diagram of IPLt20 and answer the given subquestions

Consider the following schema diagram of IPLt20 and answer the given subquestions

Choose the correct SQL code which is used to create the table schedule.

Select all that apply.

  1. A

    CREATE table schedule ( match_id varchar(255) primary key, venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), foreign key (team_1) references teams(team_id), foreign key (team_2) references teams(team_id) )

  2. B

    CREATE table schedule ( match_id varchar(255) primary key, venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), foreign key (team_1) references teams(team_id), foreign key (team_2) references teams(team_id), foreign key (match_id) references results(match_id) )

  3. C

    CREATE table schedule ( match_id varchar(255) primary key, venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), foreign key (team_1, team_2) references teams(team_id) )

  4. D

    CREATE table schedule ( match_id varchar(255), venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), primary key (match_id), foreign key (team_1) references teams(team_id), foreign key (team_2) references teams(team_id) )

Show answer

Correct answers

  • A

    CREATE table schedule ( match_id varchar(255) primary key, venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), foreign key (team_1) references teams(team_id), foreign key (team_2) references teams(team_id) )

  • D

    CREATE table schedule ( match_id varchar(255), venue varchar(255), date varchar(255), team_1 varchar(255), team_2 varchar(255), primary key (match_id), foreign key (team_1) references teams(team_id), foreign key (team_2) references teams(team_id) )

Question 19 of 21 in the IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 21 Dec 2025, in the September 2025 term (Database Management Systems 18 Dec 25). It carries 2 marks.

More questions from this paper

  1. Q1Figure question
  2. Q2Figure question
  3. Q3Figure question
  4. Q4Consider a multilevel index with five levels as L1, L2, L3, L4 and L5. Let L1 be the innermost and L5 be the outermost …
  5. Q5Figure question
  6. Q6The following key values are inserted into a tree of order 4 in a given sequence. The tree is initially empty. 17, 81, …
  7. Q7Figure question
  8. Q8Figure question
  9. Q9Figure question
  10. Q10Which of the following is the correct order of node traversal if we want to insert the node '76'?
  11. Q11Figure question
  12. Q12Figure question
  13. Q13Figure question
  14. Q14Figure question
  15. Q15Identify the multivalued dependency (MVD) present in the table.
  16. Q16Consider the following tables: Choose the correct option.
  17. Q17Execute the following SQL statements in the given order.
  18. Q18Choose the correct option
  19. Q20The team management has decided to make ’Surya Kumar Yadav’ as the captain of 'Mumbai Indians'. Which of the following …
  20. Q21Consider the following schema diagram of IPLt20 and answer the given subquestions