Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

plz help b4 19 nov 1(a). Find out the Cartesian product (A X B) of the given pai

ID: 3615087 • Letter: P

Question

plz help b4 19 nov

1(a). Find out the Cartesian product (A X B) of the given pairof sets.         Marks: 5

      A => Set of first letterof the names ofcountries        =     A = { P, U, I }   

      B => Set of numbers denotingUniversity numbers    =     B = {010, 011}  

1(b). Consider the table below:

                               Room Table

RoomNo

hotelNo

Type

price

10

001

A

100

15

002

B

50

20

002

C

50

25

003

A

150

    

Show the relation that will be produced by the followingrelational algebra operation:          

hotelNo ( price > 50(Room))                                                                           Marks:10

RoomNo

hotelNo

Type

price

10

001

A

100

15

002

B

50

20

002

C

50

25

003

A

150

Explanation / Answer

Here, first the operation in the brackets ( i.e.price > 50 (Room) ) will be performed.This is Selection operation and according to the given condition,it will give us all the rows in which the price is greater than 50,i.e. the second and the last row of the table.

RoomNo

hotelNo

Type

price

10

001

A

100

25

003

A

150

Now, the outer operation (i.e.hotelNo  called Projection) is performedon the table obtained above. Here according to the given condition,the column named "hotelNo" have to be shown. So, after performingthis operation we get

hotelNo

001

003

So, the answer of the operations hotelNo (price > 50 (Room))   is

hotelNo

001

003

RoomNo

hotelNo

Type

price

10

001

A

100

25

003

A

150