WGU Data Management - Foundations (D426) Exam Questions

Page: 1 / 14
Total 60 questions
Question 1

Which property of an entity can become a column in a table?



Answer : C

In database design, attributes of an entity become columns in a relational table.

Example Usage:

For an Employee entity, attributes might include:

CREATE TABLE Employees (

EmployeeID INT PRIMARY KEY,

Name VARCHAR(50),

Salary DECIMAL(10,2),

DepartmentID INT

);

Each attribute (e.g., Name, Salary) becomes a column in the table.

Why Other Options Are Incorrect:

Option A (Modality) (Incorrect): Describes optional vs. mandatory relationships, not table structure.

Option B (Uniqueness) (Incorrect): Ensures distinct values but is not a column property.

Option D (Non-null values) (Incorrect): Ensures that columns must contain data but does not define attributes.

Thus, the correct answer is Attribute, as attributes of entities become table columns.


Question 2

What is a common error made while inserting an automatically incrementing primary key?



Answer : A

In databases, primary keys are often set to auto-increment so that new rows automatically receive unique values. However, one common error is manually inserting a value into an auto-incremented primary key column, which overrides the automatic numbering and may cause conflicts.

Example of Auto-Increment Setup:

sql

CREATE TABLE Users (

UserID INT AUTO_INCREMENT PRIMARY KEY,

Username VARCHAR(50)

);

Incorrect Insert (Error-Prone Approach):

sql

INSERT INTO Users (UserID, Username) VALUES (100, 'Alice');

This manually overrides the auto-increment, which can lead to duplicate key errors.

Correct Insert (Avoiding Errors):

sql

INSERT INTO Users (Username) VALUES ('Alice');

The database assigns UserID automatically, preventing conflicts.

Why Other Options Are Incorrect:

Option B (Failing to set a numeric value) (Incorrect): The database automatically assigns values when AUTO_INCREMENT is used.

Option C (Designating multiple primary keys) (Incorrect): While incorrect, most databases will prevent this at creation time.

Option D (Forgetting to specify which is the auto-increment column) (Incorrect): If AUTO_INCREMENT is set, the database handles numbering automatically.

Thus, the most common error is Inserting a value and overriding auto-increment, which can cause duplicate key errors and data inconsistencies.


Question 3

Which elements are represented by attributes in the database design documents?



Answer : B

Attributes in a database represent the properties (names, values, or characteristics) of an entity.

Example Usage:

In a Students table, attributes might include:

StudentID (Primary Key), Name, Age, Major

Here, Name is an attribute describing the entity Student.

Why Other Options Are Incorrect:

Option A (Synonyms) (Incorrect): Synonyms in SQL allow different names for the same object but are not attributes.

Option C (Repositories) (Incorrect): A repository stores data but does not define attributes.

Option D (Relationships) (Incorrect): Relationships define connections between entities, not their attributes.

Thus, the correct answer is Names, as attributes define entity properties.


Question 4

Which syntax feature classifies the explicit string, numeric, or binary values used in SQL queries?



Answer : A

In SQL, literals represent explicit values such as numbers, strings, or binary data directly written into queries. For example:

SELECT * FROM Employees WHERE Salary > 50000;

Here, 50000 is a numeric literal.

Option A (Correct): Literals are explicit values used in SQL queries, such as 123, 'John Doe', and TRUE.

Option B (Incorrect): Comments are non-executable text used for documentation within SQL code, typically denoted by -- or /* ... */.

Option C (Incorrect): Identifiers are names of tables, columns, or other database objects, such as EmployeeID.

Option D (Incorrect): Keywords are reserved words in SQL (e.g., SELECT, FROM, WHERE) that define operations and syntax.


Question 5

Which SELECT statement uses valid syntax for SQL?



Answer : D

A valid SELECT statement in SQL follows this basic syntax:

sql

SELECT column1, column2

FROM table_name

WHERE condition;

The correct option D follows this syntax correctly.

Why Other Options Are Incorrect:

Option A (Incorrect): SQL does not use double quotes (') around column/table names unless explicitly required in some databases.

Option B (Incorrect): The WHERE clause must appear after the FROM clause.

Option C (Incorrect): ALL is not a valid keyword in standard SQL queries.

Thus, Option D follows the correct SQL syntax.


Question 6

What is the first step of the analysis phase for designing a database?



Answer : B

The first step in database analysis is identifying entities, which are the real-world objects that need to be represented in the database.

Example Usage:

In a school system, the main entities could be:

Students, Courses, Instructors

Why Other Options Are Incorrect:

Option A (Determine cardinality) (Incorrect): Determining relationships comes after identifying entities.

Option C (Draw an ER diagram) (Incorrect): ER diagrams visualize entities but are not the first step.

Option D (Implement attributes) (Incorrect): Attributes are defined after entities are identified.

Thus, the correct answer is Identify entities, as entities form the foundation of the database model.


Question 7

Which statement uses valid syntax for the DELETE statement in SQL?



Answer : B

The correct syntax for deleting records from a table in SQL is:

sql

DELETE FROM table_name WHERE condition;

This deletes only the rows that match the condition.

Example Usage:

sql

DELETE FROM Employees WHERE Salary < 30000;

Deletes all employees earning less than $30,000.

Why Other Options Are Incorrect:

Option A (Incorrect): Missing FROM keyword. The correct syntax is DELETE FROM table_name.

Option C (Partially Correct): DELETE FROM table_name; deletes all rows, but it lacks a WHERE clause.

Option D (Incorrect): DELETE * is not valid in SQL. The correct command is just DELETE FROM.

Thus, the correct answer is DELETE FROM table_name WHERE condition;.


Page:    1 / 14   
Total 60 questions