Question: A student creates a database for her CD records. The database contains three tables: - Artist(Anr, Name, Country) - Record(Rnr, Name, Artist) - Song(Record, Ordernumber,

 A student creates a database for her CD records. The database

A student creates a database for her CD records. The database contains three tables: - Artist(Anr, Name, Country) - Record(Rnr, Name, Artist) - Song(Record, Ordernumber, Name, Length) In the table Artist, Anr is the primary key, and Name is an alternate key. In the table Record, Rnr is the primary key, and Artist is a reference attribute to Anr in the table Artist. Also, the combination of Name and Artist is an alternate key. In the table Song, Record and Ordernumber form a composite primary key, and Record is a reference attribute to Rnr in the table Record. Write the following queries both in SQL and in relational algebra: a) What are the names of the records made by the artist Carola? [ 6 pts] b) What is the sum of the lengths of all songs on the record Stranger by Carola? [7 pts] c) Which artists are present in the database, while having no records in the database? We want to know the names of those artists. [7 pts]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!