Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6)

Similar presentations


Presentation on theme: "Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6)"— Presentation transcript:

1 Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6) (5, 4) (7, 2)

2 Quiz 1 2. Give a one-to-one mapping from X to Y.
N = {n: n is an integer and n  0} X = {x: x  N and x  3} Y = {y: y = 3 * n - 1, where n  N} N 1 2 X 3 4 5 Y -1 2 5 x  3 x = n + 3 y = 3 * n - 1 n = x- 3 y = 3 * (x – 3) - 1 = 3 * x - 10 (Either one is correct)

3 Quiz 1  (Att2  9) (A B) A (Att1, Att2) B (Att3, Att4, Att1)
 Att1 Att2 Att3 Att4 Att1   x a y  (Att2  9) (A B) Answer: (2, 2, null, null) (5, 9, a, 6) (5, 9, y, 5)

4 Quiz 1 4. List all properties in city Platteville that are managed by staff Joe Young.  Property.* ( Fname = ‘Joe’ and Lname = ‘Young’ and City = ‘Platteville’ (Staff Property)) Incorrect string expression: -1 Fname = Joe and Lname = Young and City = “Platteville”

5 Quiz 1 (5 points) List Pno, Type and Rent of all properties of owner Frank Smith that have been viewed this year. You can use CurrentDate.Year as a function to get the current year. The same applies to viewDate. The same query should work for every year.  Property. Pno, Type, Rent ( viewDate.Year = CurrentDate.Year and firstName = ‘Frank’ and lastName = ‘Smith’ (Owner Property Viewing)) Either Property. Pno or Viewing.Pno will work Incorrect string expression: -1


Download ppt "Quiz 1 1. Given two sets S = {3, 5, 7} and T = {2, 4, 6}. List all elements of the following set: {(s, t) | (s, t)  S  T and s + t = 9} Result (3, 6)"

Similar presentations


Ads by Google