Code Monkey home page Code Monkey logo

mongodbfac's Introduction

MongoDB

##Why ###Why would you want to use MongoDB? noSQL database so prevents SQL injections Easy to scale Can handle diverse data types - the fields of the data do not need to be predefined as with SQL JSON-like data structure - MongoDB documents map to object-orientated programming languages Lots of official drivers in various languages Tolerant of incomplete information Provides atomic operations on a single document Disadvantages of MongoDB Poor query performance due to unstructured storage No standard query syntax Cannot perform multi-document transactions Cannot support SQL joins (searching by comparing two tables) What application areas is it suitable for? Content Management MongoDB can incorporate any type of data (tweets, photos, videos etc) Internet of Things New sensors are constantly created, meaning new data; MongoDB makes it easy to incorporate new data and iterate on your data model. Robust authentication, authorisation, auditing and encryption controls protect valuable sensor data and the analytics delivered from it. Who else is using it? Forbes - custom CMS

##What ###What kind of Database is MongoDB? NoSQL SQL to MongoDB comparison (http://docs.mongodb.org/manual/reference/sql-comparison/) What databases is it similar to? Redis CouchDB

##How ###Data is being stored in Binary JSON (BSON): MongoDB represents JSON documents in binary-encoded format called BSON behind the scenes. BSON extends the JSON model to provide additional data types() and to be efficient for encoding and decoding within different languages.

JSON Data Types BSON Data Types Number Double String String Boolean Object Array Array Value Binary data Object Undefined Whitespace Object id null Boolean Date Null Regular Expression JavaScript Symbol JavaScript (with scope) 32-bit integer Timestamp 64-bit integer Min key Max key

###Setting up Install MongoDB using brew (http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/) brew update brew install mongodb //If there is an error, open a new terminal window and use sudo (sorry Nelson):// sudo mkdir sudo chown -R Install the Client Driver for Node.js (node-mongodb-native) (https://github.com/mongodb/node-mongodb-native) //create a folder for your project and cd into it npm install mongdb npm init
//this creates package.json file. Add "mongodb": "~2.0" as dependancy npm install Create a folder in your project for the data mkdir data Start the MongoDB server mongod --dbpath=./data --port 27017 Follow the rest of the instructions (from 'Connecting to MongoDB') on the github link for the node-mongodb-native module. This will take you through the various CRUD operations possible with MongoDB.

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/

mongodbfac's People

Contributors

danwhy avatar lukars avatar

Watchers

 avatar

Forkers

murrayrj

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.