Question: Given following relational schema: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid:
Given following relational schema: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) 1. Write the SQL statements required to create the preceding relations, including appropriate versions of all primary and foreign key integrity constraints. 2. Define the Dept relation in SQL so that every department is guaranteed to have a manager. 3. Write an SQL statement to add John Doe as an employee with eid = 101, age = 32 and salary = 15, 000. 4. Write an SQL statement to give every employee a 10 percent raise. 5. Write an SQL statement to delete the Toy department.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
