D 427 / D427 Objective Assessment (Latest
Update ) Data Management –
Applications | Questions and Answers | Grade
A | 100% Correct (Verified Answers).WGU
1. A database has a view named MovieView.
Write a SQL statement to delete the view named MovieView from the
database.: DROP VIEW MovieView;
2. The Movie table has the following columns:
ID—integer
Title—variable-length string
Genre—variable-length string
RatingCode—variable-length string
Year—integer
Write a SQL statement to modify the Movie table to make the ID column
the primary key.: ALTER TABLE Movie
ADD PRIMARY KEY (ID);
, D427
3. 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
The YearStats table has the following columns:
Year—integer
TotalGross—bigint unsigned
Releases—integer
4. Write a SQL statement to designate the Year column in the Movie
table as a foreign key to the Year column in the YearStats table.:
ALTER TABLE Movie
ADD FOREIGN KEY (Year)
REFERENCES YearStats(Year);
5. The Movie table has the following columns:
ID—integer, primary key
Title—variable-length string
, D427
Genre—variable-length string
RatingCode—variable-length string
Year—integer
6. Write a SQL statement to create an index named idx_year on the Year
column of the Movie table.: CREATE INDEX idx_year ON
Movie(Year); 9. The Movie table has the following columns:
ID—integer, primary key, auto-increment
Title—variable-length string
Genre—variable-length string
RatingCode—variable-length string
Year—integer
The following data needs to be added to the Movie table:
Title Genre RatingCode YearPride
Prejudice Romance G 2005
7. Write a SQL statement to insert the indicated data into the Movie
table.: IN-
SERT INTO Movie (Title, Genre, RatingCode, Year)
, D427
VALUES ('Pride and Prejudice', 'Romance', 'G',
2005); 10. 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
8. Write a SQL statement to delete the row with the ID value of 3 from
the Movie table.: DELETE FROM Movie
WHERE ID = 3;
9. 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