everything you know about mongodb is wrong
play

Everything You Know About MongoDB is Wrong (Probably) Mark Smith - PowerPoint PPT Presentation

Everything You Know About MongoDB is Wrong (Probably) Mark Smith | MongoDB | @Judy2K Myth 0 You think we havent seen this on YouTube @Gar1t on YouTube MongoDB is Web Scale Weve seen it. Weve bought the T-shirts. What is MongoDB?


  1. Everything You Know About MongoDB is Wrong (Probably) Mark Smith | MongoDB | @Judy2K

  2. Myth 0 You think we haven’t seen this on YouTube @Gar1t on YouTube

  3. MongoDB is Web Scale We’ve seen it. We’ve bought the T-shirts.

  4. What is MongoDB?

  5. Database Cluster Primary Secondary Secondary

  6. Database Cluster Documents {'_id': ObjectId('573a1390f29313caabcd4135'), 'title': 'Blacksmith Scene', 'fullplot': 'A stationary camera looks at a large anvil with a blacksmith behind it and one on either side.', 'cast': ['Charles Kayser', 'John Ott'], 'countries': ['USA'], Primary 'directors': ['William K.L. Dickson'], 'genres': ['Short'], 'imdb': {'id': 5, 'rating': 6.2, 'votes': 1189}, 'released': datetime.datetime(1893, 5, 9, 0, 0), 'runtime': 1, Secondary Secondary 'year': 1893}

  7. Database Cluster Documents {'_id': ObjectId('573a1390f29313caabcd4135'), 'title': 'Blacksmith Scene', 'fullplot': 'A stationary camera looks at a large anvil with a blacksmith behind it and one on either side.', 'cast': ['Charles Kayser', 'John Ott'], 'countries': ['USA'], Primary 'directors': ['William K.L. Dickson'], 'genres': ['Short'], 'imdb': {'id': 5, 'rating': 6.2, 'votes': 1189}, 'released': datetime.datetime(1893, 5, 9, 0, 0), 'runtime': 1, Secondary Secondary 'year': 1893}

  8. Database Cluster Documents {'_id': ObjectId('573a1390f29313caabcd4135'), 'title': 'Blacksmith Scene', 'fullplot': 'A stationary camera looks at a large anvil with a blacksmith behind it and one on either side.', 'cast': ['Charles Kayser', 'John Ott'], 'countries': ['USA'], Primary 'directors': ['William K.L. Dickson'], 'genres': ['Short'], 'imdb': {'id': 5, 'rating': 6.2, 'votes': 1189}, 'released': datetime.datetime(1893, 5, 9, 0, 0), 'runtime': 1, Secondary Secondary 'year': 1893}

  9. 1 h t y M MongoDB is v2.4 $ sudo apt install mongodb $ mongod --version db version v2.4

  10. MongoDB is v4.4 Google mongodb community

  11. 2 h t y M The JSON database MongoDB is a document database

  12. The BSON database MongoDB is a document database

  13. 3 h t y M No Transactions MongoDB is a BASE database

  14. Yes Transactions MongoDB is an ACID database

  15. 4 h t y M No Relationships You can’t have relationships between documents.

  16. Yes Relationships You totally can.

  17. An Aggregation Pipeline db.orders.aggregate([{ $lookup: { from: "inventory", localField: "item", foreignField: "sku", as: "inventory_docs" } }])

  18. An Aggregation Pipeline { "_id" : 1, "item" : "almonds" , "price" : 12, "quantity" : 2, "inventory_docs" : [ { "_id" : 1, "sku" : "almonds", "instock" : 120 } ] }

  19. A Very Simple Aggregation Pipeline { "_id" : 1, "item" : "almonds" , "price" : 12, "quantity" : 2, "inventory_docs" : [ { "_id" : 1, "sku" : "almonds", "instock" : 120 } ] }

  20. 5 h t y M MongoDB is About Sharding That’s how you scale

  21. Quick Sharding Primer - 2 shards Shard Server Shard Server Primary Primary Secondary Secondary Secondary Secondary

  22. Just Buy a Bigger Machine MongoDB can do sharding, but you probably shouldn’t

  23. Actually, use Atlas We will host your database for you

  24. Microsharding … isn't a thing any more

  25. Map-Reduce … with JavaScript.

  26. Aggregation Pipelines

  27. A Very Simple Aggregation Pipeline db.orders.aggregate([ { $match: { status: "A" } }, { $group: { _id: "$cust_id", total: { $sum: "$amount" }}} ])

  28. A Very Simple Aggregation Pipeline db.orders.aggregate([ { $match: { status: "A" } }, { $group: { _id: "$cust_id", total: { $sum: "$amount" }}} ])

  29. A Very Simple Aggregation Pipeline db.orders.aggregate([ { $match: { status: "A" } }, { $group: { _id: "$cust_id", total: { $sum: "$amount" }}} ])

  30. 6 h t y M MongoDB is Insecure Haven’t there been breaches?

  31. MongoDB is Secure Industry-standard security. Bad defaults have been fixed.

  32. 7 h t y M MongoDB Loses Data … doesn’t it?

  33. MongoDB Is Durable … but we used to have some silly defaults

  34. Database Cluster Primary Secondary Secondary

  35. 8 h t y M MongoDB is Really Easy Well … yes … and no.

  36. COVID-19 Open Data https://bit.ly/mongodb-covid

  37. Some stuff Everything You Know About MongoDB is Wrong Right (Probably) Mark Smith | MongoDB | @Judy2K

  38. Thank you That’s all folks Mark Smith | MongoDB | @Judy2k

Recommend


More recommend