Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ehicles table has one PK (tag) and one Index (tag, location). From the following

ID: 2246443 • Letter: E

Question

ehicles table has one PK (tag) and one Index (tag, location). From the following inser statements mention which row(s) will fail and why Note: Utilize the example tables given in the appendix and check the sequence of every insert a. Insert into vehicles (tag, location, class) values ('D824HB' 'ATL','Car') b. Insert into vehicles (tag, location, class) values (X824HB' 'Atlanta','Car') c. Insert into vehicles (tag, location, class) values ('D824HB''ATL 'Car') d. Insert into vehicles values ("X824HD','Virginia','Truck') e. Insert into vehicles (tag, location, class) values (X824HB ;'ATL','Truck) f. Insert into vehicles values (x824HX' ATL' Truck) g. Insert into vehicles (tag, location, class) values (X824HX';'Atlanta';'Car) h. Insert into vehicles (tag, location) values (X824XB ATL") i. Insert into vehicles (tag, location) values ('D824XB' ATL)

Explanation / Answer

a. this will be entered into the table as there is no violation of the values to be entered into table

b.this will also be entered into the table without any errors as the primary key is not violated,primary key will be violated only when the same id is repeated.

c.this will give an error as there is already with same tag values is present in the table, as tag is declared primary key ,the tag should be unique.

d.this will not give an error as the tag primary key is not violated.

e.this will also give an error as primary key will be violated as in already b the value 'X824HB' is entered in the table,eventhough the other two are different values it doesnot matter if the primary key is violated.

f.This will not give an error and this will be inserted as there is no violation of primary key tag.

g.This will not give any error as the tag primary key is unique and not present in the table.

h.This will not give any error and will be inserted as there is no violation of primary key tag.

i.Same goes for this too, as tag is unique one can insert any values without violating a primary key.