2. Today
09:00-10:00 AM - Arrivals and Light Breakfast
10:00-11:00 AM - Introduction to HTTP & Node.js
11:00-12:00 AM - Introduction to MongoDB
12:00-01:00 PM - Building a Simple API
01:00-02:00 PM - Light Lunch
02:00-03:00 PM - Introduction to Swift
03:00-04:00 PM - Building a Basic Store App
04:00-05:00 PM - Adding Controls, Maps & Networking
05:00-05:30 PM - Q&A and Departure
3. About Us
Docler Media is a well-funded, progressive tech startup in
Los Angeles. A part of the massive and massively
successful Docler Holding group of international
companies, we are centered around the idea of creating
unique, exciting and fun products and services.
5. Agenda
• Learn the history of MongoDB
• Install Homebrew
• Install MongoDB
• MongoDB using a shell
• Using mLab
6. MongoDB vs SQL
• Philosophy - NoSQL vs Relational
• Data - JSON vs Binary
• Hosting - In-Memory vs on disk
• Format - Documents vs Records
• Strengths - Built for reads, not for writes
• Relationships - Joins vs MapReduce
• Performance - MongoDB vs SQL
• Schema - Strict vs Schemaless
• Queries - SQL vs BSON
7. History of MongoDB
• MongoDB (from humongous) is a cross-
platform document-oriented database
• 2007 - 10gen began developing MongoDB
as a component of PaaS.
• 2009 - the company shifted to an open
source development model, offering
commercial support & other services.
• 2013 - 10gen changes its name to
MongoDB Inc.
8. MongoDB Facts
• Component of the MEAN stack
• Database = Databases
• Table = Collection
• Record = Document
• BSON Document has a limit of 16MB
15. Starting MongoDB Locally
# if you get /data/db missing error
sudo mkdir -p /data/db/
sudo chown `id -u` /data/db
# in terminal window, start the daemon
mongod
# in another terminal window, start mongo
mongo
16. CREATE & READ Documents
db
use addressbook
show collections
db.customers.save({"name":"JL",
"lastname":"David"})
db.customers.find()
db.getCollectionNames()
show dbs
db.help()