introduction to mongodb (version 2)

14

Click here to load reader

Upload: dedunu-dhananjaya

Post on 01-Nov-2014

241 views

Category:

Technology


5 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Introduction to MongoDB (Version 2)

Developing using MongoDB

Page 2: Introduction to MongoDB (Version 2)
Page 3: Introduction to MongoDB (Version 2)

Why NoSQL?

● Scalability ● Performance● Availability

Page 4: Introduction to MongoDB (Version 2)

Choices we have?

Page 5: Introduction to MongoDB (Version 2)

Database Objects

● Database● Collection● Document● Index

Page 6: Introduction to MongoDB (Version 2)

Map it!

MongoDB SQL Server

Database Database

Collections Tables

Document Row

Page 7: Introduction to MongoDB (Version 2)

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”}

}

Page 8: Introduction to MongoDB (Version 2)

Data Type

ObjectID - 12bytesNumberStringBooleanDate/Timenull

Page 9: Introduction to MongoDB (Version 2)

Designing

Denormalizing is ok?

Foreign keys? NOThen How?

Is it same for all NoSQL databases?

Page 10: Introduction to MongoDB (Version 2)

DEMO

Page 11: Introduction to MongoDB (Version 2)

Indexing

Can I create Secondary indexes?

Lots of indexes ? NO?

Full text search ?

Page 12: Introduction to MongoDB (Version 2)

Security

● Schema Injection

● Authentication

● SSL?

● Encryption?

Page 13: Introduction to MongoDB (Version 2)

What else?

Write Concern

SlaveOk

journaling

Sharding

Page 14: Introduction to MongoDB (Version 2)

Q & A