DBI202 ACTUAL EXAM QUESTIONS
WITH ALL CORRECT ANSWERS
UPDATED 2024-2025
When performing union, intersection, or difference operations on relations R and S, they
must be type compatible. That is, ______
Select one:
a. The domain of corresponding attributes of R and S must be compatible
b. The names of attributes of R and S must be the same
c. R and S must have the same number of attributes
d. R and S must have the same number of attributes and the domain of corresponding
attributes of R and S must be compatible - Answer ✔ d
Which of following statement is correct?
Select one:
a. Duplicate-elimination operator is used to convert a set to a bag
b. Duplicate-elimination operator is used to convert a bag to a set
c. None of the others
d. Duplicate-elimination operator is used to add duplicate tuple to a relation - Answer ✔
b
Consider below statements
1. In ERD, Attributes are associated only with the entity set
2. In UML, A relationship between two class can be association, composition or
aggregation
Select one:
a. false, true
b. true, true
c. false, false
d. true, false - Answer ✔ a
Which of the followings doesn't take the key's condition 'no two tuples agree on all
attributes of key'?
Select one:
a. Unique key
b. Foreign key
c. None of the others
d. Primary key - Answer ✔ b
,Suppose the theta join R3 :=R1⋈CR2, where C is a condition that refers to attributes of
R1 and R2. Which of the followings is correct?
Select one:
a. Each tuple t1 of R1 connect with some those tuple t2 of R2 that satisfy C
b. Each tuple t1 of R1 connect with one tuple t2 of R2
c. None of the others
d. Each tuple t1 of R1 connect with all those tuple t2 of R2 that satifsy C - Answer ✔ d
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 ______
Select one:
a. 1 tuple (1, 2, 10, 11)
b. 2 tuples (1, 2, 3, 4) and (5, 6, 7, 8)
c. 2 tuples (1, 2, 5, 6) and (3, 4, 7, 8)
d. 2 tuples (1, 2, 2, 5) and (3, 4, 4, 7) - Answer ✔ c
Which of the followings can be used in PSM?
Select one:
a. UPDATE ...
b. INSERT ...
c. All of the others
d. DELETE ... - Answer ✔ c
Given R(A, B, C, D, E, F) and FD's={AB→C, BC→AD, D→E, CF→B}.
What are the key of R?
Select one:
a. CF
b. AF
c. DF
d. EF - Answer ✔ a
Suppose a relation R(A,B,C,D) and a primary key constraint on both A and B attributes.
Which of followings may violate this constraint?
Select one:
a. Update an existing tuple on A component
b. Delete an existing tuple
c. All of the answers
d. Select some tuple from R - Answer ✔ a
Suppose that we try to connect to hcm-cms.fpt.edu.vn using Internet Explorer. In this
case, we are____________
Select one:
a. Database user
b. None of the others
c. Database designer
, d. Database administrator - Answer ✔ a
The responsibility of Database management system is __________
Select one:
a. Support the storage of very large amounts of data
b. Allow users to create new databases and specify their schemas
c. Give users the ability to query the data
d. All of the others - Answer ✔ d
What relational algebra is used to express a constraint that the attribute A of relation R
refers to the attribute B of relation S?
Select one:
a. pA (R) = pB(S)
b. pA (R) Í pB(S)
c.pA (R) ∩ pB(S)=0
d. pA (R) ∪ pB(S)=0 - Answer ✔ b
Suppose two relations R(A:int, B:string) and S(C:int, D:string). Which of the followings is
valid in SQL ?
Select one:
a. ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A, B IN (SELECT * FROM S));
b. ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A IN (SELECT * FROM S));
c. ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A IN (1,2,3,4,5));
d. ALTER TABLE R ADD CONSTRAINT RCHK CHECK (A IN (SELECT C FROM S)); -
Answer ✔ c
What is a constraint in relational model?
Select one:
a. define limitations on what the data can be on tables
b. define limitations on data type of columns in tables
c. define a domain integrity in tables
d. define a references integrity in tables - Answer ✔ a
Suppose the relationship between Instructors and his/her Qualifications. Which of the
followings is correct?
Select one:
a. This relationship is supporting relationship from Instructors to Qualifications
b. Qualifications is a weak entity set with supporting relationship from Instructors
c. This relationship is many-one from Qualifications to Intructors
d. All of the others - Answer ✔ d
Schema-altering commands are known as _________ commands
Select one:
a. Data Controlling Language
b. Data Definition Language
c. Data Manipulation Language