MongoDB collections explained

Video Player is loading.
Current Time 0:00
Duration -:-
Loaded: 0%
Stream Type LIVE
Remaining Time -:-
 
1x
7 Views
Published
#mongoDB #course #tutorial

db.createCollection("teachers", {capped : true , size : 1000 * 1024, max : 100}, {autoIndexId:false})

capped = Enables a capped collection. Oldest entries are overwritten when the collection reaches its max size.
size = specifies the maximum size in bytes (x * y bytes)
max = maximum number of documents allowed
autoIndexId = Creates an index on _id field
Category
Bro Code
Tags
MongoDB course, MongoDB tutorial, MongoDB
Show more
Be the first to comment