Question: Home Week 3 : Active Reading zy Section 3 . 2 - BIS 2 4 5 : Database ( 2 0 6 , 8 2

Home
Week 3: Active Reading
zy Section 3.2- BIS 245: Database
(206,827 unread)- brist
learn.zybooks.com/zybook/Database_Essentials_for_Business_with_Lab___11506/chapter/3/section/2
My library > BIS 245: Database Essentials for Business with Lab home >3.2. Foreign keys
PARTICIPATION
ACTIVITY
3.2.6: Add primary and foreign key constraints.
The given SQL creates an Album table and a Song table. The SHOW COLUMNS queries show informatiol Song table columns.
Modify the two CREATE TABLE statements:
Add a primary key constraint to the Album table's ID column.
Add a primary key constraint to the Song table's ID column.
Add a foreign key constraint to the Song table so the AlbumiD column refers to the Album table's ID
-- Add a primary key
CREATE TABLE Album (
ID INT,
Title VARCHAR(60),
ReleaseYear INT
;
.- Add primary and foreign keys
CREATE TABLE Song (
ID INT,
Title VARCHAR(60),
Artist VARCHAR(60),
AlbumID INT
;
 Home Week 3: Active Reading zy Section 3.2- BIS 245: Database

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!