Code Monkey home page Code Monkey logo

wdi-11-mongo-lab's Introduction

ga_cog

wdi-11-chi curious-turtles

chief engineer Miles O'Brien

Mongo Lab

  1. Create a database called "lab"

  2. "Use" that database

  3. Create a collection in that database called "employees"

  4. Run this code to insert many documents into your employees collection

    db.employees.insert([{
    	name: 'Daisy',
    	dob: new Date(1992,2,13,7,47),
    	loves: ['carrot','papaya'],
    	weight: 600,
    	gender: 'm',
    	salary: 63
    },{
    	name: 'Aurora',
    	dob: new Date(1991, 0, 24, 13, 0),
    	loves: ['carrot', 'grape'],
    	weight: 450,
    	gender: 'f',
    	salary: 43
    },{
    	name: 'Unicrom',
    	dob: new Date(1973, 1, 9, 22, 10),
    	loves: ['energon', 'redbull'],
    	weight: 984,
    	gender: 'm',
    	salary: 182
    },{
    	name: 'Roooooodles',
    	dob: new Date(1979, 7, 18, 18, 44),
    	loves: ['apple'],
    	weight: 575,
    	gender: 'm',
    	salary: 99
    },{
    	name: 'Solnara',
    	dob: new Date(1985, 6, 4, 2, 1),
    	loves:['apple', 'carrot','chocolate'],
    	weight:550,
    	gender:'f',
    	salary:80
    },{
    	name:'Ayna',
    	dob: new Date(1998, 2, 7, 8, 30),
    	loves: ['strawberry', 'lemon'],
    	weight: 733,
    	gender: 'f',
    	salary: 40
    },{
    	name:'Kenny',
    	dob: new Date(1997, 6, 1, 10, 42),
    	loves: ['grape', 'lemon'],
    	weight: 690,
    	gender: 'm',
    	salary: 39
    },{
    	name: 'Raleigh',
    	dob: new Date(2005, 4, 3, 0, 57),
    	loves: ['apple', 'sugar'],
    	weight: 421,
    	gender: 'm',
    	salary: 2
    },{
    	name: 'Leia',
    	dob: new Date(2001, 9, 8, 14, 53),
    	loves: ['apple', 'watermelon'],
    	weight: 601,
    	gender: 'f',
    	salary: 33
    },{
    	name: 'Pilot',
    	dob: new Date(1997, 2, 1, 5, 3),
    	loves: ['apple', 'watermelon'],
    	weight: 650,
    	gender: 'm',
    	salary: 54
    },{
    	name: 'Nimue',
    	dob: new Date(1999, 11, 20, 16, 15),
    	loves: ['grape', 'carrot'],
    	weight: 540,
    	gender: 'f'
    },{
    	name: 'Dunx',
    	dob: new Date(1976, 6, 18, 18, 18),
    	loves: ['grape', 'watermelon'],
    	weight: 704,
    	gender: 'm',
    	salary: 165}]);
    
  5. Read along with these notes about mongo which will go slightly (but only slightly) deeper than we just did. Follow through each of the explanations. Follow the commands and perform appropriate finds after each update call to see the results.

wdi-11-mongo-lab's People

Contributors

reubenayres avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.