Music streaming sample database — MongoDB, embedded (176,375 rows)

Tables that belong to another are folded into it as arrays, so the documents read the way the application uses them. The rest are collections of their own, joined by key as in the flat version.

Load it:
  sh import.sh                    (into mongodb://localhost:27017)
  sh import.sh "<connection string>"

Or one collection at a time: mongoimport --db music-streaming --collection <name> --file <name>.ndjson

Collections:
  ad_campaigns — 30 documents
  ad_impressions — 8,000 documents
  advertisements — 120 documents
  albums — 200 documents, each with its album_artists
  alternative_genres — 20 documents
  artist_follows — 3,000 documents
  artists — 100 documents, each with its artist_socials
  audio_features — 2,000 documents
  devices — 3,000 documents
  episode_history — 5,000 documents
  genres — 24 documents
  listening_history — 100,000 documents
  lyrics — 1,200 documents
  offline_downloads — 2,000 documents
  payment_transactions — 4,000 documents
  playlists — 600 documents, each with its playlist_tracks
  podcast_episodes — 600 documents
  podcast_subscriptions — 1,000 documents
  podcasts — 30 documents
  recommendations — 2,000 documents, each with its recommendation_tracks
  search_queries — 5,000 documents
  subscription_tiers — 1 documents
  tracks — 2,000 documents, each with its track_artists, its track_comments, its track_genres, its track_likes
  user_follows — 3,000 documents
  users — 2,000 documents, each with its user_subscriptions

Folded in (no collection of their own):
  album_artists — 250 rows, as the "album_artists" array on albums (its album_id is the parent's _id)
  artist_socials — 100 rows, as the "artist_socials" array on artists (its artist_id is the parent's _id)
  playlist_tracks — 6,000 rows, as the "playlist_tracks" array on playlists (its playlist_id is the parent's _id)
  recommendation_tracks — 10,000 rows, as the "recommendation_tracks" array on recommendations (its recommendation_id is the parent's _id)
  track_artists — 2,400 rows, as the "track_artists" array on tracks (its track_id is the parent's _id)
  track_comments — 1,000 rows, as the "track_comments" array on tracks (its track_id is the parent's _id)
  track_genres — 2,500 rows, as the "track_genres" array on tracks (its track_id is the parent's _id)
  track_likes — 8,000 rows, as the "track_likes" array on tracks (its track_id is the parent's _id)
  user_subscriptions — 1,200 rows, as the "user_subscriptions" array on users (its user_id is the parent's _id)

Types: numeric columns are Decimal128, so totals stay exact; dates and timestamps are
Date values read as UTC (the data has no time zone); times and UUIDs are strings;
JSON columns are embedded objects.

Synthetic data, CC0-1.0, from databasesample.com. The same rows as the SQL and CSV files.
