DBI202 Exam |Questions with 100% Correct
Answers
What is a view? - ✔️✔️A view is a virtual table which results of executing a pre-compiled query. A
view is not a part of the physical database schema, while the regular tables are.
What structure can you implement for the database to speed up table reads? - ✔️✔️indexes
What are the drawbacks of indexes? (a)Indexes require more disk space (b) Indexes make
UPDATE, INSERT, DELETE statement slower (c)Indexes have no any drawback (d) Indexes make
SELECT statement slower - ✔️✔️(a) and (b) are true
Often, a DBMS allows us to build a single index on ____ attribute(s) (choose the most correct
answer) - ✔️✔️only one
Suppose an updatable view ParamountMovies is associated with Movies relation. Choose a
correct answer. - ✔️✔️An update on ParamountMovies is translated into Movies
Why we should use stored procedures? They allow faster execution They can reduce network
traffic They allow modular programming They can be used as a security mechanism - ✔️✔️All of
the others
Sorry, we couldn't play that audio. Try checking your language settings or send us some
feedback if this happens frequently - ✔️✔️A function has the return statement
When an entity is called "weak"? When it is used to represent weak objects, such as patients,
elders When all of its attributes can not identify itself When It always needs support from other
entity When It is not really necessary in the ERD - ✔️✔️(b) and (c) are correct
,Consider the following statement: "Entity Sets and their attributes should reflect the reality"
That above statement describes which principle? - ✔️✔️Faithfulness principle
When drawing an ERD: (a)Entity sets and their attributes should reflect reality (b)Redundancy is
not important, so we can ignore it (c) Avoid introducing more elements into the design than is
absolutely necessary (d) Choosing the right relationships - ✔️✔️(a) and (c) and (d) are correct
A weak entity - ✔️✔️does not have enough key attribute(s)
In UML, what is the difference between an aggregation and a composition? - ✔️✔️In
composition, when the owning object is destroyed, so are the contained objects. In
aggregation, this is not necessarily true.
Choose the correct statement - ✔️✔️Except for COUNT, aggregate functions ignore null values
Column A of a relation has the following list of values in the six rows of the table: NULL, NULL,
10, 10, 20, 30 In SQL Server, which of the following is the correct value of AVG(DISTINCT A)? -
✔️✔️20
What is the difference between Where and Having Clause? - ✔️✔️WHERE is for Rows and
HAVING is for Groups
What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales
GROUP BY Customer HAVING COUNT(Order) > 5 - ✔️✔️Selects all customers from table Sales
that have made more than 5 orders.
The relation R(A,B) may have duplicate tuples. Choose the query that create non-duplicated
results, regardless of what tuples R contains? - ✔️✔️SELECT A, B FROM R GROUP BY A, B
What is a "join"? - ✔️✔️'join' used to connect two or more tables
, When join R and S, we want to display all the records in R we must use: - ✔️✔️LEFT OUTER JOIN a
Given relations R(A,B) and S(B,C,D). The result of natural join of the relations R and S has -
✔️✔️Attributes A, B, C, D
In order to modify or delete an existing constraint, it is necessary that: - ✔️✔️the constraint has a
name
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