MongoDB
DataTypes
zariga.com
DataType
• Null Datatype : ,“mName”:null-
• String : ,“fName”:”anish”-
• Boolean : ,“married”:false}
• Date : ,“accountOpeningDate”: new Date()-
• Array : ,“posts” : *“good”,”bad”,”average”+-
• embeddedDocument : ,“publisher" : ,“name" :
“address"--
• BSON (Covered Later)
• ObjectId
• More detailed
http://api.mongodb.org/perl/current/MongoDB/DataTyp
es.html
zariga.com
Most important the AutoGenerated
Object ID DataType
• Size 12 bytes
• First 4 refer to timeStamp (513c60fa)
• Next 3 byte : hash of the hostname (b2080f)
• Next 2 bytes taken from the PID (8932)
• Last three byte is increment counter (86d0a4)
Example
> db.user.find()
• { "_id" : ObjectId("513c60fab2080f893286d0a4"),
"lName" : "anish", "date" : ISODate("2013-03-
10T10:31:18.632Z") }
zariga.com
•Thanks for Watching
feedback
appreciated………………
…………
zariga.com

Mongo db datatypes

  • 1.
  • 2.
    DataType • Null Datatype: ,“mName”:null- • String : ,“fName”:”anish”- • Boolean : ,“married”:false} • Date : ,“accountOpeningDate”: new Date()- • Array : ,“posts” : *“good”,”bad”,”average”+- • embeddedDocument : ,“publisher" : ,“name" : “address"-- • BSON (Covered Later) • ObjectId • More detailed http://api.mongodb.org/perl/current/MongoDB/DataTyp es.html zariga.com
  • 3.
    Most important theAutoGenerated Object ID DataType • Size 12 bytes • First 4 refer to timeStamp (513c60fa) • Next 3 byte : hash of the hostname (b2080f) • Next 2 bytes taken from the PID (8932) • Last three byte is increment counter (86d0a4) Example > db.user.find() • { "_id" : ObjectId("513c60fab2080f893286d0a4"), "lName" : "anish", "date" : ISODate("2013-03- 10T10:31:18.632Z") } zariga.com
  • 4.