Domain 1_ Database Design _ Quizizz

  1. What ensures that orphaned records do not occur?

    • a) Primary keys

    • b) Entity-relationship diagrams (ERDs)

    • c) Referential integrity

    • d) Composite keys

  2. In the database design and building process, when should an entity-relationship diagram (ERD) be created?

    • a) Before a database is built

    • b) After a database has been built

    • c) When a database is being built

    • d) After a database has been in use for a significant period of time

  3. What is a primary key field?

    • a) A field that can only be altered by one person with specific credentials

    • b) A field that ensures every record in a table is the same

    • c) A field that is unable to be altered

    • d) A field that ensures every record in a table is unique

  4. Which statement best defines normalization?

    • a) The process of ensuring primary keys exist within the same column in all entities within a database

    • b) The process of creating primary keys

    • c) The process of ensuring that an entity in a database has a solid design and that the data in the entity can work well with other entities

    • d) The process of ensuring that all entities in a database have at least one primary key and one composite key

  5. What is a characteristic of one-to-one relationships?

    • a) They use a primary key in one table and a non-primary key in another table

    • b) They use primary keys from three tables

    • c) They use non-primary keys from two tables

    • d) They use primary keys from two tables

  6. Which two data field types are text fields?

    • a) Money

    • b) Int

    • c) Nvarchar

    • d) Varchar

  7. It is important to make sure a database is backed up regularly so that the data can be if it is accidentally deleted or changed.

    • a) debugged

    • b) replaced

    • c) restored

    • d) remade

  8. Within a database, what is data stored in?

    • a) Entities

    • b) Graphs

    • c) Columns

    • d) Rows

  9. Which data field type would be used to store a value of 0 or 1?

    • a) Varchar

    • b) Datetime

    • c) Bit

    • d) Date

  10. Varchar uses _________ amount of memory.

    • a) The number of characters plus two bytes

    • b) Double the number of characters

    • c) 8 bytes

    • d) 4 bytes

  11. Nvarchar uses _________ amount of memory.

    • a) The number of characters plus two bytes

    • b) 4 bytes

    • c) Double the number of characters

    • d) 8 bytes

  12. Smallmoney uses _________ amount of memory.

    • a) The number of characters plus two bytes

    • b) 4 bytes

    • c) Double the number of characters

    • d) 8 bytes

  13. Datetime uses _________ amount of memory.

    • a) 4 bytes

    • b) Double the number of characters

    • c) The number of characters plus two bytes

    • d) 8 bytes

  14. What is a column, also known as a field?

    • a) A place to enter data within an entity

    • b) A description of the data being stored

    • c) A line within an entity

    • d) An entity property that defines the data being stored in records

  15. Match the data field type to its number range: -2 billion to 2 billion

    • a) Int

    • b) Small integer

    • c) Tiny integer

    • d) Money field

  16. Which role is automatically assigned to any user on a server and assigned to a database?

    • a) Default

    • b) Guest

    • c) User

    • d) Public

  17. What is a row, also known as a record?

    • a) A line within an entity

    • b) Entity properties that filter data

    • c) A description of the data being stored

    • d) A copy of data within an entity

  18. Which statement best defines referential integrity?

    • a) A concept that ensures that a primary key value exists in a relationship before the corresponding foreign key value is allowed

    • b) A concept that ensures that there is at least one primary key in every table within a database

    • c) A concept that ensures that a composite key value exists in a relationship before the corresponding foreign key value is allowed

    • d) A concept that ensures that a foreign key value exists in a relationship before the corresponding primary key value is allowed

  19. Which is a sign of a well-built entity-relationship diagram (ERD)?

    • a) The primary key field is indicated

    • b) The columns being used in relationships are indicated

    • c) Entity names are indicated

    • d) Entities are shown as having multiple relationships with one another

  20. Refer to the image. Which option should be set to Yes to enforce referential integrity?

    • a) INSERT and UPDATE Specifications

    • b) Enforce Foreign Key Constraint

    • c) Check Existing Data on Creation

    • d) Enforce For Replication

  21. A bit field is usually used as a

    • a) date

    • b) text

    • c) numeric

    • d) boolean

  22. Money data field type uses _________ amount of memory.

    • a) 1 byte

    • b) 8 bytes

    • c) 4 bytes

  23. TinyInt data field type uses _________ amount of memory.

    • a) 8 bytes

    • b) 1 byte

    • c) 4 bytes

  24. Int data field type uses _________ amount of memory.

    • a) 4 bytes

    • b) 8 bytes

    • c) 1 byte

  25. What does the WITH GRANT OPTION clause add to a GRANT statement?

    • a) The ability for the administrator to grant all privileges to others

    • b) The ability for the user getting the permission to grant that permission to others

    • c) The ability for the user getting the permission to grant all permissions to others

    • d) The ability for the administrator to grant others the same permission being granted to the administrator

  26. When a permission on a resource is no longer needed, which statement is run to remove that permission?

    • a) DENY

    • b) DELETE

    • c) REVOKE

    • d) DROP

  27. What is the principle of least privilege?

    • a) A principle that states that people should have access to all permissions

    • b) A principle that states that people should only have the permissions they need to do their job

    • c) A principle that states that people should only have the permissions they request

    • d) A principle that states that people should have access to all permissions unless there is no need for them to have access to a permission

  28. What should one do in the first form of normalization?

    • a) Ensure that there is a composite key in every entity

    • b) Ensure that every record in an entity is unique and all fields are independent of one another

    • c) Ensure that there are only two fields that have duplicate data

    • d) Ensure that every primary key is the same across all entities

  29. Refer to the image. What is the displayed graphic called?

    • a) Entry relationship diagram (ERD)

    • b) Entry resolution diagram (ERD)

    • c) Entity relationship diagram (ERD)

    • d) Entity resolution diagram (ERD)

  30. Which two data field types are numeric fields?

    • a) Varchar

    • b) Money

    • c) Nvarchar

    • d) Int

  31. Which statement best defines third normal form?

    • a) A value change in a non-key column in one table necessitates a change in another non-key column

    • b) A value change in a key column in one table necessitates a change in another key column

    • c) A value change in a key column in one table does not necessitate a change in a non-key column

    • d) A value change in a non-key column in one table does not necessitate a change in another non-key column

  32. What do primary keys usually consist of?

    • a) Multiple rows

    • b) A single column

    • c) A single row

    • d) Multiple columns

  33. Which data field type allows for Unicode characters?

    • a) Bit

    • b) Varchar

    • c) Datetime

    • d) Nvarchar

  34. Why might a composite key, also known as a compound key, be necessary for a database?

    • a) If the information within a column designated as a primary key exists in more than one column

    • b) If the data within a table is linked to another table

    • c) To provide more security for the database

    • d) If multiple users access the database

  35. Integer data type has a range of?

    • a) -32,767 to 32,767

    • b) -214,000 to 214,000

    • c) 0 to 255

    • d) -922 trillion to 922 trillion

    • e) -2 billion to 2 billion

  36. Small integer data type has a range of?

    • a) -214,000 to 214,000

    • b) -32,767 to 32,767

    • c) 0 to 255

    • d) -922 trillion to 922 trillion

    • e) -2 billion to 2 billion

  37. Tiny integer data type has a range of?

    • a) -922 trillion to 922 trillion

    • b) -32,767 to 32,767

    • c) 0 to 255

    • d) -2 billion to 2 billion

    • e) -214,000 to 214,000

  38. Money field data type has a range of?

    • a) -32,767 to 32,767

    • b) 0 to 255

    • c) -2 billion to 2 billion

    • d) -214,000 to 214,000

    • e) -922 trillion to 922 trillion

  39. Smallmoney field data type has a range of?

    • a) -32,767 to 32,767

    • b) 0 to 255

    • c) -214,000 to 214,000

    • d) -2 billion to 2 billion

    • e) -922 trillion to 922 trillion

  40. Verifying a backup file ensures it is ready to be restored.

    • a) The file can be tested

    • b) The file can have its contents examined

    • c) The file can be verified

    • d) Part of the file can be restored


    • Domain 2_ Database Object Management _ Quiziz

  1. Which command removes a table from a database?

    • b) DROP TABLE

  2. Which statement best defines a view?

    • b) A stored statement that leads one to specific information

  3. What type of parameter must be specified when creating a stored procedure?

    • d) Input

  4. What is not allowed in object names in SQL?

    • a) Spaces

  5. While a clustered index is based on a

    • b) column (a non-clustered index can be based on any other field).

  6. Refer to the image. What will happen when this code is executed?

    • a) The code will not run due to an error in the syntax

  7. Which three pieces of information should be specified when creating a table?

    • b) The columns to add to the table

    • d) The name of the table

    • e) The data types for each column within the table

  8. By default,

    • d) null values are allowed in columns when tables are created.

  9. What type of parameter is used in apps to return a value that the app will use later?

    • b) Output

  10. The main purpose of a view is that it can accept parameters.

  • b) False

  1. To change a view, with what keyword should CREATE in the CREATE VIEW command be replaced?

  • b) ALTER

  1. What is one main security benefit of stored procedures being used within app code?

  • c) A stored procedure hides SQL keywords from being exposed in app code

  1. Which best defines the purpose of an index?

  • b) Helps speed up queries within a table as long as the indexes are created with strategic purpose

  1. What function must be included in a stored procedure to see the results of a function that runs inside of the stored procedure?

  • d) RETURN

  1. Which piece of information goes in parentheses when creating a nonclustered index in SQL?

  • d) The columns being indexed

  1. What is the only way to make changes to a table structure after a table has been created?

  • c) Use the ALTER command to make changes to the table

  1. How should one change a column from not allowing null values to allowing null values?

  • d) Alter the column with the ALTER command




    Domain 3_ Data Retrieval _ Quizizz


    1. Once a table alias is established, it has to be used throughout the __________.
    Answer: b) query

    2. Where should a WHERE clause be used within the GROUP BY clause?
    Answer: d) Before the GROUP BY clause

    3. Which comparison operator should one use to return records from before a given date?
    Answer: d) <

    4. Which statement best defines a self join?
    Answer: b) A join between two columns in the same table

    5. The WHERE clause creates __________ on the data being queried.
    Answer: d) filters

    6. When would one normally implement a full outer join? Choose two answers.
    Answers:
    a) Mismatched records from both tables in a join need to be visible
    b) Before combining two data sets into one

    7. The percent symbol (%) is a __________ that allows any number of characters.
    Answer: b) wildcard

    8. Which statement best defines an inner join?
    Answer: a) A join in which records will only display if the value of the join field is in both tables.

    9. What clause is used to sort information in a query?
    Answer: d) ORDER BY

    10. Rather than using a join, one may use a ___________ to display fields from a corresponding table.
    Answer: d) subquery

    11. What keyword can be used with a WHERE clause to filter information within a range?
    Answer: b) BETWEEN

    12. Which aggregate is used to show the highest value in a numeric field within a group?
    Answer: c) MAX

    13. What keyword or key phrase can be used to return only records that do not match multiple criteria?
    Answer: a) NOT IN

    14. Refer to the image. What will happen when this self join is executed?
    Answer: d) The result will display the employees with a manager but omit the employee without a manager.

    15. Which aggregate is used to show the average of a numerical field?
    Answer: a) AVG

    16. Refer to the image. Which WHERE clause will show every person except for those living in Los Angeles in the results?
    Answer: a) WHERE NOT City = 'Los Angeles'

    17. Which comparison operator returns records on or before a given date?
    Answer: d) <=

    18. Refer to the image. What type of join is shown?
    Answer: c) Left outer join

    19. Refer to the image. What is the column alias?
    Answer: d) Line Total

    20. Which aggregate is used to show the number of records for each item in a group?
    Answer: b) COUNT

    21. Which aggregate is used to show the lowest value in a numeric field within a group?
    Answer: b) MIN

    22. What keyword or key phrase shows records with fields that are not empty?
    Answer: a) NOT NULL

    23. Which statement best defines a cartesian product, also known as a cross join?
    Answer: b) Every record in one table is related to every record in another.

    24. Refer to the image. What should the first line of the SELECT statement read to limit results to the first 100 records in the table?
    Answer: a) SELECT TOP 100 FirstName,

    25. Refer to the image. What will the results of this query show?
    Answer: c) People living in Los Angeles with the last name Cox and people living in Long Beach with the last name Cox.

    26. Refer to the image. What information will the new column show?
    Answer: b) The list price with 10% taken off.

    27. What keyword should one use between two SELECT statements to show records that are alike in two tables?
    Answer: a) INTERSECT

    28. What letters can be added to the end of a column to show the column in reverse order?
    Answer: a) DESC

    29. What keyword or key phrase is used to filter records from an aggregate?
    Answer: b) HAVING

    30. A user wants to see all records from the Sales.Customer table and only records with an entry in the CustomerID column from the Sales.SalesOrderHeader table. What type of join should the user implement?
    Answer: a) Left outer join

    31. What keyword or key phrase shows records with empty fields?
    Answer: c) NULL

    32. What keyword shows every record that matches the same criteria?
    Answer: a) ALL

    33. What purpose does a DISTINCT keyword after a SELECT statement serve?
    Answer: d) It prevents duplicate rows from showing in a result.

    34. What clause is used for columns that are not being used in an aggregate?
    Answer: d) GROUP BY

    35. In a query involving a table, where does the WHERE clause belong?
    Answer: c) After the table

    36. What clause should be used to get an approximate match to a search rather than an exact match?
    Answer: d) LIKE clause

    37. What keyword can be used between two criteria when using a WHERE clause to narrow results further?
    Answer: c) AND

    38. Which aggregate totals the values of a field?
    Answer: c) SUM

    39. What keyword should one use between two SELECT statements to combine two datasets into one?
    Answer: c) UNION

    40. Which comparison operator returns records after a given date?
    Answer: c) >

    41. Which comparison operator returns records on or after a given date?
    Answer: d) >=

    42. What function can be added to a computed column to show the results as dollar amounts?
    Answer: a) Currency function (cur)

    43. What keyword shows all records with at least one match in a subquery?
    Answer: d) ANY

    44. What keyword or key phrase can be used with a WHERE clause to return records matching multiple criteria?
    Answer: c) IN

    Domain 4: Data Manipulation


    1. What statement is used to change existing data?
    Answer: d) UPDATE

    2. What is the difference between a DELETE statement and a TRUNCATE TABLE statement?
    Answer: d) One can identify specific records that are being deleted with a DELETE statement, while a TRUNCATE TABLE statement deletes all data in a table.

    3. What statement is used to copy records from one table into an existing table?
    Answer: b) INSERT INTO...SELECT

    4. What statement is used to insert values into a table?
    Answer: d) INSERT INTO...VALUES

    5. What keyword removes records from a table?
    Answer: a) DELETE

    6. What statement is used to copy records from an existing table to a new table?
    Answer: d) SELECT INTO

    7. What clause should always be included in an UPDATE statement?
    Answer: b) WHERE

    8. What must be included in parentheses in an INSERT INTO...VALUES statement?
    Answer: c) Required fields



    Domain 5: Troubleshooting


    1. One error that may occur is attempting to retrieve data with a well-written query but against the wrong ___________.
    Answer: c) database

    2. Which statement best defines a syntax error?
    Answer: d) Causes a statement not to run

    3. Refer to the image. What is the runtime error in the query?
    Answer: c) The Sales.Customer table has not been created yet

    4. Refer to the image. What is the syntax error in the query?
    Answer: a) There is a comma after the last column listed in the query

    5. Refer to the image. What is the runtime error in the query?
    Answer: b) The primary key entry is being duplicated

    6. Refer to the image. What is the syntax error in the query?
    Answer: d) The VALUES keyword is missing

    7. Refer to the image. What type of error is shown in the query?
    Answer: a) Syntax error

    8. Refer to the image. What type of error is shown in the query?
    Answer: c) Runtime error

    4o