Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the Album and Song table columns.

The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show information about the 

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;

Step by Step Solution

3.44 Rating (144 Votes )

There are 3 Steps involved in it

Step: 1

To modify the CREATE TABLE statements to add a primary key constraint to the Album tables ID column ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Using Microsoft Excel and Access 2016 for Accounting

Authors: Glenn Owen

5th edition

1337109048, 1337109045, 1337342149, 9781337342148 , 978-1337109048

More Books

Students also viewed these Databases questions

Question

What is the biggest strength of the program?

Answered: 1 week ago

Question

What do liquidity ratios represent?

Answered: 1 week ago