Docsity

WGU D426 Data Management - Applications OA Prep: SQL Queries, Normalization & ERD Modeling, Exams of Database Management Systems (DBMS)

Toggle sidebar
bg1
WGU D440 Data Management - Applications OA Preparation 2026 UPDATE
1. Which SQL clause is used to filter records after an aggregate function has been applied?
A. WHERE
B. ORDER BY
C. GROUP BY
D. HAVING
Answer: D
Rationale: The HAVING clause is used to filter records after they have been grouped by the
GROUP BY clause and aggregate functions have been applied. WHERE filters rows before
grouping.
2. A table is in First Normal Form (1NF). What is the requirement to move it to Second Normal
Form (2NF)?
A. Remove all transitive dependencies.
B. Ensure all non-key attributes are fully functionally dependent on the primary key.
C. Eliminate repeating groups.
D. Define all foreign keys.
Answer: B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download WGU D426 Data Management - Applications OA Prep: SQL Queries, Normalization & ERD Modeling and more Exams Database Management Systems (DBMS) in PDF only on Docsity!

WGU D440 Data Management - Applications OA Preparation 2 026 UPDATE

1. Which SQL clause is used to filter records after an aggregate function has been applied? A. WHERE B. ORDER BY C. GROUP BY D. HAVING Answer: D Rationale: The HAVING clause is used to filter records after they have been grouped by the GROUP BY clause and aggregate functions have been applied. WHERE filters rows before grouping. 2. A table is in First Normal Form (1NF). What is the requirement to move it to Second Normal Form (2NF)? A. Remove all transitive dependencies. B. Ensure all non-key attributes are fully functionally dependent on the primary key. C. Eliminate repeating groups. D. Define all foreign keys. Answer: B

Rationale: To achieve 2NF, a table must be in 1NF and all non-key attributes must be fully dependent on the entire primary key, meaning partial dependencies on a composite key must be removed.

3. Which type of JOIN returns all records when there is a match in either the left or the right table? A. FULL OUTER JOIN B. LEFT JOIN C. RIGHT JOIN D. INNER JOIN Answer: A Rationale: A FULL OUTER JOIN returns all records from both tables, matching them where possible and filling in NULLs where there is no match. 4. Which SQL command is used to add a new column to an existing table? A. ALTER TABLE B. MODIFY TABLE C. UPDATE TABLE D. INSERT INTO Answer: A

7. What is the purpose of a PRIMARY KEY in a database table? A. To link two tables together. B. To sort the data alphabetically by default. C. To allow null values in a column. D. To uniquely identify each record in the table. Answer: D Rationale: A Primary Key is a column or set of columns that uniquely identifies each row in a table. It cannot contain NULL values. 8. Which SQL keyword is used to sort the result-set in descending order? A. SORT B. ASC C. ORDER D. DESC Answer: D Rationale: The DESC keyword is used with the ORDER BY clause to sort data in descending order. 9. What does the ‘Cardinality’ of a relationship describe? A. The number of columns in a table.

B. The data type of a specific attribute. C. The maximum number of times an instance in one entity can relate to instances in another entity. D. The number of rows currently stored in a table. Answer: C Rationale: Cardinality defines the numerical relationship between entities, such as one-to- one, one-to-many, or many-to-many.

10. Which operator is used to search for a specified pattern in a column? A. BETWEEN B. IN C. LIKE D. EXISTS Answer: C Rationale: The LIKE operator is used in a WHERE clause to search for patterns using wildcards such as % and _. 11. Which aggregate function is used to calculate the total number of rows in a table? A. SUM() B. TOTAL()

Answer: D Rationale: DELETE is a DML command that can remove specific rows using WHERE. TRUNCATE is a DDL command that removes all rows from a table and cannot be filtered.

14. Which SQL constraint ensures that all values in a column are different? A. UNIQUE B. CHECK C. NOT NULL D. DEFAULT Answer: A Rationale: The UNIQUE constraint ensures that all values in a column or set of columns are distinct. 15. In SQL, how do you select all columns from a table named ‘Employees’? A. SELECT ALL FROM Employees B. SELECT Employees.* C. GET * FROM Employees D. SELECT * FROM Employees Answer: D

Rationale: The asterisk (*) is the wildcard character used to select all columns in a SELECT statement.

16. What is a ‘Foreign Key’? A. A key used to encrypt data. B. An attribute that is a primary key in another table. C. A key generated by the user. D. A hidden column in a database. Answer: B Rationale: A foreign key is a column or group of columns in one table that provides a link between data in two tables by referencing the primary key of another table. 17. Which normal form requires that there are no ‘Partial Functional Dependencies’? A. 1NF B. 2NF C. 3NF D. 4NF Answer: B Rationale: 2NF requires removing partial functional dependencies, which occur when a non-key attribute depends on only part of a composite primary key.

B. SAVE

C. UPDATE

D. MODIFY

Answer: C Rationale: The UPDATE command is a DML statement used to change the values of existing records in a table.

21. Which concept ensures that a foreign key value must always point to an existing primary key value in the related table? A. Referential Integrity B. Entity Integrity C. Domain Integrity D. User-Defined Integrity Answer: A Rationale: Referential integrity is a database concept that ensures relationships between tables remain consistent. 22. In Crow’s Foot notation, what does a circle near the end of a relationship line indicate? A. Mandatory One B. Optionality (Zero)

C. Mandatory Many D. Primary Key Answer: B Rationale: A circle indicates ‘zero’ or ‘optional’, meaning an instance in the entity is not required to participate in the relationship.

23. Which SQL statement is used to insert new data into a database? A. ADD NEW B. INSERT INTO C. CREATE RECORD D. UPDATE Answer: B Rationale: The INSERT INTO statement is used to add new rows of data to a table. 24. What is the result of a CROSS JOIN between a table with 5 rows and a table with 3 rows? A. 8 rows B. 5 rows C. 15 rows D. 2 rows Answer: C

27. Which clause is used to group rows that have the same values into summary rows? A. GROUP BY B. WHERE C. ORDER BY D. SUMMARIZE Answer: A Rationale: The GROUP BY clause groups rows that have the same values in specified columns into summary rows, often used with aggregate functions. 28. If a column in a table can have values like ‘Red’, ‘Blue’, or ‘Green’ but nothing else, which constraint is most appropriate? A. UNIQUE B. DEFAULT C. CHECK D. NOT NULL Answer: C Rationale: The CHECK constraint is used to limit the value range that can be placed in a column, such as enforcing specific allowed strings. 29. What does ‘1NF’ (First Normal Form) require? A. No transitive dependencies.

B. No partial dependencies. C. A single primary key column. D. Atomic values and no repeating groups. Answer: D Rationale: 1NF requires that all attributes are atomic (no sets or lists) and there are no repeating groups of columns.

30. Which SQL command would you use to grant permissions to a user? A. ALLOW B. GIVE C. PERMIT D. GRANT Answer: D Rationale: GRANT is a Data Control Language (DCL) command used to provide access or privileges on database objects to users. 31. In an ERD, what is a ‘Weak Entity’? A. An entity with no attributes. B. An entity with a large number of rows. C. An entity that has no relationships.

Rationale: CHAR stores a fixed number of characters (padding with spaces if necessary), while VARCHAR stores only the characters provided up to the limit.

34. Which SQL command removes all permissions from a user? A. DENY B. REMOVE C. REVOKE D. TAKE Answer: C Rationale: REVOKE is the DCL command used to withdraw permissions previously granted to a user. 35. What is a ‘Subquery’? A. A query that is written in lowercase. B. A query that runs only on weekends. C. A query nested inside another SQL query. D. A query that only selects one column. Answer: C Rationale: A subquery (or inner query) is a query contained within another SQL statement, such as SELECT, INSERT, UPDATE, or DELETE.

36. In relational algebra, which operation selects specific columns from a table? A. Selection B. Join C. Projection D. Intersection Answer: C Rationale: Projection is the relational algebra operation used to choose a subset of columns from a relation. 37. Which integrity rule states that no part of a primary key can be null? A. Referential Integrity B. Domain Integrity C. Null Integrity D. Entity Integrity Answer: D Rationale: Entity Integrity ensures that each row in a table is uniquely identified and that the primary key column(s) never contain a NULL value. 38. What does a ‘Many-to-Many’ (M:N) relationship require to be implemented in a relational database? A. A direct foreign key in both tables.

Answer: C Rationale: The DISTINCT keyword is used to eliminate duplicate rows from the results of a SELECT query.

41. What is a ‘Database Schema’? A. The physical hardware the database runs on. B. The actual data stored in the rows. C. The logical container or structure that defines the organization of data. D. The password used to access the database. Answer: C Rationale: A database schema is the skeleton structure that represents the logical view of the entire database. 42. What happens if you try to delete a row in a parent table that is referenced by a foreign key in a child table with ‘RESTRICT’ enabled? A. The parent row is deleted and child rows are set to null. B. The parent row is deleted and child rows are also deleted. C. The system deletes the parent row but leaves the child rows orphaned. D. The system prevents the deletion to maintain referential integrity. Answer: D

Rationale: The RESTRICT (or NO ACTION) constraint prevents the deletion of a parent row if there are dependent rows in a child table.

43. Which type of attribute can be divided into smaller sub-parts (e.g., Name into First Name and Last Name)? A. Composite Attribute B. Derived Attribute C. Simple Attribute D. Multi-valued Attribute Answer: A Rationale: A composite attribute is an attribute that can be further subdivided into meaningful components. 44. In SQL, how do you add a record to the ‘Students’ table? A. ADD INTO Students VALUES (…) B. INSERT Students (…) C. NEW RECORD Students (…) D. INSERT INTO Students VALUES (…) Answer: D Rationale: The syntax for adding data is ‘INSERT INTO table_name VALUES (value1, value2, …)’.