The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the Album and Song table columns. Modify the two CREATE TABLE statements: 1. Add a primary key constraint to the Album table's ID column. 2. Add a primary key constraint to the Song table's ID column. 3. Add a foreign key constraint to the Song table so the AlbumID column refers to the Album table's ID column. 1 Add a primary key 2 CREATE TABLE Album ( 3 ID INT, 4 Title VARCHAR(60), 5 ReleaseYear INT 6); 7 8 9 CREATE TABLE Song ( 10 ID INT, -- Add primary and foreign keys 11 Title VARCHAR(60), 12 Artist VARCHAR (60), 13 AlbumID INT 14); 15 16 SHOW COLUMNS 17 FROM Album; 18 19 SHOW COLUMNS 20 FROM Song; The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the Album and Song table columns. Modify the two CREATE TABLE statements: 1. Add a primary key constraint to the Album table's ID column. 2. Add a primary key constraint to the Song table's ID column. 3. Add a foreign key constraint to the Song table so the AlbumID column refers to the Album table's ID column. 1 Add a primary key 2 CREATE TABLE Album ( 3 ID INT, 4 Title VARCHAR(60), 5 ReleaseYear INT 6); 7 8 9 CREATE TABLE Song ( 10 ID INT, -- Add primary and foreign keys 11 Title VARCHAR(60), 12 Artist VARCHAR(60), 13 AlbumID INT 14); 15 16 SHOW COLUMNS 17 FROM Album; 18 19 SHOW COLUMNS 20 FROM Song; The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the Album and Song table columns. Modify the two CREATE TABLE statements: 1. Add a primary key constraint to the Album table's ID column. 2. Add a primary key constraint to the Song table's ID column. 3. Add a foreign key constraint to the Song table so the AlbumID column refers to the Album table's ID column. 1 Add a primary key 2 CREATE TABLE Album ( 3 ID INT, 4 Title VARCHAR(60), 5 ReleaseYear INT 6); 7 8 9 CREATE TABLE Song ( 10 ID INT, -- Add primary and foreign keys 11 Title VARCHAR(60), 12 Artist VARCHAR (60), 13 AlbumID INT 14); 15 16 SHOW COLUMNS 17 FROM Album; 18 19 SHOW COLUMNS 20 FROM Song; The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the Album and Song table columns. Modify the two CREATE TABLE statements: 1. Add a primary key constraint to the Album table's ID column. 2. Add a primary key constraint to the Song table's ID column. 3. Add a foreign key constraint to the Song table so the AlbumID column refers to the Album table's ID column. 1 Add a primary key 2 CREATE TABLE Album ( 3 ID INT, 4 Title VARCHAR(60), 5 ReleaseYear INT 6); 7 8 9 CREATE TABLE Song ( 10 ID INT, -- Add primary and foreign keys 11 Title VARCHAR(60), 12 Artist VARCHAR(60), 13 AlbumID INT 14); 15 16 SHOW COLUMNS 17 FROM Album; 18 19 SHOW COLUMNS 20 FROM Song;
Expert Answer:
Answer rating: 100% (QA)
To modify the CREATE TABLE statements to add a primary key constraint to the Album tables ID column ... View the full answer
Related Book For
Using Microsoft Excel and Access 2016 for Accounting
ISBN: 978-1337109048
5th edition
Authors: Glenn Owen
Posted Date:
Students also viewed these databases questions
-
Manufacturing A ball manufacturer produces soccer balls, footballs, and volleyballs. The manager feels that restricting the types of balls produced could increase revenue. The following table gives...
-
Write project about the capital structure of Amazon or any publicly traded company and the M&M theory of capital structure. project should consist of The I-Abstract II - Table of Contents III -...
-
Carol Harris, Ph.D, CPA, is a single taxpayer and she lives at 674 Yankee Street, Durham, NC 27409. Her Social Security number is 793-52-4335. Carol is an Associate Professor of Accounting at a local...
-
The following information is available for Marigold's Hot Dogs: Actual production Budgeted production Standard direct labor hours Actual direct labor hours Standard variable overhead rate Actual...
-
The Snorkel Co. produces the articulating boom platform that can support weight W. If the boom is in the position shown, determine the moment of this force about points A, B, and C. Units Used: kip =...
-
Multiply and simplify (7t-2) (6t+7)+3t - 6
-
Home Realty, Incorporated, has been operating for three years and is owned by three investors. J. Doe owns 60 percent of the total outstanding stock of 9,000 shares and is the managing executive in...
-
At the beginning of 2009, Metatec Inc. acquired Ellison Technology Corporation for $600 million. In addition to cash, receivables, and inventory, the following assets and their fair values were also...
-
Question 1 Based on the details shared in the video, come up with various criteria based on which Protinex could do segmentation. Additionally, provide your rationale for it. Mention at least three...
-
Following are separate financial statements of Michael Company and Aaron Company as of December 31, 2013 (credit balances indicated by parentheses). Michael acquired all of Aarons outstanding voting...
-
Chaz Corporation has taxable income in 2021 of $315,800 for purposes of computing the $179 expense and acquired the following assets during the year: Asset Placed in Service September 12 Office...
-
Why would the market economy produce too little education?
-
Rex Redd purchased a business building on January 1, 2004, for \(\$ 975,000\) and used the straight-line depreciation over 39 years. He took \(\$ 25,000\) depreciation for 2004 through 2015 and none...
-
What is the irradiance at the position of the third maximum for a single slit of width \(0.02 \mathrm{~mm}\) ?
-
Suppose Caterpillar, Inc., has 666 million shares outstanding with a share price of $73.09 and $24.41 billion in debt. If in three years, Caterpillar has 709 million shares outstanding trading for...
-
Do these numbers tell us anything about the relative size of their labor force participation rates and employment-to-population ratios? The IMF World Economic Outlook reports the following...
-
2. Let (an) and (b) be two sequences with a and b, either both converge or both diverge. R=1 DO (2) (b) 3. Use the comparison test with examples from class to decide whether the following series are...
-
2. Assume a person bends forward to lift a load "with his back" as shown in Figure P12.42a. The person's spine piv- ots mainly at the fifth lumbar vertebra, with the principal supporting force...
-
Create action queries for What SUP. (Use the Ch11-02 student file, or use the file you used in answering the previous question.) a. Create and run an update query that increases the unit price for...
-
What do liquidity ratios represent?
-
Edit select queries for What SUP. (Use the Ch11-02 student file, or use the file you used in answering the previous question.) a. Edit Query1 by adding the field PostalCode from the Supplier Tableand...
-
Determine the irrep content for the equivalent reducible \(S_{3}\) representations \(\Gamma^{(4)}\) and \(\Gamma^{(5)}\) of Fig. 2.4 . Data from Fig. 2.4 F(1) (2) 1 (3) (4) r(5) (6) 1 0 0 0 0 0 0 1 0...
-
Prove that the direct product of two representations is a representation, and that the character of the direct product is the product of characters for the representations.
-
Demonstrate explicitly that for invariant subgroups the cosets form a group under the coset multiplication law (2.27).
Study smarter with the SolutionInn App