mysql> select * from song; +-----+ | ID | Title 100 | Hey Jude | Artist + | GenreCode | | Beatles | PRC 200 | You Belong With Me | Taylor Swift | NULL 300 | Need You Now | Lady Antebellum | COU | 400 | Old Town Road | Lil Nas X | NULL 500 | That's The Way Love Goes | Janet Jackson | RAB | 600 | Even Flow | Pearl Jam | GRU 6 rows in set (0.00 sec) mysql> desc song; | Field | ID | Type | int | Null | Key | Default | Extra | | Title | Artist | NO varchar(60) | YES | varchar(60) | YES | GenreCode | char(3) | PRI | NULL | NULL | | NULL | YES | MUL | NULL 4 rows in set (0.00 sec) mysql> select * from genre; +------+- | Code | Name | Description | CLA | Classical | Orchestral music composed and performed by professionally trained artists | | COU❘ Country | Developed mostly in southern USA, with roots in traditional folk music, spirituals and blues | | DRO | Drone clusters GRU Grunge | | PRC | Pop Rock RAB ❘ R&B | Minimalist music that emphasizes sustained or repeated sounds, notes, or tone | Alternative rock inspired by hardcore punk, heavy metal, and indie rock | Rock music with less attitude | Modern version of soul and funk African-American pop music | TEC | Techno | Electronic music 7 rows in set (0.01 sec) mysql> desc genre; +-- ❘ Field Code Name | Type |char(3) | NO | PRI | NULL varchar(20) YES | Description | varchar(200) | YES | Null | Key | Default | Extra | 3 rows in set (0.01 sec) | NULL | NULL

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter7: Creating Templates, Importing Data, And Working With Smartart, Images, And Screenshots
Section: Chapter Questions
Problem 6AYK
icon
Related questions
Question
100%

Please view attachment before answering. The attachment includes the tables and its contents. I am in need of assistance with both parts, A and B. I am unsure on how i can go about attempting the question.  I am using mysql terminal.  Please explain solution in detail so i can fully understand . Attaching a visual will be of great help as well. (as in a screenshot or so) Thank you so much in advance!

 

Part A -  In the CREATE TABLE statement for Song, rename GenreCode to Code. Modify the SELECT statement to work with the new name. Run the SQL and verify the result table is unchanged.

 

Part B - Modify the SELECT statement to perform a left join. Run the SQL and verify the result table includes songs with NULL genre.

mysql> select * from song;
+-----+
| ID | Title
100 | Hey Jude
| Artist
+
| GenreCode |
| Beatles
| PRC
200 | You Belong With Me
| Taylor Swift
| NULL
300 | Need You Now
| Lady Antebellum | COU
| 400 | Old Town Road
|
Lil Nas X
| NULL
500 | That's The Way Love Goes | Janet Jackson
| RAB
| 600 | Even Flow
| Pearl Jam
| GRU
6 rows in set (0.00 sec)
mysql> desc song;
| Field
| ID
| Type
| int
| Null | Key | Default | Extra |
| Title
| Artist
| NO
varchar(60) | YES
| varchar(60) | YES
| GenreCode | char(3)
| PRI | NULL
| NULL
|
| NULL
| YES
| MUL | NULL
4 rows in set (0.00 sec)
mysql> select * from genre;
+------+-
| Code | Name
| Description
| CLA | Classical | Orchestral music composed and performed by professionally trained
artists
|
| COU❘ Country | Developed mostly in southern USA, with roots in traditional folk music,
spirituals and blues |
| DRO | Drone
clusters
GRU Grunge
|
| PRC | Pop Rock
RAB ❘ R&B
| Minimalist music that emphasizes sustained or repeated sounds, notes, or tone
| Alternative rock inspired by hardcore punk, heavy metal, and indie rock
| Rock music with less attitude
| Modern version of soul and funk African-American pop music
| TEC | Techno | Electronic music
7 rows in set (0.01 sec)
mysql> desc genre;
+--
❘ Field
Code
Name
| Type
|char(3)
| NO | PRI | NULL
varchar(20) YES
| Description | varchar(200) | YES
| Null | Key | Default | Extra |
3 rows in set (0.01 sec)
| NULL
| NULL
Transcribed Image Text:mysql> select * from song; +-----+ | ID | Title 100 | Hey Jude | Artist + | GenreCode | | Beatles | PRC 200 | You Belong With Me | Taylor Swift | NULL 300 | Need You Now | Lady Antebellum | COU | 400 | Old Town Road | Lil Nas X | NULL 500 | That's The Way Love Goes | Janet Jackson | RAB | 600 | Even Flow | Pearl Jam | GRU 6 rows in set (0.00 sec) mysql> desc song; | Field | ID | Type | int | Null | Key | Default | Extra | | Title | Artist | NO varchar(60) | YES | varchar(60) | YES | GenreCode | char(3) | PRI | NULL | NULL | | NULL | YES | MUL | NULL 4 rows in set (0.00 sec) mysql> select * from genre; +------+- | Code | Name | Description | CLA | Classical | Orchestral music composed and performed by professionally trained artists | | COU❘ Country | Developed mostly in southern USA, with roots in traditional folk music, spirituals and blues | | DRO | Drone clusters GRU Grunge | | PRC | Pop Rock RAB ❘ R&B | Minimalist music that emphasizes sustained or repeated sounds, notes, or tone | Alternative rock inspired by hardcore punk, heavy metal, and indie rock | Rock music with less attitude | Modern version of soul and funk African-American pop music | TEC | Techno | Electronic music 7 rows in set (0.01 sec) mysql> desc genre; +-- ❘ Field Code Name | Type |char(3) | NO | PRI | NULL varchar(20) YES | Description | varchar(200) | YES | Null | Key | Default | Extra | 3 rows in set (0.01 sec) | NULL | NULL
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 1 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L