Movie rental sample database — MongoDB, embedded (8,516 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 movie-rental --collection <name> --file <name>.ndjson

Collections:
  countries — 8 documents
  customers — 20 documents, each with its customer_addresses
  damaged_items — 10 documents
  formats — 3 documents
  genres — 12 documents
  inventory_items — 100 documents
  languages — 8 documents
  membership_types — 3 documents
  memberships — 15 documents
  movies — 400 documents, each with its movie_cast, its movie_directors, its movie_genres, its movie_studios
  payment_methods — 4 documents
  payments — 600 documents
  people — 600 documents
  promotions — 10 documents
  purchase_orders — 150 documents, each with its purchase_order_items
  ratings — 5 documents
  rentals — 600 documents, each with its rental_items, its rental_promotions
  reviews — 30 documents
  staff — 24 documents
  staff_roles — 4 documents
  stores — 4 documents
  studios — 10 documents
  vendors — 6 documents
  wishlists — 20 documents

Folded in (no collection of their own):
  customer_addresses — 20 rows, as the "customer_addresses" array on customers (its customer_id is the parent's _id)
  movie_cast — 2,400 rows, as the "movie_cast" array on movies (its movie_id is the parent's _id)
  movie_directors — 400 rows, as the "movie_directors" array on movies (its movie_id is the parent's _id)
  movie_genres — 700 rows, as the "movie_genres" array on movies (its movie_id is the parent's _id)
  movie_studios — 400 rows, as the "movie_studios" array on movies (its movie_id is the parent's _id)
  purchase_order_items — 900 rows, as the "purchase_order_items" array on purchase_orders (its purchase_order_id is the parent's _id)
  rental_items — 1,000 rows, as the "rental_items" array on rentals (its rental_id is the parent's _id)
  rental_promotions — 50 rows, as the "rental_promotions" array on rentals (its rental_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.
