The SQL BETWEEN operator …
Specifies a range to test
None of the given
Specifies that a column is a primary key
Specifies which tables we are selecting from
SQL aggregate functions are …
MIN, MAX, AVG, COUNT, SUM
SUM, AVG, MULT, DIV, MIN
SUM, AVG, MIN, MAX, MULT
SUM, AVG, MIN, MAX, NAME
Which SQL keyword is used to specify conditional search?
HAVING
WHERE
SELECT
FIND
The AVG SQL function returns the ...
The sum of values in a column
Average in the values in a group.
Maximum value from a column.
What does follow after the SQL WHERE clause?
Selection condition
List of columns that will be selected or the * symbol
Name of the table we are selecting from
What does the SQL FROM clause do?
Specifies the tables to retrieve rows from.
Specifies a search condition
Specifies the columns we are retrieving
Which SQL keyword is used to retrieve a maximum value?
UPPER
MOST
TOP
MAX
What does follow after the SQL SELECT clause?
List of columns to be selected or the * symbol
Which SQL functions is used to count the number of rows?
COUNT ( )
NUMBER ( )
SUM ( )
COUNTOF ( )
What is the purpose of the SQL AS clause?
The AS SQL clause is used change the name of a column in the result set or to assign a name to a derived column
The AS clause is used with the JOIN clause only
The AS clause defines a search condition
All of the mentioned
Which SQL statement is used to extract data from a database?
OPEN
GET
EXTRACT
Which SQL statement is used to return only different (unique) values?
SELECT DIFFERENT
SELECT UNIQUE
SELECT DISTINCT
SELECT *
Which SQL keyword is used to sort the result set?
ORDER BY
FILTER
SORT BY
SORT
If you want to apply a second condition to your statement where both statements must be true, what keyword would you use between the conditions?
AND
BOTH
TRUE
What keyword would you use to group your results by a column's values?
GROUP BY
BY
JOIN
What keyword can you use to search for a string in a column?
FIND STRING
HAS STRING
CONTAINS STRING
LIKE
Which of the following is the correct order of keywords for SQL SELECT statements?
SELECT, FROM, WHERE
FROM, WHERE, SELECT
WHERE, FROM, SELECT
SELECT, WHERE, FROM
A subquery in an SQL SELECT statement is enclosed in …
parenthesis -- (...).
brackets -- [...].
CAPITAL LETTERS.
braces -- {...}.
The result of an SQL SELECT statement is a(n) ________ .
report
form
file
table
In an SQL SELECT statement querying a single table, the asterisk (*) means that …
all columns of the table are to be returned
all records meeting the full criteria are to be returned
all records with even partial criteria met are to be returned
None of the above is correct
The HAVING clause does which of the following?
Acts EXACTLY like a WHERE clause
Acts like a WHERE clause but is used for columns rather than groups
Acts like a WHERE clause but is used for groups rather than rows
Acts like a WHERE clause but is used for rows rather than columns
LIKE operator uses ___ and ___ .
asterisk (*) ; percent sign (%)
question mark (?) ; asterisk (*)
percent sign (%) ; underscore ( _ )
underscore ( _ ) ; question mark (?)
What SQL structure is used to limit column values of a table?
The LIMIT constraint
The CHECK constraint
The VALUE constraint
What operator tests column for the absence of data?
NOT operator
IS NULL operator
EXISTS operator
All of the above
What is the meaning of LIKE '%0%0%' ?
Feature has two 0's in it, at any position
Feature begins with two 0's
Feature has more than two 0's
Feature ends with two 0's
The _______ operator returns all tuples in one relation that are not found in the other relation.
Select
None
Intersect
Difference
What is meant by the following relational algebra statement: STUDENT X GROUP ?
Compute the left outer join between the STUDENT and GROUP relations
Compute the full outer join between the STUDENT and GROUP relations
Compute the cartesian product between the STUDENT and GROUP relations
Compute the right outer join between the STUDENT and GROUP relations
What is meant by the term union compatibility?
When two or more tables share the same (or compatible) domains
When two or more tables share the same number of columns and when they share the same domains
When two or more tables share the same number of columns
Which of the following is used to denote the selection operation in relational algebra?
Pi (Greek)
Sigma (Greek)
Lambda (Greek)
Omega (Greek)
Which product is returned in a join query have no join condition?
Equijoins
Both
Cartesian
The ____________ operator combines all tuples from two relations excluding duplicates.
Union
Divide
Which of the following is used to denote the projection operation in relational algebra?
_______ specifies a search condition for a group or an aggregate function.
GROUP BY clause
HAVING clause
FROM clause
WHERE clause
The command to remove rows from CUSTOMER table is …
DROP FROM CUSTOMER ...
UPDATE FROM CUSTOMER ...
REMOVE FROM CUSTOMER ...
DELETE FROM CUSTOMER WHERE ...
DML is used to …
manipulate the structure of database applications
add and delete tables
add / modify / delete data in the database
specify the structure of a database
Identify the characteristic(s) of transactions
Atomicity
Durability
Isolation
The ______ statement is used to end a successful transaction.
COMMIT TRANSACTION
ROLLBACK TRANSACTION
COMMIT WORK
DCL stands for …
Data Control Language
Data Console Language
Data Console Level
Data Control Level
Types of update anomalies are … (NF)
ц
у
Types of functional dependencies are …(NF)
w
2
TCL stands for …
Transaction control language
Transaction command language
Transaction connect language
UNIQUE constraint allows to create .. (NF)
4
5
Types of JOIN statement are ... (NF)
INNER JOIN
OUTER JOIN (LEFT, RIGHT, FULL JOIN)
CROSS JOIN
The statement to create a new user is …
The column of a table is referred to as the …
Entity
Degree
Tuple
Attribute
The another name for a row is …
A primary key for an entity is
A relationship
A tuple
A unique attribute
Any attribute
In ER Diagram by Chen’s notation a relationship type is represented by …
Diamond (rhombus)
Rectangle
Ellipse
Dashed ellipse
Key to represent relationship between tables is called :
Primary Key
Foreign Key
Secondary Key
None of these
An entity relationship diagram is a tool to represent … (NF)
?
3
The FD X -> Y is a full dependency in a relation R, if there is _____ attribute A that can be _____ X and the dependency still holds.
No, removed from
At least one, removed from
At least one, added to
No, added to
Through normalization, data redundancy …
can be eliminated
can be maximized
can be minimized, but not eliminated
are usually left unchanged
Through normalization, update anomalies …
Can be eliminated
Can be maximized
Are usually unchanged
Can be minimized, but not eliminated
For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____.
a primary key, a foreign key
a non-primary key, a foreign key
a non-primary key, the primary key
a primary key, a non-primary key
For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____.
every non-primary key, the primary key
every alternate key, the primary key
every non-key, every key
every non-key, at least one key
Which normal form is considered “good” for relational database design?
3NF
2NF
1NF
4NF
A relation in which the intersection of each row and column contains one and only one value is said to be in
Table is synonymous with the term …
Record
Column
Field
Relation
If a relation scheme is in 3NF then it is also in …
5NF
A functional dependency is a relationship between or among:
Tables
Relations
Rows
Attributes
In an ER diagram an entity is represented by a …
Circle
Diamond box
In an ER diagram by Chen’s notation attributes are represented by …
Square
Triangle
Who proposed the relational model?
Bill Gates
Charles Babbage
E. F. Codd
Herman Hollerith
Phases of a database development are …
Logical Design
Conceptual Design
Physical Design
All of these
A goal of normalization is …
Minimize the number of relationships
Minimize the number of tables
Minimize the number of entities
Minimize the number of redundancy
A table in 1NF in which the unique candidate key consists of two of its three attributes:
Always violates 2NF
Never violates 2NF
May violate 2NF
None of the above
Database is a collection of … (NF)
DBMS stands for …
Database Administrator System
Database Basic Management System
Database Management System
Normalization is ...
the process of adding primary key to a table
the process of arranging information stored in a database in a way, which redundancy and ambiguity
a special way of selecting data
none of these
What does SQL stand for?
Standard Query Language
Structured Query Language
Strict Query Language
Strong Query Language
Which language is used to specify database structure?
Data Manipulation Language
Data Management Language
Data Definition Language
Data Development Language
The statement in SQL which allows to change the structure of a table is …
ALTER
CREATE
UPDATE
The SQL DROP TABLE clause is used to ...
create a new table in the database
modify an existing table in a database
delete a table from the database
Determine the primary key by description of the table: Students (stud_id, lname, fname, bdate)
stud_id
lname
fname
bdate
Determine the type of the relationship between Students and Groups entities by its description: “One student can be enrolled only in one group, and from the other side one group contains many students” (NF)
One-to-One
One-to-Many
Many-to-Many