SOLVED:SQL Questions solution

19.99 $

Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: . zip solution files instantly, after Payment


5/5 - (5 votes)

1. Give an example of a foreign key constraint that involves the Dept relation.
Answer: Manageid is a foreign key. It references the primary key eid in the Emp table
2. Write the SQL statements required to create the preceding relations, including appropriate
versions of all primary and foreign key integrity constraints.
3. Define the Dept relation in SQL so that every department is guaranteed to have a manager.
4. Write an SQL statement to add John Doe as an employee with eid = 101, age = 32 and salary = 15,000.
5. Write an SQL statement to give every employee a 10 percent raise.
6. Write an SQL statement to delete the Toy department.