0% found this document useful (0 votes)
22 views7 pages

Computer Assignment 6

The document outlines an assignment for a Lower Secondary Computing course focused on relational databases, specifically using the dataset 'SpotifySongs'. It includes guidance for completing the assignment, which involves writing SQL queries to explore and manipulate the database, along with sections for feedback and reflection. The total marks for the assignment are 32, and it emphasizes practical application of learned skills.

Uploaded by

yoyostarbro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views7 pages

Computer Assignment 6

The document outlines an assignment for a Lower Secondary Computing course focused on relational databases, specifically using the dataset 'SpotifySongs'. It includes guidance for completing the assignment, which involves writing SQL queries to explore and manipulate the database, along with sections for feedback and reflection. The total marks for the assignment are 32, and it emphasizes practical application of learned skills.

Uploaded by

yoyostarbro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

SUBJECT Lower Secondary Compu ng Part 2

TOPIC Rela onal Databases


ASSIGNMENT Six
STUDENT NAME Yohaan

FEEDBACK AND REFLECTION:

 I have read the feedback on my last assignment carefully.

 I have considered whether any of that feedback is relevant to this assignment.

One thing I will try to do either the same or di erently in this assignment as a result of my previous
feedback is: _______________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

_________________________________________________________________________________

ASSIGNMENT GUIDANCE:

• Make sure you write your full name clearly in the box at the top of this page.
• You may type this assignment into the Word document as it needs screenshots and code to be
added.
• This is a prac cal assignment that will ask you to demonstrate the skills you have gained. You will
need to use the website db.ictsoeasy.co.uk. Some of the ques ons will ask you to add
screenshots into the assignment, others will ask you to write out the query / command to carry
out a task.
• This is not a med assignment. We es mate that this assignment may take you between 20 and
40 minutes to complete. However, if you need to take longer, please do so.
• You are not expected to complete your assignments without referring to your notes or
coursebook.
ti
ti
ti
ti
ti
ff
ti
LS COMPUTING PART 2 ASSIGNMENT 06

LS Computing Assignment Six


HIGH LEVEL PROGRAMMING LANGUAGE: EXPERT STORY TELLING

db.ictsoeasy.co.uk has a dataset called Spo fySongs. You will need to load this dataset for this
assignment.

1. Explore the database

a. Write a query to list all of the tables in the database. Paste a screenshot below showing your
query and the results.

(2 marks)

1
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti
LS COMPUTING PART 2 ASSIGNMENT 06

b. Write a query to show all of the elds and their data types within the spo fy_songs table.
Paste a screenshot below showing your query and the results.

(2 marks)
(Total 4 marks)
2. Extrac ng data. You do not need to provide screenshots for these ques ons.

a. Show the query to select all data from the spo fy_songs table.

SELECT * FROM spotify_songs;

(2 marks)

2
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti
fi
ti
ti
ti
LS COMPUTING PART 2 ASSIGNMENT 06

b. Show the query to select all data about songs by the ar st Meat Loaf.

SELECT Ar sts, SongName, Dura on, ReleaseDate, Popularity, Tempo, Explicit, Energy, Danceability, Acous cness

FROM spo fy_songs

WHERE Ar sts LIKE "%Meat Loaf%";

(3 marks)

3
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti
ti
ti
ti
ti
ti
LS COMPUTING PART 2 ASSIGNMENT 06

c. Show the query to select the ar sts and song name data by the ar sts Nirvana or Foo
Fighters.

SELECT Artists, SongName


FROM spotify_songs
WHERE Artists LIKE "%Nirvana%"
OR Artists LIKE "%Foo Fighters%”;

(4 marks)

d. Show the query to select the ar sts and song name data of all songs that have a
popularity ra ng of at least 75.

SELECT Artists, SongName


FROM spotify_songs
WHERE Popularity >= 75;

Or if also requiered to list the popularity rating:

SELECT Artists, SongName, Popularity


FROM spotify_songs
WHERE Popularity >= 75;

(4 marks)

e. Show the query to select the song name data of all songs that have a tempo between
100 and 120.

SELECT Artists, SongName


FROM spotify_songs
WHERE Tempo BETWEEN 100 AND 120;

Or if also requiered to list the tempo:

SELECT Artists, SongName, Tempo


FROM spotify_songs
WHERE Tempo BETWEEN 100 AND 120;

(4 marks)
(Total 17 marks)

4
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti
ti
ti
ti
LS COMPUTING PART 2 ASSIGNMENT 06

3. Changing data.

a. Show the query to add the song below:

Field Value
id 5DiyIWIrxGQDom0VR4VGym
Ar sts [‘Guns N Roses’]
SongName Rocket Queen
Dura on 373267
ReleaseDate 1987
Popularity 40
Tempo 111.797
Explicit 0
Energy 0.978
Danceability 0.446
Acous cness 0.0303

INSERT INTO spotify_songs (id, Artists, SongName, Duration,


ReleaseDate, Popularity, Tempo, Explicit,
Energy, Danceability, Acousticness)
VALUES ("5DiyIWIrxGQDom0VR4VGym", "['Guns N Roses']", "Rocket
Queen", "373267", "1987", "40", "111.797", "0", "0.978",
"0.446", "0.0303");

(5 marks)

b. Show the query to change all ar sts AC/DC to AC-DC. Ensure that you maintain the same
forma ng as in the original entries.

UPDATE spotify_songs
SET Artists = "['AC-DC']"
WHERE Artists = "['AC/DC']";

(4 marks)

5
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti
ti
ti
tti
ti
LS COMPUTING PART 2 ASSIGNMENT 06

c. Show the query to remove all songs by the ar st Eminem.

DELETE FROM spotify_songs


WHERE Artists = “['Eminem']";

Or if also requiered to delete songs with Eminem and other artists:

DELETE FROM spotify_songs


WHERE Artists LIKE "%Eminem%";

(2 marks)
(Total 11 marks)

TOTAL FOR ASSIGNMENT 32 MARKS

6
© 2023, Wolsey Hall Oxford. All Rights Reserved.
ti

You might also like