introduction to mongodb (version 2)
DESCRIPTION
TRANSCRIPT
Developing using MongoDB
Why NoSQL?
● Scalability ● Performance● Availability
Choices we have?
Database Objects
● Database● Collection● Document● Index
Map it!
MongoDB SQL Server
Database Database
Collections Tables
Document Row
What is the document here?{
_id : 1,name : “Sam Walton”,age : 74,company :
[“Walmart”,”Walton Five”]
}
In MongoDB we use JSON to represent our data. Document is more like a record in Relational Databases.
{_id : 1,name : “Sam Walton”,age : 74,company :
{ name : ”walmart”}
}
Data Type
ObjectID - 12bytesNumberStringBooleanDate/Timenull
Designing
Denormalizing is ok?
Foreign keys? NOThen How?
Is it same for all NoSQL databases?
DEMO
Indexing
Can I create Secondary indexes?
Lots of indexes ? NO?
Full text search ?
Security
● Schema Injection
● Authentication
● SSL?
● Encryption?
What else?
Write Concern
SlaveOk
journaling
Sharding
Q & A