This article will provide step by step basic concept of MongoDB.where you can easily understand the core concept of MongoDB.In MongoDB collection is equal to a table and each record saves in a collection.The collection exists within the single database which is schema-less.they are two methods to create the collection in MongoDB using insert and create collection method.
It would be better if you have the basic knowledge of RDBMS concept. Actually, you are going to learn a high-performance database so we need some basics of these.It will good to cover my below articles before this.Its help to learn more about MongoDB.In which I explained.Click here What is MongoDB Relationship and MongoDB database creation step by step guideline.
They are two-way create collection in MongoDB
- CreateCollectionMethod ().
- using Insert Method().
CreateCollection Method( )
You can also create a collection without insert method ().
db.CreateCollection(Name of collection,option)
A collection like a table.The following code that explains how to create a collection using create collection method().
> use logs
switched to db logs
I create a collection that already existed.then I change the name and collection had created.
Using Insert Method ( )
A collection is automatically created in MongoDB.when inserting data in a document.The following simple code that inserts into collection and collection is created.
"phone": "+1 (958) 522-2724",
I configure MongoDB command prompt shell into IntelliJ IDEA.Next post I will show details how to configure it. First, I will create a database.then inserts data.
I wish I could tell you that a great site of MongoDB.you just understands key element above post-MongoDB collection creation.Click here More detail about collection creation. I hope you will understand this lecture.Thank you for reading this lecture. Hope you got the idea. please share it.