Quiz Space

Database Management Systems · Quiz 1 · 7 Jul 2024 · May 2024 term

Question 3: Consider the following SQL statement: Which among the fol…

Question 3

+3 marksOne correct option

Consider the following SQL statement:

sql
Create table Cars(
CarID varchar(8),
CarName varchar(20),
CarColour varchar(8),
YearOfPurchase integer,
Weight integer,
primary key (CarID),
check(YearOfPurchase in (1990, 2000, 2005, 2010)));

Which among the following will cause an integrity constraint violation in the Cars table?

Note: Insertions are done in the order of the options given.

  1. A
  2. B
  3. C
  4. D
Show answer

Correct answer

  • A

Question 3 of 15 in the IIT Madras BS Database Management Systems (DBMS) Quiz 1 paper sat on 7 Jul 2024, in the May 2024 term (IIT M DIPLOMA AN EXAM QDD2 7 July 2024). It carries 3 marks.

More questions from this paper

  1. Q1Consider the table Champions_League for given subquestions | Name | Age | Team | Country | Goals | |---|---|---|---|---…
  2. Q2Consider the table Champions_League for given subquestions | Name | Age | Team | Country | Goals | |---|---|---|---|---…
  3. Q4Figure question
  4. Q5Figure question
  5. Q6Consider the following relations: players(<u>pid</u>, name, age, jersey_no)\ teams(<u>team_name</u>, matches, points, p…
  6. Q7Consider the following data for given subquestions: | Driver_ID | Name | Team | Salary | |---|---|---|---| | 55 | Carlo…
  7. Q8Consider the following data for given subquestions: | Driver_ID | Name | Team | Salary | |---|---|---|---| | 55 | Carlo…
  8. Q9Which of the following statement(s) is/are correct?
  9. Q10Consider the E-R diagram given in Figure 1 and answer the subquestions. Identify the correct relational schema for the …
  10. Q11Consider the E-R diagram given in Figure 1 and answer the subquestions. Identify the correct relational schema for the …
  11. Q12Consider the E-R diagram given in Figure 1 and answer the subquestions.
  12. Q13Consider the tables r and s. | A | B | C | D | |---|---|---|---| | p | 1 | p | a | | q | 2 | r | a | | r | 4 | q | b | …
  13. Q14Consider a relational schema:\ Parts(<u>Pid</u>, Pname, Price, Quantity)\ Vendors (<u>Vid</u>, Vname, Location, Pid) Co…
  14. Q15Consider the following table which has three attributes: X, Y and Z, where X is the primary key and Z is the foreign ke…