Question: Please do the question (b) (c) and (d) 1) (30 pts) Consider the following database schema: Employee -(ename, setof(Children), Address, setof(Skills)) Children scl, c2,...]) Address
Please do the question (b) (c) and (d)
1) (30 pts) Consider the following database schema: Employee -(ename, setof(Children), Address, setof(Skills)) Children scl, c2,...]) Address (city, state, zipcode) Skillss1, s2.. Assume that attributes of type setof(Children) and setof(Skills) have attribute names childrenSet and skillsSet. Suppose a database contains a relation emp (Employee) Now answer the following: a) b) c) d) Write a query to unnest the emp relation into flat-emp relation. Write a query to nest the relation flat-emp on the attribute for Children. Write a query to nest the relation flat-emp on the attribute for Skills. Write a query to nest the relation flat-emp on both the attributes for Children and Skills. 1) (30 pts) Consider the following database schema: Employee -(ename, setof(Children), Address, setof(Skills)) Children scl, c2,...]) Address (city, state, zipcode) Skillss1, s2.. Assume that attributes of type setof(Children) and setof(Skills) have attribute names childrenSet and skillsSet. Suppose a database contains a relation emp (Employee) Now answer the following: a) b) c) d) Write a query to unnest the emp relation into flat-emp relation. Write a query to nest the relation flat-emp on the attribute for Children. Write a query to nest the relation flat-emp on the attribute for Skills. Write a query to nest the relation flat-emp on both the attributes for Children and Skills
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
