3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
WGU D427 Data Management –Applications | SQL Programing -
Intermediate Level | Explore New 107 Questions and Answers|2025
Update | 100% Correct.
Correct
Incorrect
D427
107 Correct terms
Questions and Answers
Year—integer,
Year—integer,
,3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
Write a SQL statement to designate the Year column in the Book
table as a foreign key to the Year column in the TotalSales table.
Give this one a go later!
ALTER Table Movie
ADD Producer Varchar(50),
ALTER TABLE Movie
Drop Genre,
ADD PRIMARY KEY (ID);
CHANGE Year ReleaseYear
SMALLINT;
SELECT COUNT(*) ALTER TABLE Book
FROM Book ADD FOREIGN KEY (Year)
WHERE Year = 2019; REFERENCES YearSales (Year);
Don't know?
2 of 107
Definition
SELECT * FROM Book;
Give this one a go later!
The Movie table has the following columns:
ID—integer, primary key,
Title—variable-length string,
Genre—variable-length string,
RatingCode—variable-length string,
Year—integer,
Write a SQL statement to delete the row with the ID value of 3 from the Movie
table.
,3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
The database contains a table named Book.
Write a SQL query to return all data from the Book table without directly
referencing any column names.
The Book table has the following columns:
ID—integer, primary key, auto_increment,
Title—variable-length string,
Genre—variable-length string,
Year—integer ,
Write a SQL statement to delete the row with the ID value of 3 from the Book
table.
JOIN clause to select all the records from the Customers table plus all the
matches in the Orders table.
Don't know?
3 of 107
Term
CREATE TABLE Invoice (
invoice_id INT NOT NULL AUTO_INCREMENT,
date DATE NOT NULL,
customer_id INT NOT NULL,
PRIMARY KEY (invoice_id),
FOREIGN KEY (customer_id) REFERENCES Customer (customer_id)
ON DELETE RESTRICT
);
Looking at the Customer and Invoice tables and the CREATE TABLE
for the Invoice table with foreign key reference statement above,
, 3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
what would happen to invoices in the Invoice table that are linked to
a customer if that customer is deleted.
Give this one a go later!
Those invoices would be deleted Those invoices would remain in the
also. database.
The customer id for those invoices The delete of the Customer
would be changed to null. would not be allowed.
Don't know?
4 of 107
Definition
ALTER TABLE Orders
ADD FOREIGN KEY (PersonID) REFERENCES Persons(PersonID);
Give this one a go later!
Create a unique constraint on the Create a Primary Key constraint on
"personid" column in the "persons" the "orderid" column in the "orders"
table table
Create a FOREIGN KEY
Create an index on the "personid"
constraint on the "PersonID"
column in the "orders" table
column in the "Orders" table
WGU D427 Data Management –Applications | SQL Programing -
Intermediate Level | Explore New 107 Questions and Answers|2025
Update | 100% Correct.
Correct
Incorrect
D427
107 Correct terms
Questions and Answers
Year—integer,
Year—integer,
,3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
Write a SQL statement to designate the Year column in the Book
table as a foreign key to the Year column in the TotalSales table.
Give this one a go later!
ALTER Table Movie
ADD Producer Varchar(50),
ALTER TABLE Movie
Drop Genre,
ADD PRIMARY KEY (ID);
CHANGE Year ReleaseYear
SMALLINT;
SELECT COUNT(*) ALTER TABLE Book
FROM Book ADD FOREIGN KEY (Year)
WHERE Year = 2019; REFERENCES YearSales (Year);
Don't know?
2 of 107
Definition
SELECT * FROM Book;
Give this one a go later!
The Movie table has the following columns:
ID—integer, primary key,
Title—variable-length string,
Genre—variable-length string,
RatingCode—variable-length string,
Year—integer,
Write a SQL statement to delete the row with the ID value of 3 from the Movie
table.
,3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
The database contains a table named Book.
Write a SQL query to return all data from the Book table without directly
referencing any column names.
The Book table has the following columns:
ID—integer, primary key, auto_increment,
Title—variable-length string,
Genre—variable-length string,
Year—integer ,
Write a SQL statement to delete the row with the ID value of 3 from the Book
table.
JOIN clause to select all the records from the Customers table plus all the
matches in the Orders table.
Don't know?
3 of 107
Term
CREATE TABLE Invoice (
invoice_id INT NOT NULL AUTO_INCREMENT,
date DATE NOT NULL,
customer_id INT NOT NULL,
PRIMARY KEY (invoice_id),
FOREIGN KEY (customer_id) REFERENCES Customer (customer_id)
ON DELETE RESTRICT
);
Looking at the Customer and Invoice tables and the CREATE TABLE
for the Invoice table with foreign key reference statement above,
, 3/22/25, 2:39 AM Data Management - Applications D427 - MYSQL - SQL Programing - Intermediate Level
what would happen to invoices in the Invoice table that are linked to
a customer if that customer is deleted.
Give this one a go later!
Those invoices would be deleted Those invoices would remain in the
also. database.
The customer id for those invoices The delete of the Customer
would be changed to null. would not be allowed.
Don't know?
4 of 107
Definition
ALTER TABLE Orders
ADD FOREIGN KEY (PersonID) REFERENCES Persons(PersonID);
Give this one a go later!
Create a unique constraint on the Create a Primary Key constraint on
"personid" column in the "persons" the "orderid" column in the "orders"
table table
Create a FOREIGN KEY
Create an index on the "personid"
constraint on the "PersonID"
column in the "orders" table
column in the "Orders" table