Child pages
  • Getting started

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Click in the database "demo" onto the collection "zipcode"
  • Switch to table view
  • Search for the city of CHESTER. For this enter following query in the search window
Code Block
languagejs
themeEmacs
languagejs
city: 'CHESTER'
  • Run the query by clicking on the "Run"-button or by the keyboard shortcut CMD + ENTER (MAC) or CTRL + ENTER (Windows / Linux)
  • Sort the results by the column "pop" (population)

...

  • Click the button "Add document"
  • Input the following record:
Code Block
languagejs
themeEmacs
languagejs
{city: 'Demo123city',pop: 999}

...

  • Search for all the cities containing 123
Code Block
languagejs
themeEmacs
languagejs
city: /123/

Deleting a document

...

  • Select "A" (aggregation) in the toolbar for an aggregation Framework query
  • Enter the following query in the search window
Code Block
languagejs
themeEmacs
languagejs
{
	$group: {
		_id : "$state",
    	totalPop : { $sum : "$pop" } 
	} 
},
{ 
	$match: {
		totalPop : { $gte : 10000000 } 
	} 
} 

...

  • Select "C" (console) in the toolbar for the console mode
  • Enter the following query in the search window
Code Block
languagejs
themeEmacs
languagejs
db.zipcode.stats()
  • You get the statistics of the collection zipcode as result
  • Switch to the text view to see all the data at once

...