Closed piercebhunt closed 4 years ago
//Add a new band INSERT INTO “Band” (“Id”, “Name”, “CountryOfOrigin”, “NumberOfMembers”, “Website”, “Style”, “IsSigned”, “ContactName”, “ContactPhoneNumber”) VALUES (1, ‘Linkin Park’, ‘USA’, 3, ‘linkinpark.com’, ‘Rock’, ‘Yes’, “IDK’, ‘8134556789’);
// View all the bands SELECT * FROM “Band”;
//Add an album for a band
//Let a band go UPDATE “Band” SET “isSigned” = false;
//Resign a band UPDATE “Band” SET “isSigned” = true;
//Given a band name, view all their albums
//View all albums ordered by ReleaseDate SELECT * FROM “Albums” ORDER BY “ReleaseDate” ;
//View all bands that are signed SELECT * FROM “Band” WHERE “isSigned” = true;
//View all bands that are not signed SELECT * FROM “Band” WHERE “isSigned” = false;
Looks good!
Your homework 03 - 02 - Rhythm's gonna get you - ERD was marked: Meets Expectations
“Well done!”
Rhythm's gonna get you - ERD
For this project, we will model and create a database. We are starting a record label company, and we a place to store our bands, albums, and eventually songs. You are creating a console app that stores our information in a database.
Objectives
Requirements
Create the ERD (Entity Relationship Diagram) and resulting tables that allows a user to store and manage the company's bands, albums, and (eventually) songs.
How to turn in this assignment.
Explorer Mode
[ ] Create an ERD for
Albums
, andBands
. They should have the following properties, use your best judgment for types.[ ] Album
Id
Title
IsExplicit
ReleaseDate
[ ] Band
Id
Name
CountryOfOrigin
NumberOfMembers
Website
Style
IsSigned
ContactName
ContactPhoneNumber
Add ERD relationships that show:
[ ] One Band has many Albums
Create SQL statements that:
[ ] Add a new band
[ ] View all the bands
[ ] Add an album for a band
[ ] Let a band go (update isSigned to false)
[ ] Resign a band (update isSigned to true)
[ ] Given a band name, view all their albums
[ ] View all albums ordered by ReleaseDate
[ ] View all bands that are signed
[ ] View all bands that are not signed
ALTERNATIVES