Skip to content

Instantly share code, notes, and snippets.

@montanalow
Last active February 4, 2021 02:16
Show Gist options
  • Select an option

  • Save montanalow/9b1e3d85c722712f79ab4d22d07ff49e to your computer and use it in GitHub Desktop.

Select an option

Save montanalow/9b1e3d85c722712f79ab4d22d07ff49e to your computer and use it in GitHub Desktop.
Products and Items
Products (1TB) - 100x wider than Items
╔══════╦════════════╦═════╦═══════╦═════════════════╗
║ id ║ name ║ upc ║ emoji ║ 100KB more data ║
╠══════╬════════════╬═════╬═══════╬═════════════════╣
║ 1 ║ fuji apple ║ 123 ║ 🍏  ║ ... ║
║ 2 ║ gala apple ║ 456 ║ 🍎  ║ ... ║
║ 3 ║ fuji water ║ 789 ║ 🌊  ║ ... ║
╠══════╩════════════╩═════╩═══════╩═════════════════╣
║ ... 10M more rows ... ║
╚═══════════════════════════════════════════════════╝
Items (100GB) - 100x taller than Products
╔══════╦════════════╦══════════════════════╦════════╦════════════════╗
║ id ║ product_id ║ retailer_location_id ║ price ║ 100B more data ║
╠══════╬════════════╬══════════════════════╬════════╬════════════════╣
║ 1 ║ 1 ║ 111 ║ $0.99 ║ ... ║
║ 2 ║ 1 ║ 112 ║ $0.95 ║ ... ║
║ 3 ║ 1 ║ 113 ║ $1.25 ║ ... ║
║ 4 ║ 2 ║ 222 ║ $0.99 ║ ... ║
║ 5 ║ 3 ║ 333 ║ $10.00 ║ ... ║
╠══════╩════════════╩══════════════════════╩════════╩════════════════╣
║ ... 1B more rows ... ║
╚════════════════════════════════════════════════════════════════════╝
Denormalized Full Text Search Documents (100TB) - 100x more data than both Products and Items
╔════════════╦════════════╦════════╦═══════╦═════════╦══════════════════════╦════════╦═════════════════╗
║ product_id ║ name ║ upc ║ emoji ║ item_id ║ retailer_location_id ║ price ║ 100KB more data ║
╠════════════╬════════════╬════════╬═══════╣═════════╬══════════════════════╬════════╬═════════════════╣
║ 1 ║ fuji apple ║ 123 ║ 🍏  ║ 1 ║ 111 ║ $0.99 ║ ... ║
║ 1 ║ fuji apple ║ 123 ║ 🍏  ║ 2 ║ 112 ║ $0.95 ║ ... ║
║ 1 ║ fuji apple ║ 123 ║ 🍏  ║ 3 ║ 113 ║ $1.25 ║ ... ║
║ 2 ║ gala apple ║ 456 ║ 🍎  ║ 4 ║ 222 ║ $0.99 ║ ... ║
║ 3 ║ fuji water ║ 789 ║ 🌊  ║ 5 ║ 333 ║ $10.00 ║ ... ║
╠════════════╩════════════╩════════╩═══════╩═════════╩══════════════════════╩════════╩═════════════════╣
║ ... 1B more rows ... ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════╝
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment