Search Header Logo

DBI202 05

Authored by Le CT)

World Languages

KG

Used 25+ times

DBI202 05
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=27 (8030) The binary relationship between classes in UML is called ...

a. Aggregation

b. Composition

c. Association

d. Relation

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=28 (8231) Consider the Datalog rule H(x,y) <- S(x, y) AND x > 2 AND y < 6. Relation S(x, y) has 3 tuples (2, 3), (3, 5), and (4, 6). What is about H?

a. H has a tuple (3, 5)

b. H has a tuple (2, 3)

c. H has 2 tuples (2, 3) and (3, 5)

d. H has 3 tuples (2, 3) and (3, 5) and (4, 6)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=30 (8232) Suppose that tuple t appears, respectively, x, y, and z times in the relations X, Y, and Z. Let t appear w times in the relation:
X union (Y intersect Z).
Which of the following inequalities is true ?

a. w <= x+y

b. w <= y+z

c. w >= z

d. w <= max(x,y)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=33 (8522) The table Arc(x,y) currently has the following tuples (note there are duplicates):
(See picture)


Compute the result of the query:

SELECT x, COUNT(y)
FROM Arc
GROUP BY x;

Which of the following tuples is in the result?

[file:8522.jpg]


a. (4,4)

b. (4,5)

c. (4,6)

d. (4,7)

e. (4,8)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=34 (8501) Suppose the relation S(B,C,D) has tuples:

B C D
------------------------------------
a 4 6
c 6 8
c 5 5
e 9 9
F 10 10
c 7 9

Which one of the followings will appear in the result of the following query:

SELECT B, SUM(C)
FROM S
GROUP BY B

a. (c,11)

b. (c,13)

c. (c,12)

d. (c,18)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=35 (8503) Given the relation Employee(SSN, FNAME, LNAME, SALARY, DepartmentNo). Select the right query below to count the number of employees in each department.

a. SELECT COUNT(*) FROM Employee

b. SELECT DepartmentNo, COUNT(*) FROM Employee GROUP BY DepartmentNo

c. SELECT DepartmentNo, COUNT(*) FROM Employee

d. None of the others

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

QN=36 (8505) Suppose the relation S(B,C,D) has tuples:

B C D
------------------------------------
a 4 6
c 6 8
c 5 5
e 9 9
f 10 10
c 7 9

What row that appears in the result of the following query:

SELECT SUM(C), SUM(D)
FROM S
WHERE D < 9 AND D > 5

a. (10,11)

b. (10,12)

c. (10,13)

d. (10,14)

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for World Languages