WGU D427 Data Management Applications ACTUAL
EXAM QUESTIONS AND ANSWERS 2026/2027 | OA
& Pre-Assessment | Complete Test Bank | Verified
Answers | Pass Guaranteed - A+ Graded
WGU D427 Data Management Applications
OA and Pre-Assessment Simulation
SCHEMA REFERENCE:
Use the following tables for all questions:
Students (StudentID, FirstName, LastName, Email, EnrollmentDate, Major)
Courses (CourseID, CourseCode, CourseName, Credits, Department)
Instructors (InstructorID, FirstName, LastName, Email, HireDate)
Enrollments (EnrollmentID, StudentID, CourseID, InstructorID, Semester, Grade,
EnrollmentDate)
Competency 1: SQL Basics and Data Definition Language (DDL)
Questions 1-15
Question 1
Which SQL statement is used to modify the structure of an existing table by adding a new
column?
A. MODIFY TABLE
B. ALTER TABLE **[CORRECT]**
C. UPDATE TABLE
D. CHANGE TABLE
Correct Answer: B
Rationale: ALTER TABLE is the correct DDL statement for modifying existing table structures,
including adding, modifying, or dropping columns. Distractor A (MODIFY TABLE) is not valid
SQL syntax. Distractor C (UPDATE TABLE) is incorrect because UPDATE is a DML command
for modifying data, not structure. Distractor D (CHANGE TABLE) is not standard SQL syntax.
,2
Question 2
What is the maximum number of PRIMARY KEY constraints that can be defined on a single
table?
A. Unlimited
B. 2
C. 1 **[CORRECT]**
D. 3
Correct Answer: C
Rationale: A table can have only one PRIMARY KEY constraint, which uniquely identifies each
row and cannot contain NULL values. While a table can have multiple UNIQUE constraints,
only one PRIMARY KEY is allowed. Distractors A, B, and D are incorrect because SQL
standards limit PRIMARY KEY to one per table.
Question 3
Which data type would be most appropriate to store a student's GPA with values like 3.85?
A. INT
B. VARCHAR(10)
C. DECIMAL(3,2) **[CORRECT]**
D. DATE
Correct Answer: C
Rationale: DECIMAL(3,2) is optimal for GPA values because it stores 3 total digits with 2
decimal places (e.g., 3.85, 4.00). Distractor A (INT) cannot store decimal values. Distractor B
(VARCHAR) stores text, making mathematical operations difficult. Distractor D (DATE) is for
temporal data only.
Question 4
What happens when you execute DROP TABLE Students;?
A. Only the data is deleted, table structure remains
B. The table structure and all data are permanently removed **[CORRECT]**
C. The table is renamed to "Students_old"
D. Only the constraints are removed
,3
Correct Answer: B
Rationale: DROP TABLE is a DDL command that permanently removes both the table structure
and all associated data, indexes, triggers, and constraints. Distractor A describes TRUNCATE
TABLE. Distractor C describes no standard SQL operation. Distractor D is incorrect as
constraints are removed with the table.
Question 5
Which SQL command creates a table with a composite primary key consisting of StudentID and
CourseID?
A. CREATE TABLE Enrollment (StudentID INT PRIMARY KEY, CourseID INT PRIMARY
KEY);
B. CREATE TABLE Enrollment (StudentID INT, CourseID INT, PRIMARY KEY (StudentID,
CourseID)); **[CORRECT]**
C. CREATE TABLE Enrollment (StudentID INT PRIMARY KEY, CourseID INT FOREIGN
KEY);
D. CREATE TABLE Enrollment (StudentID INT UNIQUE, CourseID INT UNIQUE);
Correct Answer: B
Rationale: A composite primary key is defined at the table level by listing multiple columns in
the PRIMARY KEY constraint. Distractor A attempts two PRIMARY KEY constraints, which is
invalid. Distractor C incorrectly uses FOREIGN KEY syntax. Distractor D creates two separate
unique constraints, not a composite key.
Question 6
What is the purpose of the UNIQUE constraint?
A. Ensures the column cannot contain NULL values
B. Ensures all values in the column are different **[CORRECT]**
C. Establishes a relationship between tables
D. Automatically increments the column value
Correct Answer: B
Rationale: UNIQUE ensures no duplicate values exist in the column (except multiple NULLs in
some DBMS). Distractor A describes NOT NULL. Distractor C describes FOREIGN KEY.
Distractor D describes AUTO_INCREMENT or IDENTITY.
Question 7
, 4
Which statement correctly adds a CHECK constraint to ensure Credits in the Courses table is
always greater than 0?
A. ALTER TABLE Courses ADD CONSTRAINT chk_credits CHECK (Credits > 0);
**[CORRECT]**
B. ALTER TABLE Courses MODIFY Credits CHECK > 0;
C. UPDATE Courses SET CHECK (Credits > 0);
D. CREATE CHECK ON Courses (Credits > 0);
Correct Answer: A
Rationale: The correct syntax uses ALTER TABLE with ADD CONSTRAINT, naming the
constraint and specifying the CHECK condition. Distractor B uses incorrect MODIFY syntax.
Distractor C incorrectly places CHECK in an UPDATE statement. Distractor D uses invalid
CREATE CHECK syntax.
Question 8
What is the result of executing CREATE TABLE NewStudents AS SELECT * FROM Students;?
A. An error because AS SELECT is not valid syntax
B. A new table NewStudents is created with structure and data copied from Students
**[CORRECT]**
C. Only the table structure is copied, no data
D. The Students table is renamed to NewStudents
Correct Answer: B
Rationale: CREATE TABLE...AS SELECT (CTAS) creates a new table with both the structure
and data from the source table. Distractor A is incorrect as this is standard SQL. Distractor C
would require additional syntax like WHERE 1=0. Distractor D describes RENAME TABLE.
Question 9
Which data type should be used to store the CourseCode 'D427'?
A. INT
B. CHAR(4) **[CORRECT]**
C. DATE
D. DECIMAL(4,0)
Correct Answer: B