I am trying to create SQL commands from this ERD that I don\'t quite understand.
ID: 3824607 • Letter: I
Question
I am trying to create SQL commands from this ERD that I don't quite understand. Some examples are :1.) write a select statement that returns the CD whose artist name is James. use explicit join
2.) write a select the statement that returns the artist whose CD is entitled 'building the perfect beast'. use explicit Join
3.) you no longer have James' Seven CD. delete the relevant records from artist, CD, and track tables
4.) write the alter statement to change the CD table to have the CD_title datatype equal 40 characters.
5.) write a select statement that will return all records containing CD titles released after 1990. use the convert function
6.)write a select statement that will return the record with the CD title released in 1990 and begins with the letter 'G' CD Title Release Date Artist D Artist Track Track ID CD ID Title Category
Explanation / Answer
select * from CD inner join Artist on cd.Artist_ID=Artist.Artist_ID where Artist.ArtistName='James' ; select * from Artist inner join CD on Artist.Artist_ID=CD.Artist_ID where CD.Title='building the perfect beast' ; delete * from Artist,CD,Track where Artist.ArtistName='James' and CD.CD_ID=7 and CD.Artist_ID=Artist.Artist_ID and CD.CD_ID=Track.CD_ID; Alter table CD modify column Title varchar2(40);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.