Computers and Technology
Question 1CorrectMark 1.00 out of 1.00Which of the following includes a set of commands used to control access to the data within the database, including security?Select one:a. DMLb. DALc. DCLd. DDLYour answer is correct.The correct answer is: DCLCreate Table SALE(SaleID integer,SaleDate date,Tax decimal,Total decimal);Create Table ITEM(ItemID integer,Name char(30),Cost decimal,Price decimal);Create Table SALE_ITEM(SaleID integer,SaleItemID integer);Considering the SQL create statements; assume that SALE, SALE_ITEM and ITEM tables were created without Primary Keys and Foreign Keys.Which of the following SQL statements gives an error?Select one:a. Alter Table SALE Add Primary Key (SaleID);Alter Table SALE_ITEM Add Primary Key (SaleID, SaleItemID);Alter Table SALE_ITEM Add Unique (SaleID);Alter Table ITEM Add Primary Key (ItemID);Alter Table SALE Add Foreign Key (SaleID) References SALE_ITEM;b. Alter Table SALE Add Primary Key (SaleID);Alter Table SALE_ITEM Add Primary Key (SaleID, SaleItemID);Alter Table SALE_ITEM Add Unique (SaleID);Alter Table SALE Add Foreign Key (SaleID) References SALE_ITEM (SaleID);c. Alter Table ITEM Add Primary Key (ItemID);Alter Table SALE_ITEM Add Primary Key (SaleID, SaleItemID);Alter Table SALE_ITEM Add Unique (SaleID);Alter Table ITEM Add Foreign Key (ItemID) References SALE_ITEM;d. Alter Table SALE Add Primary Key (SaleID);Alter Table SALE Add Foreign Key (SaleID) References SALE_ITEM;Your answer is incorrect.The correct answer is: Alter Table ITEM Add Primary Key (ItemID);Alter Table SALE_ITEM Add Primary Key (SaleID, SaleItemID);Alter Table SALE_ITEM Add Unique (SaleID);Alter Table ITEM Add Foreign Key (ItemID) References SALE_ITEM;