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

a) Consider a relation R=(A,B,C,D) with the following instance: A B C D 1 1 2 3

ID: 3698962 • Letter: A

Question

a) Consider a relation R=(A,B,C,D) with the following instance:

A

B

C

D

1

1

2

3

1

2

2

3

1

3

2

3

2

4

5

6

3

6

7

8

     

Which of the following function dependencies are satisfied? Why or How?            

1. A ---> B

2. A ---> CD

3. C --> D

          

b) The SQL like operator is case sensitive, but the lower () function on strings can be used to perform case insensitive matching. To show how, write a query that finds departments whose names contain the string “sci” as a substring, regardless of the case.

NOTE: PLEASE Writing is not recommended by hand

A

B

C

D

1

1

2

3

1

2

2

3

1

3

2

3

2

4

5

6

3

6

7

8

Explanation / Answer

a.) 1.) Since for same values of A, we are having different values of B. Therefore, A--> B is not satisfied.

2.) Since for each unique value of A, there is a different value of CD, therefore given relation is satisfiable.

3.) Since for each unique value of C, there is a different value of D, therefore given relation is satisfiable.

b.) Select Dept_name

From Department

Where lower(Dept_name) like '%sci% ;