VS Code DB creationg issue!


    name: 'max',
    age: 29,
    email: 'max@max'
}, {
    name: 'min',
    age: 29,
    email: 'min@min'


    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")


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??

@Rahul_Masal are you running the playground all in one go or are you selecting and running portions of it individually?

What should happen if you run that whole playground should be that the blog database gets created and inside it the users and posts collections are created.

Note that a playground returns the result of the last evaluation, so in this case it will print only the documents returned by db.posts.find({})

at start first run use(db_name) after that running queries one by one/individually and use(db_name) running once at start only.

after that not running!