DBI202 Practice Questions with 100% Correct
Answers
c
Which of the following statements is not DML?
Select one:
a. SELECT
b. DELETE
c. CREATE
d. UPDATE
c
To convert a many - many relationship R from entity set E to entity set F, we must
__________
Select one:
a. Create two relations for E and F entity sets perspectively, and create one relation more for
relationship R by adding all attributes of relationship R if there is any
b. Create two relations for E and F entity sets perspectively, and add the key attributes of F to
E
c. Create two relations for E and F entity sets perspectively, and create one relation more for
relationship R by adding the key attributes of E and F, and the other attributes of relationship
R
d. Create two relations for E and F entity sets perspectively, and add the key attributes of E to
F
b
,Choose a right statement about high level design.
Select one:
a. high level design is process of constructing a model of information used in an enterprise
based on a specific data model, but independent of a particular DBMS or other physical
considerations
b. High-level design describes exactly the information needs of the business
c. high level design is process translating the logical description of the data into technical
specifications for storing and retrieving data
b
The degree of a relationship is ______
Select one:
a. The number of binary relationships
b. The number of entities involved with the relationship
c. The number of attributes in a relation
d. The number of tuples in a relation
c
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. true, true
b. false, false
c. false, true
d. true, false
,a
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. DF
c. EF
d. AF
a
Suppose a relation R(A,B,C) with three numeric attributes. There is a tuple-based constraint,
where C is equal to A+B. Which of the followings doesn't violate this constraint?
Select one:
a. Delete an existing tuple from R
b. None of the others
c. Insert new tuple into R
d. Update an existing tuple in R
c
What will be returned when the following SQL statement is executed?Select empSSN,
count(*) as num_projecsFrom tblWorksOnGroup By empSSN;
Select one:
a. None of the others
b. A list of all employees, sorted by empSSN
, c. A list of each employees as well as a number of projects that he or she has joined
d. A count of all of the projects by all employees
c
Suppose a relation R(A,B) has 5 tuples (1,2), (1,3), (3,2), (3,4), (4,2). A result of γ A ,
AVG(B) -> AVG_B(R) is __________
Select one:
a. A relation has 3 tuples (1,2), (3,2), (4,2)
b. A relation has 3 tuples (1,5), (3,6), (4,2)
c. A relation has 3 tuples (1,2.5), (3,3), (4,2)
d. A relation has 3 tuples (1,2), (3,2), (4,1)
d
Consider the below picture.
What is a right statement?
Select one:
a. It is a composition relationship
b. It is a aggregation relationship
c. It is a self-association relationship
d. It is a association relationship
c
suppose that only accept price from 1 to 100 in relation Product( Id, name, price). What
relation algebra is used to express this constraint?
Select one:
a. sprice>=1AND price<=100 (Product)=Æ
Answers
c
Which of the following statements is not DML?
Select one:
a. SELECT
b. DELETE
c. CREATE
d. UPDATE
c
To convert a many - many relationship R from entity set E to entity set F, we must
__________
Select one:
a. Create two relations for E and F entity sets perspectively, and create one relation more for
relationship R by adding all attributes of relationship R if there is any
b. Create two relations for E and F entity sets perspectively, and add the key attributes of F to
E
c. Create two relations for E and F entity sets perspectively, and create one relation more for
relationship R by adding the key attributes of E and F, and the other attributes of relationship
R
d. Create two relations for E and F entity sets perspectively, and add the key attributes of E to
F
b
,Choose a right statement about high level design.
Select one:
a. high level design is process of constructing a model of information used in an enterprise
based on a specific data model, but independent of a particular DBMS or other physical
considerations
b. High-level design describes exactly the information needs of the business
c. high level design is process translating the logical description of the data into technical
specifications for storing and retrieving data
b
The degree of a relationship is ______
Select one:
a. The number of binary relationships
b. The number of entities involved with the relationship
c. The number of attributes in a relation
d. The number of tuples in a relation
c
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. true, true
b. false, false
c. false, true
d. true, false
,a
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. DF
c. EF
d. AF
a
Suppose a relation R(A,B,C) with three numeric attributes. There is a tuple-based constraint,
where C is equal to A+B. Which of the followings doesn't violate this constraint?
Select one:
a. Delete an existing tuple from R
b. None of the others
c. Insert new tuple into R
d. Update an existing tuple in R
c
What will be returned when the following SQL statement is executed?Select empSSN,
count(*) as num_projecsFrom tblWorksOnGroup By empSSN;
Select one:
a. None of the others
b. A list of all employees, sorted by empSSN
, c. A list of each employees as well as a number of projects that he or she has joined
d. A count of all of the projects by all employees
c
Suppose a relation R(A,B) has 5 tuples (1,2), (1,3), (3,2), (3,4), (4,2). A result of γ A ,
AVG(B) -> AVG_B(R) is __________
Select one:
a. A relation has 3 tuples (1,2), (3,2), (4,2)
b. A relation has 3 tuples (1,5), (3,6), (4,2)
c. A relation has 3 tuples (1,2.5), (3,3), (4,2)
d. A relation has 3 tuples (1,2), (3,2), (4,1)
d
Consider the below picture.
What is a right statement?
Select one:
a. It is a composition relationship
b. It is a aggregation relationship
c. It is a self-association relationship
d. It is a association relationship
c
suppose that only accept price from 1 to 100 in relation Product( Id, name, price). What
relation algebra is used to express this constraint?
Select one:
a. sprice>=1AND price<=100 (Product)=Æ