Question: Building a Multi-Table DB with Relationships In this assignment, you will build a copy of the "Music" database covered in lecture. You will populate your database with tracks, artists, albums and genres that are different from the ones used in class. You must include three artists, five albums, and 20 tracks in your data. Choose a genre for each track. Your tables need to normalized as described in class. Then you must construct and run some queries on your data and then take screen shots of those queries and submit the screen shots as your assignment. Artist artist_id name Album album_id title artist_id Genre genre_id name Track track_id title rating len count album_id genre_id What to Hand in For this assignment you will hand in: 1. Screen shot (JPG or PNG) of data in the Track table 2. Screen shot (JPG or PNG) of all the data joined up sorted in ascending order by the album title 3. Screen shot (JPG or PNG) of all of the genres for a particular artist. Hint - use JOIN, DISTINCT and WHERE

Fundamentals of Information Systems
9th Edition
ISBN:9781337097536
Author:Ralph Stair, George Reynolds
Publisher:Ralph Stair, George Reynolds
Chapter3: Database Systems And Big Data
Section: Chapter Questions
Problem 4PSE
icon
Related questions
Question

Question: Building a Multi-Table DB with Relationships

 

(Include the tables creation query)

(Include the tables creation query)

(Include the tables creation query)

 

In this assignment, you will build a copy of the "Music" database covered in lecture. You will populate your database with tracks, artists, albums and genres that are different from the ones used in class. You must include three artists, five albums, and 20 tracks in your data. Choose a genre for each track. Your tables need to normalized as described in class.

Then you must construct and run some queries on your data and then take screen shots of those queries and submit the screen shots as your assignment.

Question: Building a Multi-Table DB with Relationships
In this assignment, you will build a copy of the "Music" database covered in
lecture. You will populate your database with tracks, artists, albums and
genres that are different from the ones used in class. You must include three
artists, five albums, and 20 tracks in your data. Choose a genre for each
track. Your tables need to normalized as described in class.
Then you must construct and run some queries on your data and then take
screen shots of those queries and submit the screen shots as your
assignment.
Artist
artist_id
name
Album
album_id
title
artist_id
Genre
genre_id
name
Track
track_id
title
rating
len
count
album_id
genre_id
What to Hand in
For this assignment you will hand in:
1. Screen shot (JPG or PNG) of data in the Track table
2. Screen shot (JPG or PNG) of all the data joined up sorted in
ascending order by the album title
3. Screen shot (JPG or PNG) of all of the genres for a particular artist.
Hint - use JOIN, DISTINCT and WHERE
Transcribed Image Text:Question: Building a Multi-Table DB with Relationships In this assignment, you will build a copy of the "Music" database covered in lecture. You will populate your database with tracks, artists, albums and genres that are different from the ones used in class. You must include three artists, five albums, and 20 tracks in your data. Choose a genre for each track. Your tables need to normalized as described in class. Then you must construct and run some queries on your data and then take screen shots of those queries and submit the screen shots as your assignment. Artist artist_id name Album album_id title artist_id Genre genre_id name Track track_id title rating len count album_id genre_id What to Hand in For this assignment you will hand in: 1. Screen shot (JPG or PNG) of data in the Track table 2. Screen shot (JPG or PNG) of all the data joined up sorted in ascending order by the album title 3. Screen shot (JPG or PNG) of all of the genres for a particular artist. Hint - use JOIN, DISTINCT and WHERE
Sample Screen Shots
phpMyAdmin
de
(Recent tables)...
New
imported
information_schema
6-
misc
mijs
mmo
mmorps
moodle
Music
New
Album
Artist
Genre
Track
mysql
People
performance_schema
pr4e
Frest
rest demo
sakai10
sakai11
tsugi
由izap
phpMyAdmin
公园日 3
(Recent tables)...
New
imported
information_schema.
misc
mijs
mmorps
moodle
Music
New
Album
Artist
Genre
Son
Track
mysql
People
performance_schema
pr4e
rest
rest demo
sakai10
sakai11
tsugi
zap
#
Table: Track
+ Server: localhost:8889» Database: Music »
Browse Structure SQL O Search Insert Export Import
✔Showing rows 0-3 (4 total, Query took 0.0003 sec)
SELECT FROM "Track
Number of rows: 25 #
Sort by key: None
+ Options
SET FOR TOMTO nutink
+ Options
name
name
Led Zepplin Rock
T→
O EditCopy X Delete
EditCopy X Delete
Copy X Delete
Copy X Delete
Edit
Edit
to Check All
0
O
Number of rows: 25
Artist.name = 'Led Zepplin'
+ Options
Number of rows: 25 +
+
title
About to Rock
Who Made Who
Black Dog
Stairway
+
With selected:
Number of rows: 25 +
track_id
Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]
-Query results operations
Print view Print view (with full texts) Export Display chart Create view
title
1 Black Dog
2 Stairway
3 About to Rock
4 Who Made Who
Change X Delete
Showing rows 0 - 0 (1 total, Query took 0.0004 sec)
Server: localhost:8889 » Database: Music »
Table: Track
Browse Structure SQL Search Insert Export Import ✓ More
title
name
AC/DC
AC/DC
Who Made Who
Who Made Who
Led Zepplin IV
Led Zepplin IV
len rating count album_id
297
482
313
207
Export
Show query box
Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features
are not available.
✓ Showing rows 0-3 (4 total, Query took 0.0004 sec)
select Track.title, Artist.name, Album.title, Genre.name from Track join Genre join Album join Artist on
Track.genre_id = Genre.genre_id and Track.album_id= Album.album_id and Album.artist_id = Artist.artist_id
Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]
name
Metal
Metal
Rock
Rock
5
5
5
5
Number of rows:
25 +
-Query results operations
Print view Print view (with full texts) Export Display chartCreate view
Server: localhost:8889 »
Database: Music » Table: Track
Browse Structure SQL Search Insert Export Import ✓ More
0
0
0
0
More
Show query box
Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete
features are not available.
Number of rows: 25 +
-Query results operations
Print view Print view (with full texts) Export Display chart
Canna nama PDOK SAL TOTH Alhum TOTE CARna ТАТМ
2
2
1
1
genre_id
Create view
1
1
2
2
Antint 111 m.album_id
HERE
Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]
Ā
Transcribed Image Text:Sample Screen Shots phpMyAdmin de (Recent tables)... New imported information_schema 6- misc mijs mmo mmorps moodle Music New Album Artist Genre Track mysql People performance_schema pr4e Frest rest demo sakai10 sakai11 tsugi 由izap phpMyAdmin 公园日 3 (Recent tables)... New imported information_schema. misc mijs mmorps moodle Music New Album Artist Genre Son Track mysql People performance_schema pr4e rest rest demo sakai10 sakai11 tsugi zap # Table: Track + Server: localhost:8889» Database: Music » Browse Structure SQL O Search Insert Export Import ✔Showing rows 0-3 (4 total, Query took 0.0003 sec) SELECT FROM "Track Number of rows: 25 # Sort by key: None + Options SET FOR TOMTO nutink + Options name name Led Zepplin Rock T→ O EditCopy X Delete EditCopy X Delete Copy X Delete Copy X Delete Edit Edit to Check All 0 O Number of rows: 25 Artist.name = 'Led Zepplin' + Options Number of rows: 25 + + title About to Rock Who Made Who Black Dog Stairway + With selected: Number of rows: 25 + track_id Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ] -Query results operations Print view Print view (with full texts) Export Display chart Create view title 1 Black Dog 2 Stairway 3 About to Rock 4 Who Made Who Change X Delete Showing rows 0 - 0 (1 total, Query took 0.0004 sec) Server: localhost:8889 » Database: Music » Table: Track Browse Structure SQL Search Insert Export Import ✓ More title name AC/DC AC/DC Who Made Who Who Made Who Led Zepplin IV Led Zepplin IV len rating count album_id 297 482 313 207 Export Show query box Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available. ✓ Showing rows 0-3 (4 total, Query took 0.0004 sec) select Track.title, Artist.name, Album.title, Genre.name from Track join Genre join Album join Artist on Track.genre_id = Genre.genre_id and Track.album_id= Album.album_id and Album.artist_id = Artist.artist_id Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ] name Metal Metal Rock Rock 5 5 5 5 Number of rows: 25 + -Query results operations Print view Print view (with full texts) Export Display chartCreate view Server: localhost:8889 » Database: Music » Table: Track Browse Structure SQL Search Insert Export Import ✓ More 0 0 0 0 More Show query box Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available. Number of rows: 25 + -Query results operations Print view Print view (with full texts) Export Display chart Canna nama PDOK SAL TOTH Alhum TOTE CARna ТАТМ 2 2 1 1 genre_id Create view 1 1 2 2 Antint 111 m.album_id HERE Profiling [Inline ] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ] Ā
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Transaction Processing
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning