CS4482tut10a - birthday date ); create table Emp ( ename...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS4482/6492 Advanced Database Systems Tutorial 10 1. Total transmission cost = 25,000 + 75,000 = 100,000 bytes 2. a) create type Person as ( ID varchar (10), name varchar (30), address varchar (40)); create type Employee as under Person ( salary integer ); create type Student as under Person ( tot_credits integer ); create table person of Person ; create table employee of Employee under person ; create table student of Student under person ; b) select * from only person 3. a) create type Skills as ( type varchar (30), year int ); create type Children as ( name varchar (30),
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: birthday date ); create table Emp ( ename varchar (30), ChildrenSet Children multiset , SkillSet Skills multiset ); b) (i) select distinct s.type from emp as e , unnest ( e.SkillSet ) as s (ii) select e.ename from Emp as e , unnest ( e.SkillSet ) as s where s.type = ’typing’ (iii) select ename , cs.name from Emp as e, unnest ( e.ChildrenSet ) as cs order by cs.birthday (iv) update Emp set ChildrenSet = ChildrenSet union multiset [(‘‘Jeb’’, ‘‘2/5/2001’’)] where ename = ‘‘George’’...
View Full Document

Ask a homework question - tutors are online