The video size was getting too large for moodle so here is the onedrive link for the following
- Install the module prettytable for Pretty Print
pip install prettytable
- In cli.py change the user and password at lines 802 and 803 according to your system
con = pymysql.connect(host='localhost',
user="demo",
password="password",
db='Music',
cursorclass=pymysql.cursors.DictCursor)
- start mysql and in mysql, enter this
CREATE DATABASE Music;
-
Quit mysql
-
To load tables into mysql, do the following in terminal
sudo mysql Music < Music.sql
- Grant permissions to cli.py
chmod +x cli.py
- Run cli.py and follow the instruction
- https://stackoverflow.com/questions/32737478/how-should-i-resolve-secure-file-priv-in-mysql
- https://stackoverflow.com/questions/59993844/error-loading-local-data-is-disabled-this-must-be-enabled-on-both-the-client
- Select all songs of given creator.
- Select all users which have more than treshhold plays of given genre.
- Select Users having more than treshhold plays.
- Select creators with less than given views, but which have won an award.
- Select creators with less than given views.
- Select all users whose name starts with given string.
- Calculate number of plays for an album.
- Select songs with more than X plays.
- Print all creators which have won an award.
- Find users which have joined a platform bw given dates.
- List bands which user listened this month.
- Print all users.
- Print all songs.
- Print all creators.
- Get all playlists created by given user.
- Add user.
- Make user listen a song.
- Create Playlist.
- Add song to playlist.
- Generate a general report.
- Make a user report.
- Produce a creator report.
- Most listened song
- Most listened artist
- Most listened genre
- Band with most awards
- most listened album
- Artist with most awards
- Number of songs listened this year
- most listened artist
- most listened genre
- Total number of streams
- total number of songs
- number of different genres