Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MongoDB-Beginner tutorial explaining basic operation via mongo shell

2,325 views

Published on

This is a beginner tutorial which give quick start with mongoDB.

  • D0WNL0AD FULL ▶ ▶ ▶ ▶ http://1lite.top/sl1Uz ◀ ◀ ◀ ◀
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT, ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • MongoDB Development Essentials Training and More... 2015 https://www.youtube.com/watch?v=_rAPWkRqOP4&list=UU_kJL5zl2zCVVviI8EPmUug
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

MongoDB-Beginner tutorial explaining basic operation via mongo shell

  1. 1. By Priti Solanki This presentation is to give you a quick way to start with Mongo shell
  2. 2. Tips
  3. 3. How to list all database
  4. 4. How to create empty database
  5. 5. How to view collections within mongo db > use ninja//Your db name switched to db ninja > show collections system.indexes ninja
  6. 6. How to find details of specific ninja db.ninja.find({'codename':'Sakura'}) { "_id" : ObjectId("534e5c3b17d860326a37faa0"), "codename" : "Sakura", "name" : [ { "firstname" : "Sakura", "lastname" : "Haruno" } ], "rank" : "Chunin", "team" : [ "Team kakashi", "Eight Man Squad" ], "classification" : [ "Medical-nin" ], "Jutsu" : [ "Chakra Enhanced strength", "Cherry Blossom Impact", "Yin seal" ] } Can’t read let’s make it pretty…. db.ninja.find({'codename':'Sakura'}).pretty() and checkout the output 
  7. 7. > db.ninja.find({'codename':'Naruto'}).pretty() { "Jutsu" : [ "Fire Dragon Missile", "Earth Landslide", "Black Rain", "Secret Tree", "Time reversal", "Water wall" ], "_id" : ObjectId("534e5fde17d860326a37faa1"), "clan" : "Uzumaki Clan", "classification" : [ "Jinchuriki", "Pseudo-Jinchuriki", "Sage" ], "codename" : "Naruto", "name" : [ { "firstname" : "Naruto", "lastname" : "Uzumaki" } ], "naturetype" : [ "wind release", "lava release", "yin-yang release" ], "rank" : "genin", "team" : [ "Team kakashi", "Sasuke retireval team" ] }
  8. 8. How to update specific document As we say, have you noticed Sakura collection show "Jutsu" not "naturetype". >db.ninja.update({'codename':'Naruto'},{$set:{'Jutsu':["Fire Dragon Missile","Earth Landslide","Black Rain","Secret Tree","Time reversal","Water wall"]}}
  9. 9. How to remove document? >db.ninja.remove({"codename":"Sakura"}) How to remove all documents in a collection? >db.ninja.remove({}) How to delete collection >db.ninja.drop()
  10. 10. So now, you can perform some of the basic operation on mongo db via mongo shell I hope these basic queries help you to give a good start I have added dummy documents in next slides. So that you can practice more by adding these documents To improve this tutorial for beginners please share your comments on pritiatwork@gmail.com
  11. 11. Dummy Document >db.ninja.save({codename:"Naruto",name:[{firstname:"Naruto",lastname:"Uz umaki"}],rank:"genin",team:["Team kakashi","Sasuke retireval team"],classification:["Jinchuriki","Pseudo-Jinchuriki","Sage"],clan:"Uzumaki Clan",naturetype:["wind release","lava release","yin-yang release"]}) >db.ninja.save({codename:"Sakura",name:[{firstname:"Sakura",lastname:"Har uno"}],rank:"Chunin",team:["Team kakashi","Eight Man Squad"],classification:["Medical-nin"],Jutsu:["Chakra Enhanced strength","Cherry Blossom Impact","Yin seal"]}) >db.ninja.save({codename:"Sasuke",name:[{firstname:"Sasuke",lastname:"Uc hiha"}],rank:"Genin",team:["Team kakashi","Sound Four","Taka"],classification:["Missing-nin"],Jutsu:["Amaterasu","Body Flame Technique","Chindori"]},naturetype:["Blaze release","Fire release","Lightning release"])

×