• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 61 pages
Exam (elaborations)

WGU D427 Data Management Applications |MYSQL - SQL Programing Test | Intermediate Level with complete solutions | 100% Correct.

Document preview thumbnail
Preview 4 out of 61 pages

WGU D427 Data Management Applications |MYSQL - SQL Programing Test | Intermediate Level with complete solutions | 100% Correct. WGU D427 Data Management Applications |MYSQL - SQL Programing Test | Intermediate Level with complete solutions | 100% Correct.

Content preview

WGU D427 Data Management Applications |MYSQL -
SQL Programing Test | Intermediate Level with
complete solutions | 100% Correct.
Question:

The Movie table has the following columns:
i,- i,- i,- i,- i,- i,-




ID—integer, primary key, i,- i,-




Title—variable-length string, i,-




Genre—variable-length string, i,-




RatingCode—variable-length string, i,-




Year—integer,

Write a SQL statement to create a view named MyMovies that contains
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


the Title, Genre, and Year columns for all movies. Ensure your result set
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


returns the columns in the order indicated.?
i,- i,- i,- i,- i,- i,-




Answer:

CREATE VIEW MyMovies AS i,- i,- i,-




SELECT Title, Genre, Year
i,- i,- i,-




FROM Movie; i,-




Question:
The Movie table has the following columns:
i,- i,- i,- i,- i,- i,-




ID—integer,
Title—variable-length string, i,-

,Genre—variable-length string, i,-




RatingCode—variable-length string, i,-




Year—integer,

Write a SQL statement to modify the Movie table to make the ID column
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-



the primary key.?
i,- i,-




Answer:

ALTER TABLE Movie i,- i,-




ADD PRIMARY KEY (ID);
i,- i,- i,-




Question:
The Movie table has the following columns:
i,- i,- i,- i,- i,- i,-




ID—integer, primary key, i,- i,-




Title—variable-length string, i,-




Genre—variable-length string, i,-




RatingCode—variable-length string, i,-




Year—integer,
The YearStats table has the following columns:
i,- i,- i,- i,- i,- i,-




Year—integer,

TotalGross—bigint unsigned, i,-




Releases—integer,

Write a SQL statement to designate the Year column in the Movie table as
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


a foreign key to the Year column in the YearStats table.?
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-

,Answer:
ALTER TABLE Moviei,- i,-




ADD CONSTRAINT Year FOREIGN KEY (Year)
i,- i,- i,- i,- i,-




References YearStats(Year); i,-




Question:
The Movie table has the following columns:
i,- i,- i,- i,- i,- i,-




ID—integer, primary key, i,- i,-




Title—variable-length string, i,-




Genre—variable-length string, i,-




RatingCode—variable-length string, i,-




Year—integer,

Write a SQL statement to create an index named idx_year on the Year
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-


column of the Movie table.?
i,- i,- i,- i,-




Answer:

CREATE INDEX idx_year ON Movie (Year);
i,- i,- i,- i,- i,-




Question:

The Member table will have the following columns:
i,- i,- i,- i,- i,- i,- i,-




ID—positive integer i,-




FirstName—variable-length string with up to 100 characters, i,- i,- i,- i,- i,- i,- i,-

, MiddleInitial—fixed-length string with 1 character, i,- i,- i,- i,- i,-




LastName—variable-length string with up to 100 characters, i,- i,- i,- i,- i,- i,-




DateOfBirth—date,

AnnualPledge—positive decimal value representing a cost of up to i,- i,- i,- i,- i,- i,- i,- i,- i,-



$999,999, with 2 digits for cents, i,- i,- i,- i,- i,-




Write a SQL statement to create the Member table.
i,- i,- i,- i,- i,- i,- i,- i,-




Do not add any additional constraints to any column beyond what is
i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,- i,-



stated.?

Answer:
CREATE TABLE Member ( i,- i,- i,-




ID INT PRIMARY KEY unsigned,
i,- i,- i,- i,-




FirstName VARCHAR(100), i,-




MiddleInitial CHAR(1), i,-




LastName VARCHAR(100), i,-




DateOfBirth DATE, i,-




AnnualPledge DECIMAL(8, 2) unsigned i,- i,- i,-




);




Question:

The Rating table has the following columns:
i,- i,- i,- i,- i,- i,-




RatingCode—variable-length string, primary key, i,- i,- i,-




RatingDescription—variable-length string, i,-

Document information

Uploaded on
January 31, 2026
Number of pages
61
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
R213,70

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
AcademiaExpert
3,8
(522)
Sold
2031
Followers
767
Items
4530
Last sold
2 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions