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

please i want someone to answer all the questions Question 1 Given a table with

ID: 3852946 • Letter: P

Question

please i want someone to answer all the questions

Question 1 Given a table with the structure: EMPLOYEE (EmpNo, Name, Salary, HireDate), which of the following is not a valid SQL command? SELECT HireDate, COUNT(*) FROM EMPLOYEE WHERE Salary 30000; SELECT HireDate, COUNT(*) FROM EMPLOYEE GROUP BY HireDate; SELECT COUNT(EmpNo) FROM EMPLOYEE; SELECT COUNT() FROM EMPLOYEE WHERE Salary 30000; Question 2 As the voting age is 18, what should happen if the following command is issued: INSERT INTO VOTERS (VoterID, LastName, FirstName, DOB, Age, CDid) VALUES(04503,'Smith',John','23-mar-1991', 17,'GA01): Operation is not allowed. Check constraint violated Operation is allowed. Operation is not allowed. SQL statement is malformed Operation is not allowed. Primary key constraint violated. Operation is not allowed. Referential integrity constraint violated.

Explanation / Answer

Question 1:- Option 1

When we use the count function with the table attribute we need to use group by Clause otherwise it doesn't give the correct results.

Question 2: Option 1

This will violate the check constraint. Because tue Check constraint checks the condition with the given input data. If it satisfies then it will be stored in table otherwise it will give the error check constraint violated.

Question 3:- Option 2

Because order by clause can be defined after the where section.

Question 4:- Option 3

Inorder to change the attribute data in the perticular table we need to use the update command only. Update command just update the new data given.

Question 5:- Option 5.

Database triggers can be set into action when we use the DML insert update and delete queries.

Question 6:- Option 3

Null means it is required column but at the present time there is no data to insert but there will be in the futureto insert.

Question 7:- Option 1

Drop table command will delete the entire table but the delete command is used to delete some of the rows from the table.

Question 8:- Option 1

Because candidate key is the ome which specifies Uniqueness in the table.

Question 9:- Option 2

It will check the condition for every row that advisor id in the student table with advisor id the advisor table. We can say that These both are joined using this condition.

Question 10:- Option 1

This is the standard way to insert the data into the table.