DBI 202 Exam |Questions with 100% Correct
Answers
Relation R(x,y) currently consists of only one tuple (NULL, NULL). Which of the following queries
will produce a nonempty output? That is, at least one tuple will be produced, although the
tuple(s) may have NULL's. - ✔️✔️SELECT * FROM R WHERE x IS NULL
What operator tests column for the absence of data? - ✔️✔️IS NULL operator
Choose one correct statement: Two null values are equal Comparisons between two null
values, or between a NULL and any other value, return unknown Comparisons between two
null values, or between a NULL and any other value, return FALSE - ✔️✔️----and any other value,
return unknown
A database transaction, by definition, must be ACID (atomic, consistent, isolated and durable).
What does "Durable" mean? - ✔️✔️"Durable" means that: Transactions that have committed will
survive permanently
A database transaction, by definition, must be ACID (atomic, consistent, isolated and durable).
What does "Isolated" mean? - ✔️✔️"Isolated" means that: how/when the changes made by one
operation in one transaction become visible to other concurrent operations in other
transactions
Choose the in-correct statement: In SQL Server, every DML operation is a transaction regardless
of whether it has a BEGIN TRANSACTION or not COMMITTING a transaction makes permanent
the changes resulting from all SQL statements in the transaction ROLLING back a transaction
rejects any of the changes resulting from the SQL statements in the transaction When the
sequence of tasks is complete, the SAVE POINT closes the transaction - ✔️✔️When the sequence
of tasks is complete, the SAVE POINT closes the transaction
In order to modify or delete an existing constraint, it is necessary that: - ✔️✔️the constraint has a
name
,x <= 100 AND NOT(y >= 15 OR z = 35) have the truth value UNKNOWN? - ✔️✔️x = NULL, y = 0, z =
4.
The IN SQL keyword - ✔️✔️Determines if a value
A ____ is a logically coherent collection of data with some inherent meaning, representing
some aspect of real world and being designed, built and populated with data for a specific
purpose - ✔️✔️Database
Which of following is never used as a data model? - ✔️✔️None of the others
A ___ is a notation for describing the structure of the data in a database, along with the
constraints on that data - ✔️✔️data model
Which statement is used to remove a relation named R - ✔️✔️DROP TABLE R
Given a relation R(A,B,C,D). Which of the followings is trivial? - ✔️✔️A-->BCD
Let R(ABCD) be a relation with functional dependencies {A -> B, C -> B, B -> D}What is the key
for R (choose one) - ✔️✔️AC
The relation R(ABCD) has following FDs:{ A -> B ; B -> A ; A -> D ; D -> B } - ✔️✔️R is in 3NF
What is the difference between the 2NF and the 3NF? - ✔️✔️2NF deals with partial functional
dependency, while 3NF deals with transitive functional dependency
The key for a weak entity set E is - ✔️✔️Zero or more attributes of E and key attributes from
supporting entity sets
,A class in UML is similar to - ✔️✔️An entity set in E/R model
An association class in UML is similar to ______ in the ER model - ✔️✔️attributes on a
relationship
Which of the following is NOT a standard aggregation operator? - ✔️✔️GROUP
T intersect(R union S) = (T intersect R) union (T intersect S)The above law still hold for bag
relations? - ✔️✔️False
Choose the correct statement: Aggregate functions perform a calculation on a set of values and
return a single value. Aggregate functions perform a calculation on a single value and return a
single value - ✔️✔️Aggregate functions perform a calculation on a set of values and return a
single value
SELECT SUM(D) FROM S WHERE D < 8 AND D > 5:a 4 6, c 6 8, c 5 5, e 9 9, F 10 10,c 7 9 - ✔️✔️6
(1,2), (1,2), (2,3), (3,4), (3,4), (4,1), (4,1), (4,1), (4,2) : SELECT a1.x, a2.y, COUNT(*) FROM Arc a1,
Arc a2 WHERE a1.y = a2.x GROUP BY a1.x, a2.y; - ✔️✔️(3,1,2)
A B : 10 x, 30 y, 50 z, 70t, B C D:x 40 60,z 60 80,z 50 50,z 70 90 - ✔️✔️(30,y) (70,t)
does the Boolean expression x <= 4 OR NOT(y >= 2 AND z = 10)have the truth value FALSE? -
✔️✔️x = 5, y = 3, z = 10
SELECT 'Nancy' + NULL + 'Smith' - ✔️✔️NULL
, Granularity: the size of the lock- Granularity: the type of the lock-Mode: the type of the lock-
Duration: the time in seconds that the DBMS waits for a lock to be released - ✔️✔️(a) and (c) and
(d) are true
What is the difference between the WHERE and HAVING SQL clauses? - ✔️✔️The WHERE SQL
clause condition(s) is applied to all rows in the result set before the HAVING clause is applied (if
present). The HAVING clause is used only with SELECT SQL statements and specifies a search
condition for an aggregate or a group
R is the parent of S.And the relationship between R and S is set to "ON DELETE CASCADE" -
✔️✔️We can delete a row from R although that row has children in S (and in this case, all the
children will be deleted too)
To create a DEFAULT constraint on the "City" column of the table PERSON which is already
created, use the following SQL - ✔️✔️ALTER TABLE Person ALTER COLUMN City SET DEFAULT
'SANDNES'
a)Entity integrity(b) Domain integrity(c) Referential integrity(d) Primary key integrity - ✔️✔️(a)
and (b) and (c) are true
A(an) _____ asserts that a value appearing in one relation must also appear in the primary-key
component(s) of another relation - ✔️✔️Foreign key constraint
A/An _____ is a data structure that makes it efficient to find those tuples that have a fixed value
for an attribute - ✔️✔️Index
An index is a data structure used to speed access to tuples of a relation,given values of one or
more attributes. The key for index can be any attribute or set of attributes, and need not be the
key of the relation - ✔️✔️All of the others.
A database of _____ data model is a collection of nodes, each node is either a leaf or interior -
✔️✔️semi-structured