Question 1
Question
The SQL BETWEEN operator …
Answer
-
Specifies a range to test
-
None of the given
-
Specifies that a column is a primary key
-
Specifies which tables we are selecting from
Question 2
Question
SQL aggregate functions are …
Answer
-
MIN, MAX, AVG, COUNT, SUM
-
SUM, AVG, MULT, DIV, MIN
-
SUM, AVG, MIN, MAX, MULT
-
SUM, AVG, MIN, MAX, NAME
Question 3
Question
Which SQL keyword is used to specify conditional search?
Question 4
Question
The AVG SQL function returns the ...
Answer
-
The sum of values in a column
-
Average in the values in a group.
-
Maximum value from a column.
Question 5
Question
What does follow after the SQL WHERE clause?
Question 6
Question
What does the SQL FROM clause do?
Answer
-
Specifies the tables to retrieve rows from.
-
Specifies a search condition
-
None of the given
-
Specifies the columns we are retrieving
Question 7
Question
Which SQL keyword is used to retrieve a maximum value?
Question 8
Question
What does follow after the SQL SELECT clause?
Question 9
Question
Which SQL functions is used to count the number of rows?
Answer
-
COUNT ( )
-
NUMBER ( )
-
SUM ( )
-
COUNTOF ( )
Question 10
Question
What is the purpose of the SQL AS clause?
Answer
-
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
Question 11
Question
Which SQL statement is used to extract data from a database?
Question 12
Question
Which SQL statement is used to return only different (unique) values?
Answer
-
SELECT DIFFERENT
-
SELECT UNIQUE
-
SELECT DISTINCT
-
SELECT *
Question 13
Question
Which SQL keyword is used to sort the result set?
Answer
-
ORDER BY
-
FILTER
-
SORT BY
-
SORT
Question 14
Question
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?
Question 15
Question
What keyword would you use to group your results by a column's values?
Answer
-
ORDER BY
-
GROUP BY
-
BY
-
JOIN
Question 16
Question
What keyword can you use to search for a string in a column?
Answer
-
FIND STRING
-
HAS STRING
-
CONTAINS STRING
-
LIKE
Question 17
Question
Which of the following is the correct order of keywords for SQL SELECT statements?
Answer
-
SELECT, FROM, WHERE
-
FROM, WHERE, SELECT
-
WHERE, FROM, SELECT
-
SELECT, WHERE, FROM
Question 18
Question
A subquery in an SQL SELECT statement is enclosed in …
Answer
-
parenthesis -- (...).
-
brackets -- [...].
-
CAPITAL LETTERS.
-
braces -- {...}.
Question 19
Question
The result of an SQL SELECT statement is a(n) ________ .
Question 20
Question
In an SQL SELECT statement querying a single table, the asterisk (*) means that …
Answer
-
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
Question 21
Question
The HAVING clause does which of the following?
Answer
-
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
Question 22
Question
LIKE operator uses ___ and ___ .
Answer
-
asterisk (*) ; percent sign (%)
-
question mark (?) ; asterisk (*)
-
percent sign (%) ; underscore ( _ )
-
underscore ( _ ) ; question mark (?)
Question 23
Question
What SQL structure is used to limit column values of a table?
Question 24
Question
What operator tests column for the absence of data?
Answer
-
NOT operator
-
IS NULL operator
-
EXISTS operator
-
All of the above
Question 25
Question
What is the meaning of LIKE '%0%0%' ?
Answer
-
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
Question 26
Question
The _______ operator returns all tuples in one relation that are not found in the other relation.
Answer
-
Select
-
None
-
Intersect
-
Difference
Question 27
Question
What is meant by the following relational algebra statement: STUDENT X GROUP ?
Answer
-
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
Question 28
Question
What is meant by the term union compatibility?
Answer
-
None
-
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
Question 29
Question
Which of the following is used to denote the selection operation in relational algebra?
Answer
-
Pi (Greek)
-
Sigma (Greek)
-
Lambda (Greek)
-
Omega (Greek)
Question 30
Question
Which product is returned in a join query have no join condition?
Answer
-
None
-
Equijoins
-
Both
-
Cartesian
Question 31
Question
The ____________ operator combines all tuples from two relations excluding duplicates.
Answer
-
Intersect
-
Difference
-
Union
-
Divide
Question 32
Question
Which of the following is used to denote the projection operation in relational algebra?
Answer
-
Pi (Greek)
-
Sigma (Greek)
-
Lambda (Greek)
-
Omega (Greek)
Question 33
Question
_______ specifies a search condition for a group or an aggregate function.
Answer
-
GROUP BY clause
-
HAVING clause
-
FROM clause
-
WHERE clause
Question 34
Question
The command to remove rows from CUSTOMER table is …
Question 35
Question
DML is used to …
Answer
-
manipulate the structure of database applications
-
add and delete tables
-
add / modify / delete data in the database
-
specify the structure of a database
Question 36
Question
Identify the characteristic(s) of transactions
Answer
-
Atomicity
-
Durability
-
Isolation
-
All of the mentioned
Question 37
Question
The ______ statement is used to end a successful transaction.
Answer
-
COMMIT TRANSACTION
-
ROLLBACK TRANSACTION
-
COMMIT WORK
-
All of the mentioned
Question 38
Question
DCL stands for …
Answer
-
Data Control Language
-
Data Console Language
-
Data Console Level
-
Data Control Level
Question 39
Question
Types of update anomalies are …
Answer
-
Modification, insertion, deletion
-
Random answer (do not click on this button)
Question 40
Question
Types of functional dependencies are …
Answer
-
Full, partial, transitive
-
Random answer (do not click for the God's sake)
Question 41
Question
TCL stands for …
Answer
-
Transaction control language
-
Transaction command language
-
Transaction connect language
-
None of the given
Question 42
Question
UNIQUE constraint allows to create ..
Question 43
Question
Types of JOIN statement are ... (NF)
Question 44
Question
The statement to create a new user is …
Question 45
Question
The column of a table is referred to as the …
Answer
-
Entity
-
Degree
-
Tuple
-
Attribute
Question 46
Question
The another name for a row is …
Answer
-
Attribute
-
Tuple
-
Degree
-
Entity
Question 47
Question
A primary key for an entity is
Answer
-
A relationship
-
A tuple
-
A unique attribute
-
Any attribute
Question 48
Question
In ER Diagram by Chen’s notation a relationship type is represented by …
Answer
-
Diamond (rhombus)
-
Rectangle
-
Ellipse
-
Dashed ellipse
Question 49
Question
Key to represent relationship between tables is called :
Answer
-
Primary Key
-
Foreign Key
-
Secondary Key
-
None of these
Question 50
Question
An entity relationship diagram is a tool to represent …
Question 51
Question
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.
Question 52
Question
Through normalization, data redundancy …
Question 53
Question
Through normalization, update anomalies …
Question 54
Question
For a relation to be in 3NF, it should not contain _____ attribute that is transitively dependent on _____.
Answer
-
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
Question 55
Question
For a relation to be in 2NF, _____ attribute must be fully functionally dependent on _____.
Answer
-
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
Question 56
Question
Which normal form is considered “good” for relational database design?
Question 57
Question
A relation in which the intersection of each row and column contains one and only one value is said to be in
Question 58
Question
Table is synonymous with the term …
Answer
-
Record
-
Column
-
Field
-
Relation
Question 59
Question
If a relation scheme is in 3NF then it is also in …
Answer
-
2NF
-
4NF
-
5NF
-
None of these
Question 60
Question
A functional dependency is a relationship between or among:
Answer
-
Tables
-
Relations
-
Rows
-
Attributes
Question 61
Question
In an ER diagram an entity is represented by a …
Answer
-
Rectangle
-
Ellipse
-
Circle
-
Diamond box
Question 62
Question
In an ER diagram by Chen’s notation attributes are represented by …
Answer
-
Rectangle
-
Square
-
Ellipse
-
Triangle
Question 63
Question
Who proposed the relational model?
Answer
-
Bill Gates
-
Charles Babbage
-
E. F. Codd
-
Herman Hollerith
Question 64
Question
Phases of a database development are …
Answer
-
Logical Design
-
Conceptual Design
-
Physical Design
-
All of these
Question 65
Question
A goal of normalization is …
Answer
-
Minimize the number of relationships
-
Minimize the number of tables
-
Minimize the number of entities
-
Minimize the number of redundancy
-
None of these
Question 66
Question
A table in 1NF in which the unique candidate key consists of two of its three attributes:
Answer
-
Always violates 2NF
-
Never violates 2NF
-
May violate 2NF
-
None of the above
Question 67
Question
Database is a collection of …
Question 68
Question
DBMS stands for …
Answer
-
None of these
-
Database Administrator System
-
Database Basic Management System
-
Database Management System
Question 69
Question
Normalization is ...
Answer
-
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
Question 70
Question
What does SQL stand for?
Question 71
Question
Which language is used to specify database structure?
Question 72
Question
The statement in SQL which allows to change the structure of a table is …
Answer
-
SELECT
-
ALTER
-
CREATE
-
UPDATE
Question 73
Question
The SQL DROP TABLE clause is used to ...
Answer
-
create a new table in the database
-
modify an existing table in a database
-
delete a table from the database
-
none of these
Question 74
Question
Determine the primary key by description of the table: Students (stud_id, lname, fname, bdate)
Answer
-
stud_id
-
lname
-
fname
-
bdate
Question 75
Question
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)
Answer
-
One-to-One
-
One-to-Many
-
Many-to-Many
-
None of these
Question 76
Question
What does the CREATE TABLE statement do?
Question 77
Question
According to the next scenario try to identify 1 possible attribute: «A student has a large collection of music. Her music is stored in DVDs, CDs, Tapes, and Memory Sticks etc. All the various media in which music is stored is organized in a (physical) library. The library itself is organized into numbered columns and named shelves. The database should capture details of albums, songs, artists, production studios, prices and awards received, etc.»
Answer
-
Artist
-
Price
-
Songs
-
Albums
Question 78
Question
According to the next scenario try to identify 1 possible attribute: «A student has a large collection of music. Her music is stored in DVDs, CDs, Tapes, and Memory Sticks etc. All the various media in which music is stored is organized in a (physical) library. The library itself is organized into numbered columns and named shelves. The database should capture details of albums, songs, artists, production studios, prices and awards received, etc.»
Answer
-
Student
-
Albums
-
Memory
-
DVD
Question 79
Question
4. According to the next scenario, which one of the given options is a possible M-to-M relationship between two entities: “A vehicles repair garage can handle vehicles of multiple types (e.g. cars, vans, trucks, etc). For billing purposes, the garage must record all details about a vehicle (e.g. registration, colour, number of wheel-axis, MOT, etc). Customers bring their vehicles to the garage and leave it there for repair. Once the repairs are done in different departments (e.g. paint, chassis integrity, electrics and electronics, engine, etc). Individual mechanics operate within one speciality only. The garage manager keeps track of which mechanic works on which vehicle, because an employee salary depends on his/her basic salary plus an additional for each vehicle he/she repairs. Thus, the manager is interested in building a database that would allow him to calculate employees’ salaries based on the difficulty and number of the repairs done to vehicles. Recurring customers have preferred mechanics and this should also be reflected in the database”.
Answer
-
Vehicles M-to-M Customers
-
Mechanics M-to-M Department
-
Customers M-to-M Mechanics
-
Garage M-to-M Vehicles
Question 80
Question
Which of the following statements concerning normal forms is true?
Answer
-
Each normal form contains a state of independent properties, unrelated to other normal forms
-
The lower the normal form number, the better the schema design is
-
A relation that is in second normal form is also in first normal form
-
Schemes that are in second normal form are considered the best
Question 81
Question
«The use of null values in tuples» is a property of good relational schemas.
Question 82
Question
The elimination of data redundancy to avoid update anomalies» is a property of good relational schemas.
Question 83
Question
The grouping of as many attributes as possible into one main table» is a property of good relational schemas
Question 84
Question
Which of the following is not a phase of database development?
Answer
-
Physical Design
-
Logical Design
-
Conceptual Design
-
DBMS Selection
Question 85
Question
Which of the following is not a DDL statement?
Question 86
Question
Which of the following is not a SQL database manipulation statement?
Answer
-
SELECT
-
DELETE
-
UPDATE
-
CREATE TABLE
Question 87
Question
Which of the following is not a SQL database manipulation statement?
Answer
-
SELECT
-
UPDATE
-
DELETE
-
ALTER TABLE
Question 88
Question
Which one of the following sorts rows in SQL?
Answer
-
ORDER BY
-
GROUP BY
-
ALIGN BY
-
SORT BY
Question 89
Question
Find all cities with temperature, condition and humidity whose humidity is in the range of 63 to 79
Answer
-
SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79;
-
SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79;
-
SELECT * FROM weather WHERE humidity = 63 to 79;
-
SELECT * FROM weather WHERE humidity = 63 AND 79;
Question 90
Question
With SQL, how can you return the number of records in the ‘Persons’ table?
Answer
-
SELECT COLUMNS (*) FROM Persons;
-
SELECT COUNT( ) FROM Persons;
-
SELECT COLUMNS ( ) FROM Persons;
-
SELECT COUNT(*) FROM Persons;
Question 91
Question
With SQL, how do you select all the records from a table named «Persons», where the value of the column «FirstName» is «Peter»?
Answer
-
SELECT * FROM Persons WHERE FirstName = ‘Peter’;
-
SELECT [all] FROM Persons WHERE FirstName = ‘Peter’;
-
SELECT [all] FROM Persons WHERE FirstName LIKE ‘Peter’;
-
SELECT * FROM Persons WHERE FirstName <> ‘Peter’;
Question 92
Question
With SQL, how do you select all the records from a table named «Persons», where the «FirstName» is «Peter» and the «LastName» is «Jackson»?
Answer
-
SELECT * FROM Persons WHERE LastName = ‘Jackson’;
-
SELECT FirstName = ‘Peter’, LastName = ‘Jackson’ FROM Persons;
-
SELECT * FROM Persons WHERE FirstName <> ‘Peter’ AND LastName <> ‘Jackson’;
-
SELECT * FROM Persons WHERE FirstName = ‘Peter’ AND LastName = ‘Jackson’;
Question 93
Question
With SQL, how can you return all the records from a table named «Persons» sorted descending by «FirstName»?
Answer
-
SELECT * FROM Persons ORDER BY FirstName DESC;
-
SELECT * FROM Persons SORT BY ‘FirstName’ DESC;
-
SELECT * FROM Persons ORDER FirstName DESC;
-
SELECT * FROM Persons SORT ‘FirstName’ DESC;
Question 94
Question
With SQL, how do you select all the columns from a table named «Persons»?
Question 95
Question
How to select all data from student table starting the name from letter ‘r’?
Answer
-
SELECT * FROM student WHERE name LIKE ‘%r%’;
-
SELECT * FROM student WHERE name LIKE ‘%r’;
-
SELECT * FROM student WHERE name LIKE ‘r%’;
-
SELECT * FROM student WHERE name LIKE ‘_r%’;
Question 96
Question
Which of the SQL statements is correct?
Answer
-
SELECT Username AND Password FROM Users
-
SELECT Username, Password WHERE Username = ‘user1’
-
SELECT Username, Password FROM Users
-
None of the given
Question 97
Question
Which of the following SQL statements deletes all rows in table called SalesData?
Answer
-
DELETE SalesData
-
DELETE * FROM SalesData
-
DELETE FROM SalesData
-
DELETE ALL SalesData
Question 98
Question
Which of the following SQL statements will select all records with all their columns from a table called Sales?
Question 99
Question
What will be the result of the following SQL statement SELECT * FROM Table1 HAVING Column1 > 10?
Answer
-
The result will be all rows from Table1 which have Column1 values greater than 10.
-
The result will be empty data set.
-
The SQL statement will generate an error.
-
None of the given
Question 100
Question
Which of the following is NOT a relational algebra operators used in basic queries?
Answer
-
Select
-
Locate
-
Project
-
Join
Question 101
Question
What is the keyword you would use before adding conditions to your query?
Answer
-
EQUALS
-
WHAT
-
CONDITIONS
-
WHERE
Question 102
Question
The NULL SQL keyword is used to…
Answer
-
Represent 0 value
-
Represent a missing or unknown value. NULL in SQL represents nothing.
-
Represent positive infinity
-
Represent negative infinity
Question 103
Question
Which of the following is a legal expression in SQL?
Answer
-
SELECT NULL FROM Employee;
-
SELECT name FROM Employee WHEN salary = NULL;
-
SELECT name FROM Employee;
-
None of the given
Question 104
Question
What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) > 5?
Answer
-
Selects the total number of orders from the Sales table, if this number is greater than 5
-
Selects all customers from the Sales table
-
Selects all customers with number of orders from table Sales that have made more than 5 orders
-
None of the given
Question 105
Question
Which SQL statement will select all rows from a table called «Customers» and orders the result by «customer name»?
Answer
-
SELECT * FROM Customers ORDER ON customer_name;
-
SELECT * FROM Customers ORDER customer_name;
-
SELECT * FROM Customers ORDERED customer_name;
-
SELECT * FROM Customers ORDER BY customer_name;
Question 106
Question
SQL query and data modification commands make up a(n) _______ .
Question 107
Question
To eliminate duplicate values in a column _____ is used
Answer
-
ELIMINATE
-
NODUPLICATE
-
DISTINCT
-
None of these
Question 108
Question
Which of the following is an SQL aggregate function?
Question 109
Question
Which of the following is an SQL aggregate function?
Question 110
Question
What type of join is needed when you wish to include rows that do not have matching values?
Answer
-
Equi-joins
-
Natural join
-
Outer join
-
All of the mentioned
Question 111
Question
Which of the following is not DML statement?
Answer
-
UPDATE
-
INSERT
-
ALTER TABLE
-
DELETE
Question 112
Question
Which of the following is DML statement?
Answer
-
SELECT
-
CREATE TABLE
-
ALTER TABLE
-
GRANT
Question 113
Question
To define what columns should be displayed in an SQL SELECT statement:
Answer
-
Use FROM to name the source table(s) and list the columns to be shown after SELECT
-
Use USING to name the source table(s) and list the columns to be shown after SELECT
-
Use SELECT to name the source table(s) and list the columns to be shown after SUSING
-
Use USING to name the source table(s) and list the columns to be shown after WHERE
Question 114
Question
You can add a row using SQL in a database with which of the following?
Question 115
Question
Which of the following is considered as DBMS?
Answer
-
MS SQL Server
-
Oracle
-
PostgreSQL
-
All of these
Question 116
Question
Which of the following is a valid SQL type?
Answer
-
NUMERIC
-
CHARACTER
-
DATE
-
All of the given
Question 117
Question
Which of the following SQL statements can be used to create a relational table?
Question 118
Question
A table that satisfies 2NF:
Answer
-
Always satisfies 1NF
-
Always satisfies 3NF
-
May violate 1NF
-
None
Question 119
Question
An entity relationship diagram is a tool to represent:
Answer
-
Process model
-
Customer model
-
Event model
-
Data model