In an SQL query, which built-in function is used to total numeric columns?
A -
AVG
B -
COUNT
C -
MAX
D -
SUM
2-
In an SQL query, which built-in function is used to obtain the smallest value of numeric columns?
A -
AVG
B -
COUNT
C -
MAX
D -
MIN
3-
For the relation Supplies(Snumber,Pnumber,Qty), which of the following SQL statements corresponds
to a relational algebra project and selection operators?
A -
Select Snumber From Supplies;
B -
Select Distinct S1.Snumber From Supplies S1, Supplies S2 Where S1.Qty > S2.Qty;
C -
Select Distinct Snumber From Supplies Where Qty > 35;
D -
Select * From Supplies;
4-
Given a table with the structure: EMPLOYEE (EmpNo, Name, Salary, HireDate), which of the
following would find all employees whose name begins with the letter "S?"
A -
SELECT * FROM EMPLOYEE WHERE Name IN [S];
B -
SELECT EmpNo FROM EMPLOYEE WHERE Name LIKE S;
C -
SELECT * FROM Name WHERE EMPLOYEE LIKE S*;
D -
SELECT * FROM EMPLOYEE WHERE Name LIKE S%;
5-
In an SQL query, which SQL keyword is used with built-in functions to group together rows that have
the same value in a specified column?
A -
GROUP BY
B -
ORDER BY
C -
SORT BY
D -
DISTINCT SET
6-
Regarding the interchangeability of subqueries and joins .
A -
A join can always be used as an alternative to a subquery, and a subquery can always be used as an alternative to a join.
B -
A join can sometimes be used as an alternative to a subquery, and a subquery can sometimes be used as an alternative to a join.
C -
A join can always be used as an alternative to a subquery, and a subquery can sometimes be used as an alternative to a join.
D -
A join can sometimes be used as an alternative to a subquery, and a subquery can always be used as an alternative to a join.
7-
One advantage of using the ALTER command to define a primary is that the database designer controls
the .
A -
name of the primary key
B -
name of the foreign key
C -
name of the constraint
D -
All of these answer
8-
Which of the following is true about a key (CADIDATE KEY)?
A -
In may identify more than one row.
B -
It may be unique.
C -
It may be non-unique.
D -
All of the above
9-
Given the relations above such that each student is assigned to one advisor, which of the following is
true?
A -
AdvisorID is a foreign key.
B -
AdvisorName is a determinant.
C -
SID is both a primary key and a foreign key.
D -
Phone is a candidate key.
10-
Todat almost every commercial database is based on: