Social network sample database — MongoDB, embedded (3,948 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 — 125 documents
  comments — 200 documents, each with its comment_likes
  conversations — 16 documents, each with its conversation_participants
  devices — 125 documents
  follows — 100 documents
  groups — 16 documents, each with its group_memberships, its group_posts
  hashtags — 40 documents
  login_history — 125 documents
  media — 30 documents
  messages — 100 documents, each with its message_receipts
  notifications — 125 documents
  pages — 16 documents, each with its page_admins, its page_likes, its page_posts
  posts — 120 documents, each with its post_hashtags, its post_likes, its post_media
  profiles — 125 documents
  reports — 125 documents
  stories — 10 documents, each with its story_views
  users — 125 documents, each with its user_tags

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