2. About Me
• In search of my Zen programming language
• Computer Engineering Student
• President ACM-ECE 2012 - 2013
• Founder hackPR @ UPRM
• Opinionated
• @sezalcru
3. NoSQL
- Non-relational database
- Documents, Key- Value pairs, Graphs and Objects
- Dynamic Schemas
- Store object in favor of tables
- Quick setup and integration
4. So, MongoDB
- Document oriented, NoSQL
- Document structure is similar to JSON object
- Dynamic Schema
- Forgiving
- JavaScript query language
6. Go for MongoDB when…
- Developing a quick prototype
- Quick refactoring in development
- Non-relational data
- Log data
- Metadata
7. Re-think MongoDB if…
- Related data***
- Joins
- Redundancy will be an issue
- Performance can be an issue
***This is a biggie
8. Docs and Drivers
- Open Source Project
- Great documentation and community support
- Docs at: docs.mongodb.org
- Support for almost all major languages
12. Linux
Head to mongoDB website, in downloads section,
select appropriate distribution.
Download package distribution
Or
sudo apt-get install -y mongodb-org
13. Configuration
MongoDB by default stores data in the /data/db
parent directory. Create this directory using
mkdir -p /data/db
MongoDB must have read and write access to this
directory
15. Command Line Interface
MongoDB comes with a built in Command Line
Interface (CLI). To start the CLI type mongo into the
console. The CLI will be your best friend for
debugging.
16. Basic Commands
- Show current database: db
- Show available databases: show dbs
- Switch to database: use databaseName
- Show collections: show collections
- Basic JS Syntax