Collections
Create a Collection
First Select Or Create a database.
switched to db mydb
Using db.createCollection ( "yourCollectionName" ) method you can explicitly create Collection.
{ "ok" : 1 }
Using show collections command see all collections in the database.
newCollection1
system. indexes
>
The db.createCollection() method has the following parameters:
Parameter Type Description
name string The name of the collection to create.
options document Optional. Configuration options for creating a capped collection or for preallocating space in a new collection.
The fllowing example shows the syntax of createCollection() method with few important options
10000 })
{ "ok" : 1 }
Anil Bist
Skills Mongodb
Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,Location :-Dehradun,Dehradun,Uttarakhand,India
Description:-
I started my Professional Journey in 2006 with one of the Web Development Company in Bangalore and my 1st framework was "Ruby on Rail" as Web development and delivered around 5+ Projects using this platform. Then came another dimension as JEE/Sturst framework, Gradually I realized that I want to build something on my own and give my passion and energy on creating something different a
Explore