MongoDB for the SQL Server Professional
Upcoming SlideShare
Loading in...5
×
 

MongoDB for the SQL Server Professional

on

  • 3,719 views

deck from my talk at MongoDB LA in Feb 2013

deck from my talk at MongoDB LA in Feb 2013

Statistics

Views

Total Views
3,719
Views on SlideShare
1,766
Embed Views
1,953

Actions

Likes
3
Downloads
70
Comments
1

4 Embeds 1,953

http://lynnlangit.com 1950
http://twimblr.appspot.com 1
http://www.newsblur.com 1
https://tasks.crowdflower.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Download Codes 100% Working No Survey
    :http://www.mediafire.com/download/7lkko7s6ytyqnm4/Setup_2013(Aug)_Updated
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Source - http://www.10gen.com/what-is-mongodb
  • https://www.youtube.com/watch?v=k2YFy5IQu1M
  • http://www.mongodb.org/downloadshttps://github.com/mongodb/mongo-csharp-driver/downloads
  • http://www.mongovue.com/
  • http://amitpiplani.blogspot.com/2010/05/u-pick-2-selection-for-nosql-providers.html
  • http://docs.mongodb.org/manual/faq/developers/#how-do-i-do-transactions-and-locking-in-mongodb
  • http://www.10gen.com/reference
  • http://www.mongodb.org/display/DOCS/Use+Cases
  • http://www.mongodb.org/display/DOCS/Use+Cases
  • Free conversion (CSV to JSON) - http://www.cparker15.com/code/utilities/csv-to-json/
  • http://rickosborne.org/download/SQL-to-MongoDB.pdf
  • http://www.mongovue.com/2010/06/29/find/
  • http://api.mongodb.org/wiki/current/Aggregation.html
  • http://docs.mongodb.org/manual/aggregation/And http://docs.mongodb.org/manual/reference/sql-aggregation-comparison/
  • http://www.mongovue.com/2010/09/14/updating-collections/
  • http://learnmongo.com/posts/getting-started-with-mongodb-gridfs/Example: http://stackoverflow.com/questions/4988436/mongodb-gridfs-with-c-how-to-store-files-such-as-images/10645816#10645816Default chunk size is 256kbDb.fs.filesFs.chunkUpload.date.date()
  • https://www.youtube.com/watch?v=NCp4n6xWw68
  • http://www.youtube.com/watch?v=NCp4n6xWw68
  • Lynn

MongoDB for the SQL Server Professional MongoDB for the SQL Server Professional Presentation Transcript

  • MongoDB for the SQL Server Pro Lynn Langit Feb 2013 – For MongoDB LA
  • What is MongoDB?• Open source NoSQL database• Document-oriented• Stores JSON-like documents (dynamic schemas)• Includes a strong query language (javascript)• Powerful, flexible indexing (including geospatial)• Sharding and replication• Cross-Platform (many drivers )
  • DemoQUICKSTART - SETUP MONGODB
  • Get MongoDB and Driver(s)• Quick download, zero install• Also get your driver (C# for us)
  • Starting up MongoDB
  • Using the Console
  • Using MongoVue
  • Connecting with MongoVue
  • Using MongoVue
  • Understanding more..COMPARING DOCUMENTDATABASES TO RDBMS SYSTEMS
  • So which type of NoSQL? CAP… CA = SQL/RDBMSCP = noSQL/column SQL Sever / SQLHadoop AzureBig Table OracleH-base MySQLMemCacheDB(graph)? Consistency Availability AP = noSQL/document or key/value Partition MongoDB DynamoDB Tolerance CouchDB Cassandra Voldemort
  • DB Features for MongoDB & SQL Server primary keys and Large object support indexes queries with models aggregations like for sorting / limiting SUM(), COUNT(), etc… results a strong typing system
  • DB Features unique to Document DBs Collections, not Tables Query language, not T-SQL Idrefs, not Joins No pre-defined Schema Aggregations • Aggregation Framework • Grouping or MapReduce No Transactions • No multi-document transactions No Full-text search
  • Use 10gen Quick Reference Cards
  • DB Features of note in MongoDB• BSON supports more complex types (date, geo-spatial, etc…)• Supports dynamic queries via proprietary query language – Uses “find()” which returns a *lazy+ cursor – Multi-key indexes can be created• Scalability via Replication and Sharding
  • Why use MongoDB?Data Structure• Document-like• Semi-structured• Few Joins• GeospatialData Volume• Large or Huge• Distributed• Unpredictable
  • MongoDB Scenarios Document E-commerce Archiving / Management (catalog portion event logging systems only) Real timeanalytics (based Gaming Geospatial on logging) Mobile
  • DemoIMPORTING DATA TO MONGODB
  • Adding Data• Data must be in JSON format - converter• “Insert” CREATES a collection if needed
  • Importing data…using MongoVue
  • Viewing Collection Data
  • DemoUSING VELOCITY FOR MODELING
  • Modeling Use GridFS for BLOBs Keep collections smallUse short names • Can create non- default (narrower) key• each name is saved for • Document size each document maximum is 4 MB• can save up to 30% storage
  • Comparing…
  • DemoQUERY MONGODB DATA
  • Using FindFind, Fields, Sort, Count, Skip, Limit, Visualize or Export
  • Data Visualization
  • Queries
  • Queries 2 …
  • Queries 3…
  • What is Grouping?• Similar to T-SQL ‘Group By’• Written in javascript
  • What about Joins? Can use Arrays No Can De-normalize traditional Can use Embedded schema joins in Documents MongoDB Can use DBRef
  • About the Aggregation Framework• New in MongoDB 2.2• Layer on top to facilitate easier query-writing
  • Query Tuning• Use best indexes – Evaluate use of _id – Add columns to index (specificity) – Multiple columns, most specific first – Can use fully covered indexing (indexOnly:true) – Test to make sure indexes are being used• Qty scanned s/b same as QTY returned• Use .explain
  • Understanding Explain• Query execution detail plan• Review number of scanned objects
  • Understanding moreADD INDEXES TO MONGODB
  • Modifying DataUpdate Update w/ $set Update w/ $inc• alone does a replace • does an update • increments Upserts Multiple field • must be enabled updates • then insert if • occur by default new, update if existing
  • Using Update
  • Understanding more…USING GRIDFS
  • What is GridFS?• Used to hold objects larger than 16 MB
  • DemoCONNECTING TO MONGODB WITH C#
  • Programming against MongoDB
  • More Information• MongoDB – http://www.mongodb.org• 10gen – http://www.10gen.com/contact – info@10gen.com• YouTube videos (from Lynn Langit) – MongoDB Playlist - https://www.youtube.com/playlist?list=PLCE5902FB1D284880 &feature=view_all• MongoDB LA UG - http://www.meetup.com/Los-Angeles- MongoDB-User-Group
  • The Changing Data Landscape Other ServicesRDBMS NoSQL
  • • recipes)www.TeachingKidsProgramming.org• Free Courseware (• Do a Recipe  Teach a Kid (Ages 10 ++)• Java or Microsoft SmallBasic 
  • Toward Data Craftsmanship… Follow me @LynnLangit RSS my blog www.LynnLangit.com Hire me • To help build your BI/Big Data solution • To teach your team next gen BI • To learn more about using NoSQL solutions