Labs 8 assessment test
1.8.1 Practice Lab 1
The Member table will have the following columns:
ID—positive integer
FirstName—variable-length string with up to 100 characters
MiddleInitial—fixed-length string with 1 character LastName
—variable-length string with up to 100 characters
DateOfBirth—date
AnnualPledge—positive decimal value representing a cost of up to $999,999,
with 2 digits for cents
Write a SQL statement to create the Member table.
Do not add any additional constraints to any column beyond wha: CREATE
TABLE Member (
ID INT UNSIGNED,
FirstName VARCHAR(100),
MiddleInitial CHAR(1),
LastName VARCHAR(100),
DateOfBirth DATE,
AnnualPledge DECIMAL(8,2) UNSIGNED
);
2.8.2 Practice Lab 2
The Rating table has the following columns: RatingCode
—variable-length string, primary key RatingDescription—
variable-length string
The Movie table should have the following columns: Title
—variable-length string, maximum 30 characters
RatingCode—variable-length string, maximum 5
characters
Write a SQL statement to create the Movie table. Designate the
RatingCode column in the Movie table as a foreign key to the
RatingCodecolumn in the Rating table.: CREATE TABLE Movie (
Title VARCHAR(30),
RatingCode VARCHAR(5),
FOREIGN KEY (RatingCode) REFERENCES Rating(RatingCode)
1/
8
, WGU - D427 Data Management - Applications
);
Labs 8 assessment test
2/
8