Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Consider these two tables generated by a brand - new music downloading app, shown here along with their ERD. You will use these tables to
Consider these two tables generated by a brandnew music downloading app, shown here along with their ERD. You will use these tables to answer questions through
users table
id username premiumuser
ziggy TRUE
aladdin FALSE
duke TRUE
tom FALSE
jareth FALSE
downloads table
id userid filename
spaceoddity
heroes
heroes
heroes
rebelrebel
rebelrebel
fame
changes
ERD
An entity relationship diagram showing the connection between two tables: A user table, and a downloads table. The users table contains three fields: id username, and premium user. The id field is the primary key of the users table. The downloads table contains three fields: id userid and filename. Within the downloads table, the id field is the primary key, and userid is a foreign key with a many to one relationship to the primary key in the users table.
Now, consider a third table called songs that lists all songs in this music service's collection.
downloads table
id userid filename
spaceoddity
heroes
heroes
heroes
rebelrebel
rebelrebel
fame
changes
songs table
filename yearreleased
changes
fame
heroes
modernlove
rebelrebel
spaceoddity
starman
New ERD, including songs table
An entity relationship diagram showing the connection between three tables: Users, downloads, and songs. The users table contains three fields: id username, and premiumuser. The id field is the primary key of the users table. The downloads table contains three fields: id userid and filename. The id field is the primary key of the downloads table. Userid is a foreign key that has a many to one relationship with the user tables primary key. Filename is a foreign key that has a many to one relationship with the songs tables primary key. The songs table contains two fields: filename, and yearreleased. The filename field is the primary key of the songs table.
If you were to use the query below to RIGHT JOIN the downloads table to the songs table, how many rows would be in the resulting table?
SELECT
did
dfilename,
syearreleased
FROM downloads d
RIGHT JOIN songs s
ON dfilename sfilename;
Question options:
a
b
c
d
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started