Social network sample database — MongoDB, embedded (390,729 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 social-network --collection <name> --file <name>.ndjson

Collections:
  blocks — 12,500 documents
  comments — 20,000 documents, each with its comment_likes
  conversations — 1,563 documents, each with its conversation_participants
  devices — 12,500 documents
  follows — 10,000 documents
  groups — 1,563 documents, each with its group_memberships, its group_posts
  hashtags — 40 documents
  login_history — 12,500 documents
  media — 3,000 documents
  messages — 10,000 documents, each with its message_receipts
  notifications — 12,500 documents
  pages — 1,563 documents, each with its page_admins, its page_likes, its page_posts
  posts — 12,000 documents, each with its post_hashtags, its post_likes, its post_media
  profiles — 12,500 documents
  reports — 12,500 documents
  stories — 1,000 documents, each with its story_views
  users — 12,500 documents, each with its user_tags

Folded in (no collection of their own):
  comment_likes — 15,000 rows, as the "comment_likes" array on comments (its comment_id is the parent's _id)
  conversation_participants — 12,500 rows, as the "conversation_participants" array on conversations (its conversation_id is the parent's _id)
  group_memberships — 12,500 rows, as the "group_memberships" array on groups (its group_id is the parent's _id)
  group_posts — 12,500 rows, as the "group_posts" array on groups (its group_id is the parent's _id)
  message_receipts — 10,000 rows, as the "message_receipts" array on messages (its message_id is the parent's _id)
  page_admins — 12,500 rows, as the "page_admins" array on pages (its page_id is the parent's _id)
  page_likes — 12,500 rows, as the "page_likes" array on pages (its page_id is the parent's _id)
  page_posts — 12,500 rows, as the "page_posts" array on pages (its page_id is the parent's _id)
  post_hashtags — 12,500 rows, as the "post_hashtags" array on posts (its post_id is the parent's _id)
  post_likes — 100,000 rows, as the "post_likes" array on posts (its post_id is the parent's _id)
  post_media — 12,500 rows, as the "post_media" array on posts (its post_id is the parent's _id)
  story_views — 5,000 rows, as the "story_views" array on stories (its story_id is the parent's _id)
  user_tags — 12,500 rows, as the "user_tags" 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.
