Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Using MongoDB with .Net

Avatar for Kelly Adams Kelly Adams
September 16, 2015

Using MongoDB with .Net

A guide for starting out with MongoDB 3.x and the C# 2.0 driver.

Avatar for Kelly Adams

Kelly Adams

September 16, 2015
Tweet

More Decks by Kelly Adams

Other Decks in Programming

Transcript

  1. Documents Collection Database Server Mongod instance CRM App Clients Client1

    Client2 Customers Customer1 Blog BlogPosts Post1 Post2 Object Hierarchy
  2. Aggregate Pipeline: • Assemble a series of operations to act

    on a collection • Almost as flexible as map/reduce • Can project into anonymous types
  3. • Unacknowledged • Fire and forget • Acknowledged (default) •

    Data is changed in memory (but not persisted to disk yet) • Journaled • Data is stored in journal and can be recovered (if journaling is enabled) • Replica Acknowledged • Data has persisted to disk and been replicated to replicas in the set Write Concerns
  4. Replace When intending to replace the whole document Update Upsert

    When intending to just update a field Inserts document if it didn’t exist before
  5. • BSON documents are capped at 16MB in MongoDB collections

    • Syncs across Replica Sets • Random access into large files without loading the whole thing into memory • Does NOT support atomic updates Why GridFS?