Music streaming sample database — MongoDB, embedded (2,008 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 — 80 documents
  advertisements — 120 documents
  albums — 10 documents, each with its album_artists
  alternative_genres — 20 documents
  artist_follows — 30 documents
  artists — 10 documents, each with its artist_socials
  audio_features — 20 documents
  devices — 30 documents
  episode_history — 50 documents
  genres — 24 documents
  listening_history — 1,000 documents
  lyrics — 12 documents
  offline_downloads — 20 documents
  payment_transactions — 40 documents
  playlists — 10 documents, each with its playlist_tracks
  podcast_episodes — 10 documents
  podcast_subscriptions — 10 documents
  podcasts — 10 documents
  recommendations — 20 documents, each with its recommendation_tracks
  search_queries — 50 documents
  subscription_tiers — 1 documents
  tracks — 20 documents, each with its track_artists, its track_comments, its track_genres, its track_likes
  user_follows — 30 documents
  users — 20 documents, each with its user_subscriptions

Folded in (no collection of their own):
  album_artists — 10 rows, as the "album_artists" array on albums (its album_id is the parent's _id)
  artist_socials — 10 rows, as the "artist_socials" array on artists (its artist_id is the parent's _id)
  playlist_tracks — 60 rows, as the "playlist_tracks" array on playlists (its playlist_id is the parent's _id)
  recommendation_tracks — 100 rows, as the "recommendation_tracks" array on recommendations (its recommendation_id is the parent's _id)
  track_artists — 24 rows, as the "track_artists" array on tracks (its track_id is the parent's _id)
  track_comments — 10 rows, as the "track_comments" array on tracks (its track_id is the parent's _id)
  track_genres — 25 rows, as the "track_genres" array on tracks (its track_id is the parent's _id)
  track_likes — 80 rows, as the "track_likes" array on tracks (its track_id is the parent's _id)
  user_subscriptions — 12 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.
