345 - SQL Database - R - 2020
345 - SQL Database - R - 2020
SQL DATABASE
FUNDAMENTALS
(345)
REGIONAL 2020
Multiple Choice:
General Instructions
Your name and/or school name should not appear on any work you submit for grading. Write your
contestant number in the provided space. Staple all pages in order before you turn in your test.
Unless specified otherwise, questions are in the context of database systems of the Relational/SQL
type database family/genre
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
Page 3 of 10
MULTIPLE CHOICE
Identify the letter of the choice that best completes the statement or answers the question. Mark
A if the statement is true. Mark B if the statement is false.
10. How do you retrieve all the rows and columns from a table named Cities?
a. GET * FROM Cities;
b. SELECT * FROM Cities;
c. PULL ALL FROM Cities;
d. OBTAIN ALL FROM Cities;
11. Which of the following SQL statements will return the FirstName and LastName columns
for all rows from a table called Customers?
a. GET FirstName and LastName FROM Customers;
b. PULL FirstName, LastName FROM Customers;
c. OBTAIN FirstName and LastName FROM Customers;
d. SELECT FirstName, LastName FROM Customers;
13. A ______ enforces that all of a column's values must match existing values from the column
it references.
a. Foreign Key Constraint
b. Check Constraint
c. Fact Constraint
d. Candidate Constraint
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
Page 5 of 10
14. Which of the following joins selects records with matching values in both tables?
a. Left Join
b. Right Join
c. Inner Join
d. Cross Join
15. Which of the following joins selects all records from the left table and the matched records
from the right table?
a. Left Join
b. Right Join
c. Cross Join
d. Inner Join
16. Which of the following SQL statements removes the table called Products?
a. DROP TABLE Products;
b. REMOVE TABLE Products;
c. DELETE TABLE Products;
d. DESC TABLE Products;
19. A ______ is a data structure that organizes information into rows and columns.
a. Table
b. Foreign Key
c. Field
d. Attribute
25. Which of the following SQL statements is used to erase all data changes made from the start
of the current transaction?
a. Undo
b. Modify
c. Unpublish
d. Rollback
26. Which of the following SQL statements is used to end your current transaction and make
permanent changes performed in the transaction?
a. Publish
b. Commit
c. Save
d. Update
27. ______ requires concurrent transactions must leave the database in a status as if they were
executed sequentially.
a. Consistency
b. Atomicity
c. Partition Tolerance
d. Isolation
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
Page 7 of 10
29. Which of the below SQL keywords is used to sort a result set in ascending or descending
order?
a. Sort By
b. Group By
c. Order By
d. Select By
30. Which of the below SQL statements will filter down to FirstName starting with B and
containing only 2 total characters?
a. WHERE FirstName LIKE 'B%'
b. WHERE FirstName LIKE 'B_'
c. WHERE FirstName LIKE 'B*'
d. WHERE FirstName LIKE 'B%%'
31. Which of the below SQL statements will filter to records with FruitName values containing
Orange, Apple, or Pineapple
a. WHERE EXISTS FruitName ('Orange', 'Apple', 'Pineapple')
b. WHERE FruitName CONTAINS ('Orange', 'Apple', 'Pineapple')
c. WHERE FruitName NOT IN ('Orange', 'Apple', 'Pineapple')
d. WHERE FruitName IN ('Orange', 'Apple', 'Pineapple')
32. In SQL Server, which SQL command is used to limit the number of records returned by a
query result set to a specified number of rows?
a. Top
b. Includes
c. Limit
d. Precludes
33. A ______ is a virtual table with contents based on the result-set of a SQL statement.
a. Table
b. Stored procedure
c. Function
d. View
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
Page 8 of 10
34. Which of the following SQL commands is used to add a SQL database?
a. ADD DATABASE
b. GENERATE DATABASE
c. APPEND DATABASE
d. CREATE DATABASE
35. Which of the following SQL statements is used to generate an index for a table?
a. APPEND INDEX
b. GENERATE INDEX
c. ADD INDEX
d. CREATE INDEX
42. Which of the following is a set of programming extensions from Sybase and Microsoft that
adds features to the SQL available in SQL Server?
a. PL/SQL
b. Transact-SQL
c. C#
d. VB.Net
44. Which SQL statement filters rows from a table named Cities to just rows whose CityName
starts with B?
a. WHERE CityName = 'B';
b. WHERE CityName LIKE 'B*';
c. WHERE CityName LIKE 'B%';
d. WHERE CityName IS LIKE 'B*';
45. The DELETE statement may be used in conjunction with the WHERE statement?
a. True
b. False
47. Which of the following SQL statements adds a Primary Key constraint for column ClientID
when used within a CREATE TABLE statement?
a. CONSTRAINT PK_Client PRIMARYKEY (ClientID)
b. CONSTRAINT PK_Client PRIMARY KEY (ClientID)
c. CONSTRAINT PK_Client CANDIDATEKEY (ClientID)
d. CHECK PK_Client PRIMARYKEY (ClientID)
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
Page 10 of 10
48. A ______ is a unique identifier not derived from application data and that has no business
meaning. For example, the first five values might be 1, 2, 3, 4, 5.
a. Surrogate key
b. Natural key
c. Select Key
d. Dimension Key
50. Postgres, SQL Server, and MySQL each have a DATE datatype?
a. True
b. False
SQL DATABASE FUNDAMENTALS - REGIONAL 2020
ANSWER KEY
Page 1 of 2
SQL DATABASE
FUNDAMENTALS
(345)
REGIONAL 2020
Multiple Choice & Short Answer:
1. C 26. B
2. A 27. D
3. D 28. A
4. B 29. C
5. B 30. B
6. C 31. D
7. C 32. A
8. A 33. D
9. D 34. D
10. B 35. D
11. D 36. A
12. B 37. C
13. A 38. B
14. C 39. B
15. A 40. C
16. A 41. D
17. D 42. B
18. A 43. A
19. A 44. C
20. A 45. A
21. B 46. B
22. D 47. B
23. B 48. A
24. B 49. A
25. D 50. A