CS403 VU Assignment No. 2 Spring 2012 Solution

(a). Find out the Cartesian product (D1 × D2 × D3) of the given pair of sets.

D1 => Set of first two Vowels = D1 = {A, E}
D2 => Set of three country codes = D2 = {213,54, 994}
D3 => Set of first three odd numbers = D3 = {1, 3, 5}

(b). Keeping in view the previous assignment scenario lets suppose there is a simple database for some entities in CMS might contain relations for Student, Class, Faculty and Enrollment. The relation schema would be written as:

Student (Stu_Id, LastName, FirstName, Major, Credits)
Faculty (Fac_Id, department, rank, name)
Class (Class_No, Fac_Id, Schedule, room)
Enrollment (Stu_Id, Class_No, Grade)

Using this sample relational schema, identify foreign key in Class relation and Composite primary key in Enrollment relation.