I’m building a prototype app that leverages the Spotify API. https://developer.spotify.com/discover/
I’m doing research on choosing the database architecture. Since this is a prototype I’d like to keep it simple yet still have a path forward for future growth.
If you have worked with the Spotify API and storing retrieved data I’d love to hear from you.
Also, I have read many of the posts regarding choices between databases and have edited this question based on reading them. I am asking again because some of the posts were several years old and things change.
My question is: What are the advantage and disadvantages of the options I propose in this post and what other options might be a good fit for this type of application?
Overview The application will store data retrieved from Spotify. The Spotify API returns data in JSON format.
The application will be store User data for hundreds and, hopefully, thousands of users.
Playlists and tracks are the primary data. Playlists can contain up to 100 or more tracks. Every user will have multiple playlists/tracks stored. After one year a user might have 50 to 100 playlists each with a number of tracks.
Stored playlists will be displayed to users in the app/web and used to create other playlists. Tracks will have data added to them on a daily basis e.g. date, rank.
There will be transactions, such as a playlist being locked against further edits, closing out periods, closing out rankings, etc..
Spotify Category Outline
User: Email, product, display name, birthdate, image https://developer.spotify.com/documentation/web-api/reference/users-profile/get-users-profile/
Music metadata: Albums, artists, and tracks
Playlists: Get a playlists tracks and store them. You can see what the JSON data looks like here: https://developer.spotify.com/documentation/web-api/reference/playlists/get-playlists-tracks/
Database Options
Option A Store the Spotify JSON data in a Relational database such as mySQL or MariaDB.
Both mySQL and MariaDB support JSON data types though they manage them slightly differently. According to the MariaDB KB: In MySQL, JSON is an object and is compared according to json values. In MariaDB JSON strings are normal strings and compared as strings.
What are the advantages/disadvantages of, first, storing JSON in a relational database, for instance can it be queried adequately? A sample query might be, “List the user’s playlists by rank”. Second, what are the ads/disads between mySQL and MariaDB’s management of JSON?
What other issues should I be looking at with relational dbs?
Option B Spotify uses the Cassandra database to deliver the Spotify service. While this is a prototype app might it be worthwhile to consider Cassandra or some other Not Only SQL type of database? How well does Cassandra import JSON data? Are there developers readily available that understand how to work with Cassandra?
Option C, D, E…
What other database options might be considered for data structure for this type of application?
Thanks in advance!