use('blog')
db.users.insertMany([{
name: 'max',
age: 29,
email: 'max@max'
}, {
name: 'min',
age: 29,
email: 'min@min'
}]);
db.users.find({});
db.posts.insertOne({
title: 'My Post',
text: 'This is my first post, I hope you liked it!',
tags: ['new', 'tech'],
creator: ObjectId("65749dd2aadb2c0129ae7722"),
comments: [{
text: 'I like this post',
author: ObjectId("65749dd2aadb2c0129ae7723")
}]
});
db.posts.find({});
I am using the vs code extension of MongoDB and using the playground to learn MongoDB but whenever I try to use a new database, it’s not creating a new it’s using some test-named database and creating collection in it, why this is happening??