0% found this document useful (0 votes)
141 views9 pages

D426V3 Practice Test

The document is a practice test for database concepts, covering topics such as entities, foreign keys, data integrity, SQL clauses, and normalization. It includes multiple-choice and true/false questions designed to assess knowledge of relational databases and SQL functionalities. The test aims to prepare individuals for understanding and working with database management systems.

Uploaded by

kyletheboss543
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views9 pages

D426V3 Practice Test

The document is a practice test for database concepts, covering topics such as entities, foreign keys, data integrity, SQL clauses, and normalization. It includes multiple-choice and true/false questions designed to assess knowledge of relational databases and SQL functionalities. The test aims to prepare individuals for understanding and working with database management systems.

Uploaded by

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

D426 V3 Practice Test

Circle the Correct Answer


1. Which of the following is an example of an entity in a database?

A) Customer
B) Report
C) Query
D) Index

2. What does a foreign key do in a relational database?

A) Encrypts sensitive data


B) Identifies a unique record in its own table
C) Links two tables together
D) Stores binary data

3. Which best describes a table in a relational database?

A) A set of nested documents


B) A collection of rows and columns representing data
C) A flat spreadsheet with only text
D) A graphic user interface

4. Which of the following best defines "data integrity"?

A) The number of users accessing the database


B) The process of entering random values
C) A security feature that blocks users
D) The accuracy and consistency of data over time

5. Which term describes the process of structuring a database to reduce redundancy?

A) Clustering
B) Sorting
C) Normalization
D) Replication

6. What is a primary function of a database?

A) Sending emails
B) Storing and managing data
C) Designing web pages
D) Writing documents

7. Which of the following is an example of a relational database?

A) MongoDB
B) Excel
C) MySQL
D) WordPress

8. Which component in a database represents a single piece of data about an entity?

A) Table
B) Field
C) Record
D) Relationship

9. Which of these is not an advantage of databases over spreadsheets?

A) Data integrity
B) Scalability
C) Graphic design tools
D) Multi-user access

10. A(n) _______ shows how entities in a database relate to each other.

A) Spreadsheet
B) API
C) HTML page
D) ERD

11. What is the main function of a primary key?

A) To uniquely identify each row in a table


B) To join two tables together
C) To sort the data in ascending order
D) To store foreign data

12. Which clause is used in SQL to retrieve data?

A) INSERT

B) UPDATE

C) CREATE

D) SELECT

13. What is the purpose of the WHERE clause in SQL?

A) To rename a column

B) To filter rows based on a condition


C) To create new tables

D) To delete all records

14. Which clause sorts SQL results?

A) FILTER

B) GROUP

C) ORDER BY

D) SORT

15. Which of the following best defines a foreign key?

A) A unique field within a table

B) A field that links to a primary key in another table

C) A field used to sort data

D) A reserved SQL keyword

True / False
16. A table can have more than one primary key.
A) True
B) False

17. The SELECT statement can be used to retrieve all columns by using *.

A) True
B) False

18. Foreign keys enforce referential integrity between tables.

A) True
B) False

19. The ORDER BY clause can only sort in ascending order.

A) Trud
B) False
20. SELECT name, age FROM users WHERE age > 30; is a valid SQL query.

A) True
B) False

21. What does the SELECT statement do in SQL?


A. Deletes records
B. Inserts new data
C. Retrieves data
D. Updates tables

22. Which operator is used to determine if a value matches one of several


values?
A. LIKE
B. BETWEEN
C. NOT
D. IN

23. What keyword is used to eliminate duplicate values in query results?


A. ORDER
B. LIMIT
C. UNIQUE
D. DISTINCT

24. Which wildcard character matches any number of characters in a LIKE


clause?

A. _
B. %
C. ?
D. *

25. Which SQL clause is used to filter records?


A. SELECT
B. FROM
C. WHERE
D. ORDER BY

26. What does a cross-join do?


A. Joins two tables without conditions
B. Joins a table to itself
C. Joins two tables based on matching columns
D. Joins only unique rows

27. What is the result of SQRT(-1) in SQL?


A. -1
B. NULL
C. 0
D. Error

28. What is the purpose of a view in SQL?


A. Modify table schemas
B. Store data permanently
C. Present data from base tables in a new format
D. Create new databases

29. When are parentheses used in SQL expressions?

A. To override operator precedence


B. To enclose column names
C. To define table names
D. To create indexes

30. Which clause orders query results?

A. GROUP BY
B. HAVING
C. ORDER BY
D. SELECT

31. What is a relationship in an ER model?


A. A property of an entity
B. A table name
C. A link between two entities
D. A type of SQL command

32. Which term is used to refer to columns in the relational model?

A. Rows
B. Fields
C. Attributes
D. Tuples
33. What shape is used for entities in ER diagrams?

A. Ellipses
B. Rectangles with rounded corners
C. Diamonds
D. Circles

34. A binary relationship involves how many entities?

A. 1
B. 2
C. 3
D. Unlimited

35. Which of the following is a one-to-many relationship symbol in ER


diagrams?

A. Diamond
B. One bar
C. Crow’s foot
D. Arrow

36. What does modality define in an ER model?

A. Relationship name
B. Attribute value
C. Minimum cardinality
D. ER diagram color

37. What type of data describes the combination of two entities in a many-to-
many relationship?

A. Intersection data
B. Weak data
C. Attribute data
D. Foreign key

38. What type of table is used to represent a many-to-many relationship?

A. Strong entity
B. Weak table
C. Associative entity
D. Reflexive entity
39. Which entity has no identifying attribute of its own?

A. Strong entity
B. Primary entity
C. Weak entity
D. Intersection entity

40. What is used as the primary key for a weak table representing a many-
many relationship?

A. A single foreign key


B. A single attribute
C. A combination of foreign keys
D. No key

41. What is the minimum condition for First Normal Form?

A. All rows are unique


B. All cells contain one value
C. All columns are text
D. The table has no foreign keys

42. Which normal form eliminates dependencies on part of a composite key?

A. First
B. Second
C. Third
D. Boyce-Codd

43. What is the primary reason to normalize a table?

A. Make the table larger


B. Increase redundancy
C. Eliminate data repetition
D. Make it easier to read

44. When is denormalization acceptable?

A. Never
B. For reporting databases
C. Only in First Normal Form
D. When keys are missing

45. Which is NOT a requirement for a good primary key?


A. Unique
B. Stable
C. Descriptive
D. Simple

46. What is the primary benefit of heap tables?

A. Optimized range queries


B. Fast bulk inserts
C. Reduced storage
D. Sorted reads

47. In a heap table, what happens to deleted rows?

A. They’re permanently removed


B. They’re moved to another table
C. The space is marked as free
D. The row is replaced with NULLs

48. What type of queries are sorted tables optimized for?

A. Inserts
B. Deletes
C. ORDER BY queries
D. Joins on non-sort columns

49. Which of the following can act as a sort column in a sorted table?

A. Only primary key


B. Any single column
C. Only foreign keys
D. Any column or group of columns

50. How are rows assigned to buckets in a hash table?

A. Based on alphabetical order


B. By a cluster key
C. Through a hash function
D. Random selection

51. What is a deep bucket?

A. A block with NULL values


B. A bucket with many interleaved tables
C. A chain of many blocks
D. A temporary index

52. What does a dynamic hash function help prevent?

A. Data loss
B. Block fragmentation
C. Deep buckets
D. Row duplication

53. What is the cluster key in a table cluster?

A. A random number
B. A combination of all columns
C. A shared column between interleaved tables
D. A temporary foreign key

54. Why are table clusters poor for queries on columns other than the cluster key?

A. They store only NULLs


B. Rows are randomly distributed
C. Rows must be unlinked
D. Physical row location doesn’t match logical query needs

55. Which structure is least commonly used in modern databases?

A. Heap table
B. Sorted table
C. Hash table
D. Table cluster

You might also like