Free Data-Management-Foundations Exam Braindumps
WGU Data Management - Foundations Questions 16–20 (page: 5)

Updated On: 11-Feb-2026

Which type of join is demonstrated by the following query?

sql

SELECT *

FROM Make, Model

WHERE Make.ModelID = Model.ID;

  1. NON-EQUIJOIN
  2. SELF JOIN
  3. EQUIJOIN
  4. CROSS JOIN

Answer(s): C

Explanation:

This query performs a join operation where records from the Make table and Model table are combined based on the condition Make.ModelID = Model.ID. This condition tests for equality, which is the definition of an EQUIJOIN.

Types of Joins in SQL:

EQUIJOIN (Correct Answer):

Uses an equality operator (=) to match rows between tables.

Equivalent to an INNER JOIN ON condition.

Example:

sql

SELECT *

FROM Employees

JOIN Departments ON Employees.DeptID = Departments.ID;

NON-EQUIJOIN (Incorrect):

Uses comparison operators other than = (e.g., <, >, BETWEEN).

Example:

sql

SELECT *

FROM Employees e

JOIN Salaries s ON e.Salary > s.MedianSalary;

SELF JOIN (Incorrect):

A table is joined with itself using table aliases.

Example:

sql

SELECT e1.Name, e2.Name AS Manager

FROM Employees e1

JOIN Employees e2 ON e1.ManagerID = e2.ID;

CROSS JOIN (Incorrect):

Produces Cartesian product (each row from Table A combines with every row from Table B).

Example:

sql

SELECT *

FROM Employees

CROSS JOIN Departments;

Thus, since our given query uses an equality condition (=) to join two tables, it is an EQUIJOIN.


Reference:

SQL Joins in relational databases.



Which optional clause is used to reject inserts and updates that do not satisfy the WHERE clause of a view query?

  1. WITH CHECK OPTION
  2. JOIN VIEWS
  3. MATERIALIZED VIEW
  4. BASE TABLE

Answer(s): A

Explanation:

When a VIEW is created in SQL, users may insert or update data through that view. However, if a row is inserted or updated in such a way that it violates the condition of the VIEW's WHERE clause, it can lead to inconsistencies.

To prevent such unwanted modifications, SQL provides the WITH CHECK OPTION clause.

How WITH CHECK OPTION Works:

Ensures that any new data (INSERT/UPDATE) still fits within the defined constraints of the VIEW.

If a user tries to insert or update a row that would not appear in the VIEW, the operation is rejected.

Example:

sql

CREATE VIEW HighSalaryEmployees AS

SELECT * FROM Employees WHERE Salary > 50000

WITH CHECK OPTION;

Now, if someone attempts:

sql

INSERT INTO HighSalaryEmployees (ID, Name, Salary)

VALUES (101, 'Alice', 30000);

This fails because 30000 does not satisfy Salary > 50000.

Why Other Options Are Incorrect:

Option B (Incorrect): JOIN VIEWS is not a valid SQL clause.

Option C (Incorrect): MATERIALIZED VIEW refers to stored views in some databases, but it does not reject incorrect inserts/updates.

Option D (Incorrect): BASE TABLE refers to the original table from which a VIEW is created.

Thus, the correct answer is WITH CHECK OPTION, which ensures that only valid data modifications occur.


Reference:

View restrictions in SQL.



Which keyword determines if a value is within a range of values?

  1. LIKE
  2. IN
  3. OR
  4. BETWEEN

Answer(s): D

Explanation:

The BETWEEN keyword in SQL is used to filter values within a specified range. It is particularly useful for numeric and date-based queries.

Syntax of BETWEEN:

sql

SELECT * FROM Employees WHERE Salary BETWEEN 50000 AND 100000;

Retrieves all employees whose salary is between $50,000 and $100,000 (inclusive).

Why Other Options Are Incorrect:

Option A (LIKE) (Incorrect): Used for pattern matching with wildcards (%, _). Example:

sql

SELECT * FROM Customers WHERE Name LIKE 'A%';

Option B (IN) (Incorrect): Used to match a value in a specified set, but not a range. Example:

sql

SELECT * FROM Employees WHERE Department IN ('HR', 'Finance', 'IT');

Option C (OR) (Incorrect): Used for logical conditions, but does not check a range. Example:

sql

SELECT * FROM Products WHERE Price < 10 OR Price > 50;

Thus, the correct choice is BETWEEN for filtering values within a range.


Reference:

SQL WHERE and BETWEEN operations.



Which keyword or clause indicates the desired sequence when displaying a set of records returned from a SELECT statement?

  1. BETWEEN
  2. DISTINCT
  3. ORDER BY
  4. LIKE

Answer(s): C

Explanation:

The ORDER BY clause in SQL is used to sort query results in ascending (ASC) or descending (DESC) order.

Example Usage:

sql

SELECT Name, Salary FROM Employees ORDER BY Salary DESC;

This retrieves all employees, sorted by salary in descending order.

Why Other Options Are Incorrect:

Option A (BETWEEN) (Incorrect): Used for filtering ranges but does not order results.

Option B (DISTINCT) (Incorrect): Removes duplicate rows but does not control order.

Option D (LIKE) (Incorrect): Used for pattern matching, not sorting.

Thus, ORDER BY is the correct choice for defining the sequence of query results.


Reference:

SQL Sorting with ORDER BY.



Which function measures a numeric value's distance from 0?

  1. CONCAT
  2. LOWER
  3. FROM
  4. ABS

Answer(s): D

Explanation:

The ABS() function in SQL returns the absolute value of a given number, effectively measuring its distance from zero.

Example Usage:

sql

SELECT ABS(-50), ABS(50);

Result:

50 | 50

This function ensures that numbers are always positive, regardless of their original sign.

Why Other Options Are Incorrect:

Option A (CONCAT) (Incorrect): Used to combine strings (not numbers).

Option B (LOWER) (Incorrect): Converts text to lowercase, not numerical operations.

Option C (FROM) (Incorrect): Part of SELECT FROM queries, not a function.

Thus, the correct choice is ABS(), which computes the absolute value of a number.


Reference:

SQL Numeric Functions.



Viewing page 5 of 13
Viewing questions 21 - 25 out of 60 questions


Post your Comments and Discuss WGU Data-Management-Foundations exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!