100% found this document useful (1 vote)
409 views

345 - SQL Database Fundamentals - R - 2018

This document appears to be a test for a SQL database fundamentals competition. It consists of multiple choice questions about SQL concepts and commands. Correct answers are scored at 10 points each, with a total possible score of 500 points. The test instructions state that contestants must hand in the test booklet and adhere to equipment and time rules or risk disqualification.

Uploaded by

avfg gfavd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
409 views

345 - SQL Database Fundamentals - R - 2018

This document appears to be a test for a SQL database fundamentals competition. It consists of multiple choice questions about SQL concepts and commands. Correct answers are scored at 10 points each, with a total possible score of 500 points. The test instructions state that contestants must hand in the test booklet and adhere to equipment and time rules or risk disqualification.

Uploaded by

avfg gfavd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Contestant Number: ________________

SQL DATABASE FUNDAMENTALS - REGIONAL 2018 Time: _________


Page 1 of 8
Rank: _________

SQL DATABASE
FUNDAMENTALS
(345)

REGIONAL – 2018
Multiple Choice:

Multiple Choice (50 @ 10 points each) _______________ (500 points)

TOTAL POINTS _____________ (500 points)

Failure to adhere to any of the following rules will result in disqualification:


1. Contestant must hand in this test booklet and all printouts. Failure to do so will result in
disqualification.
2. No equipment, supplies, or materials other than those specified for this event are
allowed in the testing area. No previous BPA tests and/or sample tests or facsimile
(handwritten, photocopied, or keyed) are allowed in the testing area.
3. Electronic devices will be monitored according to ACT standards.

No more than sixty (60) minutes testing time

Property of Business Professionals of America.


May be reproduced only for use in the Business Professionals of America
Workplace Skills Assessment Program competition.
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 2 of 8

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.

1. Which of the following SQL commands would you use to identify all of the non-duplicate
values for a table column?
a. UNIQUE
b. DIFF
c. DISTINCT
d. COMPARE

2. A SQL JOIN clause is used to combine data from two or more tables using on a common
field between them.
a. True
b. False

3. Which operator is true if the operand matches a pattern?


a. BETWEEN
b. LIKE
c. IN
d. None of the above

4. Which of the following is not a valid SQL clause?


a. TOP
b. ORDER BY
c. WHERE
d. BOTTOM

5. Which SQL function would you use to obtain the number of rows that match specified
criteria?
a. TOTAL
b. COUNT
c. AGGREGATE
d. SUM

6. The DEFAULT constraint is used to insert a default value into a column.


a. True
b. False

7. All of the following are true statements regarding the “AS” keyword, except?
a. Applies a permanent alias
b. Applies a temporary alias
c. Allows renaming of database columns
d. Allows renaming of database tables
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 3 of 8

8. RDBMS is the basis for SQL.


a. True
b. False

9. Which of the following would you use to add a new record to a database table?
a. CREATE ROW
b. ADD ROW
c. UPDATE TABLE
d. INSERT INTO

10. Which of the following is a valid SQL constraint?


a. LIMIT
b. UNIQUE
c. DISTINCT
d. UNION

11. Which of the following accurately depicts that a value must be present in the EMAIL
column for a record (assume this is part of a CREATE statement)?
a. EMAIL VARCHAR (255) NOT NULL
b. EMAIL VARCHAR (255) REQUIRE
c. EMAIL VARCHAR (255) INDEX
d. EMAIL VARCHAR (255) NOT BLANK

12. All of the following are situations you would avoid using a database index, except?
a. Tables that frequently have large batch updates.
b. Columns that are frequently manipulated.
c. Columns that contain a high number of NULL values.
d. Tables that have large data sets.

13. Which logical operator compares a value to similar values using wildcard operators?
a. IN
b. LIKE
c. COMPARE
d. RELATE

14. Which of the following are valid Data Definition Language (DDL) commands?
a. CREATE
b. DROP
c. ALTER
d. All of the above

15. What category of data integrity ensures there are no duplicate rows in a table?
a. Domain Integrity
b. Entity Integrity
c. Referential Integrity
d. User Defined Integrity
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 4 of 8

16. Deleting a table definition including all data, indexes, triggers, constraints, and permission
for that table is accomplished using which command?
a. DELETE
b. DROP
c. TRUNCATE
d. REMOVE

17. A Foreign Key in one table points to a Domestic Key in another table.
a. True
b. False

18. What would be the result of executing the following SQL statement?
UPDATE Members
SET Email='[email protected]', State='Michigan'

a. Only the record for John Smith in the Members table would be updated.
b. All records in the Members table would be updated.
c. The values in the Email and State columns would be the same for all records in the
Members table.
d. Both B and C.

19. Relational databases offer what advantages in comparison to a flat file?


a. Increased integrity
b. Data redundancy
c. Reduced complexity
d. Both A and B

20. In which of the following would the results include displaying the Last Name from A to Z?
a. SELECT * FROM Customers ORDER BY First_Name ASC, Last Name DESC
b. SELECT * FROM Customers ORDER BY OrderID ASC, Last Name ASC
c. SELECT * FROM Customers ORDER BY Last Name DESC, OrderID ASC
d. SELECT * FROM Customers ORDER BY Last Name DESC, First_Name ASC

21. Which type of JOIN results in the selection of all rows from two tables as long as there is a
match between the columns in each tables?
a. FULL OUTER JOIN
b. UNION
c. RIGHT JOIN
d. INNER JOIN

22. All of the following are aggregate functions, except ______.


a. RAND
b. COUNT
c. MAX
d. AVG
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 5 of 8

23. In SQL syntax AVG and avg have different meanings.


a. True
b. False

24. Of the following data types, in which one could you not store the value 123456789?
a. VARCHAR(20)
b. INT
c. NCHAR
d. The value can be stored in all of the above datatypes

25. The SQL statement ALTER TABLE CUSTOMERS ADD DATEOFBIRTH VCHAR(20)
results in which of the following?
a. Adds a new column named DATEOFBIRTH to the CUSTOMERS table
b. Adds a new table named DATEOFBIRTH to the CUSTOMERS database
c. Adds a new row named DATEOFBIRTH to the CUSTOMERS table
d. None of the Above

26. The clause WHERE ACCOUNTNUM LIKE '_5%3' will match all of the following, except
______.
a. 2533483
b. 45434
c. 85103
d. 953

27. The modulus or remainder of dividing two values can be found using which operator?
a. #
b. *
c. %
d. /

28. To access a database View, a user must have permission to ______.


a. all tables
b. the View
c. only the tables the view references
d. Both B and C

29. In which SQL clause will the results include any rows where an employee is over age 25
that have a salary more than $40,000 or employees that have a salary of at least $35,000?
a. WHERE (AGE > 25 AND SALARY > 40000) AND SALARY > 35000
b. WHERE (AGE > 25 AND SALARY > 40000) OR SALARY < = 35000
c. WHERE (AGE > 25 AND SALARY > 40000) OR SALARY > = 35000
d. WHERE AGE > 25 AND (SALARY >= 40000 OR SALARY > = 35000)
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 6 of 8

30. A secured database object has a fully qualified name. Which of the following is not part of
the fully qualified name?
a. Schema
b. Object
c. Principal
d. Server

31. Which of the following statements about Primary Keys is not accurate?
a. A table may have more than one Primary Key
b. Is not required for a table to have a Primary Key
c. A Primary Key must be unique
d. A Primary Key cannot be NULL

32. What statement would you use to copy data from one table and insert it into an existing
table?
a. COPY TO SELECT
b. INSERT INTO SELECT
c. ALTER TABLE INSERT
d. INSERT AND UPDATE TABLE

33. Which statement is true about the AUTO_INCREMENT keyword?


a. Allows a unique number to be generated when a new record is inserted into a table
b. Must always start at 1
c. Must always be the primary key
d. Both A and C

34. A SQL CHECK constraint ______.


a. prevents any action that would destroy links between tables
b. limits the values that can be entered in a column
c. prevents entry of numerical values in a column
d. guarantees uniqueness for a column

35. Which type of constraint is used to insert a default value into a column?
a. UNIQUE
b. DEFAULT
c. NOT NULL
d. STANDARD

36. There are three parameters for the SQL MID() function.,. Which of the following is not
required?
a. Column name
b. Start
c. Length
d. All parameters are required
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 7 of 8

37. Examples of SQL Scalar functions include all of the following, except ______.
a. ROUND()
b. LEN()
c. FORMAT()
d. SUM()

38. The maximum number of characters for a SQL Server VARCHAR() column is ______.
a. 255
b. 1024
c. 8000
d. 32,767

39. CRUD =
a. Create, Relate, Update, Delete
b. Create, Relate, Upload, Data
c. Create, Read, Update, Delete
d. Create, Read, Update, Data

40. Constraints can only be applied at the time a table is created?


a. True
b. False

41. In the example below, does the SELECT clause has a computed value?
SELECT CustomerName, UnitPrice * NumberofUnits FROM Orders
a. True
b. False

42. Which of the following SQL statements deletes all rows in table called CustomerOrders?
a. DELETE CustomerOrders
b. DELETE * FROM CustomerOrders
c. DELETE ALL CustomerOrders
d. DELETE FROM CustomerOrders

43. What will be the result of the following SQL statement?


SELECT LEFT(‘Enjoy the little things’, 5)
a. Enjoy
b. things
c. the little things
d. Nothing, an error will occur

44. Which of the following SQL clauses is used to sort a result set?
a. SORT
b. ORDER BY
c. ARRANGE
d. SORT ORDER
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
Page 8 of 8

45. The WHERE clause is required for a SQL UPDATE statement.


a. True
b. False

46. Which keyword selects all rows from both tables as long as there is a match between the
columns in both tables?
a. LEFT JOIN
b. RIGHT JOIN
c. INNER JOIN
d. FULL OUTER JOIN

47. The Boolean data type stores TRUE or FALSE values.


a. True
b. False

48. Creating database queries is part of the Data Definition Language.


a. True
b. False

49. Which of the following is not a valid format for the DATEPART function?
a. ns
b. qq
c. dy
d. mh

50. The following SQL statement demonstrates an example of _____.

SELECT a.studentid, a.name, b.gpa


FROM student a, grades b
WHERE a.studentid = b.studentid AND b.gpa>
(SELECT gpa
FROM grades
WHERE studentid = 'G1023’);

a. Intersect
b. Sub query
c. Array
d. Constraint
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
ANSWER KEY
Page 1 of 2

SQL DATABASE
FUNDAMENTALS
(345)

REGIONAL – 2018

TOTAL POINTS _____________ (500 points)

Graders: Please double check and verify all scores and


answer keys!

Property of Business Professionals of America.


May be reproduced only for use in the Business Professionals of America
Workplace Skills Assessment Program competition.
SQL DATABASE FUNDAMENTALS - REGIONAL 2018
ANSWER KEY
Page 2 of 2

1. C 26. B
2. A 27. C
3. B 28. B
4. D 29. C
5. B 30. C
6. A 31. A
7. A 32. B
8. A 33. A
9. D 34. B
10. B 35. B
11. A 36. C
12. D 37. D
13. B 38. C
14. D 39. C
15. B 40. B
16. B 41. A
17. B 42. D
18. D 43. A
19. D 44. B
20. B 45. B
21. D 46. C
22. A 47. A
23. B 48. B
24. D 49. D
25. A 50. B

You might also like