DBI202 PRACTICE EXAM
QUESTIONS AND
ANSWERS ALL CORRECT
Which of the following is considered disadvantage of triggers?
a. Triggers run every time the database fields are
Inserted/updated/deleted, so it adds overhead to system.
b. Triggers execute invisible to client application. It is called by the database server
automatically, not by the client application or user.
c. All of the others
d. Unlike stored procedure, parameters cannot be used with triggers. - Answer ✔ B
The degree of a relationship is ______
a. The number of binary relationships
b. The number of attributes in a relation
c. The number of entities involved with the relationship
d. The number of tuples in a relation - Answer ✔ C
When performing union, intersection, or difference operations on
Relations r and s, they must be type compatible. That is, ______
a. R and s must have the same number of attributes
b. R and s must have the same number of attributes and the domain of corresponding
attributes of r and s must be compatible
c. The domain of corresponding attributes of r and s must be compatible
d. The names of attributes of r and s must be the same - Answer ✔ B
Which of the following expression is equivalent to the intersection of r
And s:
a. R - s
b. R - (s - r)
c. R - (r - s)
d. S - (r - s) - Answer ✔ C
Choose the wrong statement
, a. We should start the high level database design (for example, er diagram in
conceptual design) after getting user requirements.
b. All of the others
c. The high level database design (for example, er diagram in Conceptual design)
depends on dbms selection
d. The high level database design (for example, er diagram in Conceptual design) is
independent of dbms selection. - Answer ✔ A
Which of the followings is incorrect?
a. In odl, an attribute is represented in the class declaration
b. In odl, attributes are only integers and strings
c. None of the others
d. In odl, a simplest kind of property is attribute - Answer ✔ B
With sql, how can you insert "trinh" as the "lastname" in the "persons" Table?
a. None of the others
b. Insert into persons ('trinh') into lastname
c. Insert ('trinh') into persons (lastname)
d. Insert into persons (lastname) values ('trinh') - Answer ✔ D
Consider a relation with schema r(a, b, c, d, e) and the set of fds: bc-> d, d -> a, a -> b.
Find one key of r.
a. Bc
b. Ab
c. None of the others
d. Bd - Answer ✔ C
We should avoid redundancy when designing database because _____
a. We may encounter deletion anomalies
b. All of the others
c. We may encounter update anomalies
d. It wastes spaces - Answer ✔ A
___________ is a language to access and manipulate data from a database. Even non-
programmers can use it to
Retrieve and update data.
Choose one Answer:.
a. Php
b. Odbc
, c. Structured query language
d. Asp - Answer ✔ C
Which statement is true?
a. Xml documents must have a root tag
b. All of the others
c. Xml tags are case sensitive
d. Xml elements must be properly nested - Answer ✔ B
In a typical olap application, there is a central relation or collection
Of data, called ______
a. The fact table
b. All of the others
c. The dimension table
d. The star table - Answer ✔ A
There is a way of describing xml data, how?
a. Xml uses a dtd to describe the data
b. All of the others
c. Xml uses a description node to describe data
d. Xml uses xsl to describe data - Answer ✔ A
Given relation r(a,b) that has 2 tuples (1, 2) and (3, 4); relation s(b,
C, d) has 3 tuples (2, 5, 6), (4, 7, 8) and (9, 10, 11). The natural
Join of r and s has ______
a. 2 tuples (1, 2, 5, 6) and (3, 4, 7, 8)
b. 1 tuple (1, 2, 10, 11)
c. 2 tuples (1, 2, 2, 5) and (3, 4, 4, 7)
d. 2 tuples (1, 2, 3, 4) and (5, 6, 7, 8) - Answer ✔ A
Suppose a schema of relation supplierproduct is supplierproduct(no,
Supplierid, producttype) where no is a identifier, supplierid is an
Identifer of each supplier, and productype is a type of product which
This supplier provides. What will be returned when the following sql
Statement is executed?
Select supplierid from supplierproduct
Group by supplierid having count (*) in
(select count (distinct producttype) from supplierproduct);
a. A listing of supplierids, which provide all product types