By using db.dropDatabase() command we would be able to delete one database at a time. So to delete multiply database we can use loop function like forEach() and loop all the database and delete them. The code:- Mongo().getDBNames().forEach(function(x) { if (['admin', 'config', 'local'].indexOf(x) < 0) { Mongo().getDB(x).dropDatabase(); } })
@anshikgupta29935 жыл бұрын
This video is really helpful but I still didn't understood how to link documents or how to link collections if you can clarify with more videos
@piyushtakale46484 жыл бұрын
someone please help me i have date stored in my mongodb database in ISO format i want to find documents using date in java i searched everywhere i havent found it. the problem is i have to store the date in the same iso format and search using date object only. and the date objects stores the date in like ... Thu Aug 20 00:00:00 IST 2020.... that is why its not working someone please help me
@Code-Patel5 жыл бұрын
One question sir. What about when we need to add one more comment after inserting record? I mean to say what about when we need to update this db for add one new comment
@paolourielenriquez97155 жыл бұрын
You inserted a comment with reply, in comments collection, but didn't associate the reply, in replies collection, to your comment. The inserted document in replies collection was useless.
@hikari00xx4 жыл бұрын
11:10 then what is this? an embedded or a link?
@darshanraut5543 жыл бұрын
Waste of time
@FeelFreeToCode5 жыл бұрын
Sir you are my motivator 👍😊😊😊😊
@narutodihargo Жыл бұрын
00:00= One to One, 00:50= OneToMany example, 02:05= Drop databases,
@helloWorldPlus2 жыл бұрын
Hello. And how would be done if the id is auto generated by the Atlas MongoDB and is not known?
@dharmendraprasad1984 жыл бұрын
show dbs use oldStudents db.dropDatabse()
@mritunjaisharma12424 жыл бұрын
how we can retrieve the data, if we have 2 database say 1db and 2db, in 1db we have 'user' collection which include some personal data like firstName, lastName, rollNumber in that we have some duplicate rollNumber user are persent and in db 2 we have 'trip' collection, where we have rollNumber, dateOfTravel, etc..which were created by respective rollNumber now how we can fetch the data which is having duplicate user detail from db 1 and respective trip also.
@amanmanojpreeti3 жыл бұрын
To delete courses db: 1. use courses 2. db.dropDatabase()
@kartikgupta37564 жыл бұрын
How can we query the latest top 10 replies of that particular comment?
@NewtonIsLive5 жыл бұрын
I wanted to know how to add a reply later when a comment has been inserted. and then how to fetch replies and their backwards how to know this reply belongs to which comment
@charans18453 жыл бұрын
If replies gets nested, how to design the database?. please reply.
@villanprabu75394 жыл бұрын
why did you create new collection called replies. some time we got replies of replies multiple correct . but you can use same comments table and just refer comments id only
@danielalfonsogarcia75655 жыл бұрын
how do i add more elements to that array?
@dwezyow91464 жыл бұрын
this is what i expected from the video, ops but theres nothing.
@ashishchhikara78293 жыл бұрын
use array.push(element)
@viveks-yt4 жыл бұрын
What's wrong in referring the document?
@johnnydriesen75755 жыл бұрын
Supposing the next vid is going to be ... ManyToMany Relations ... Can't wait for it ... Since months, I'm struggling with situations like ... e.g. A Product has many Suppliers A Supplier delivers many Products A Product has a different price per Supplier ... Can't wait for a good solution :)
@nadim.a43514 жыл бұрын
I'm sorry, months? you could just check the mongodb website. It's true that it's easier to just watch a video, but if I had no other option I would check the official website documentation instead of just waiting for a video.
@pradeepadmingradalpharecord4 жыл бұрын
Just an excercise to test my knowledge db.product.insertOne({name: "Product1", suppliers: [{supplier_id: "123", price: 321}, {supplier_id: "134", price: 341}]}); db.supplier.insertMany([{_id: "123", name: "Supplier1"}, {_id: "134", name: "Supplier2"}])
@temitopeagboolanuel4 жыл бұрын
I'm also presently struggling with Mongoose populate which does the same thing. I've tried many methods, none is working; I've been literally frustrated by this.
@vipinkrishna65365 жыл бұрын
use hiteshDB db.dropDatabase()
@kamranjaved55835 жыл бұрын
Sir , I am working on a webapp where app require a company signup, i want to create a separate db for each company. i am using mongoose for mongodb .. since mongodb doesn't support query to create Database. So what should i do so that i can create my DB dynamically in a node js application Please help me ..as i am new in this field
@wassaufkhalid85932 жыл бұрын
A better approach could have been to use the id of the comment inside the reply object. This will not require addition of ids to comment each time while adding a new reply
@sajed80775 жыл бұрын
Love from Kashmir sir
@tejasmahajan40405 жыл бұрын
Hi Hitesh, I have come across a scenario I have Hashmap in document Map, and I want to find document on basis of string which is present in List of value in map, is it possible can you please help me?
@ArifAli-hl2xk3 жыл бұрын
what happen when someone edit that reply?
@code_react5 жыл бұрын
Well the second method is pretty good but i am thinking about memory of mongodb document. i guess it provides you 16mb size and i am sure that by using second method your memory will fill up very quickly. Note: i am not mongodb expert i am also beginner but i read that on mongodb docs.
@gaganchoudhary61145 жыл бұрын
Use the delete delete('delete key':'delete data',()=>{using callback})
@Script_Sage4 жыл бұрын
Embedded or Referenced.
@aninditadas73483 жыл бұрын
Hello,Thanks for the video. But how can we edit a single reply, if we approach the second one?
@angulardesign74123 жыл бұрын
plz make on nodejs sequalize relationships hasmany like
@omarhegazi16135 жыл бұрын
these are a normal crud operations that has nothing to do with relations in mongodb , please understand the subject first before recording a video
@dharsan.s79375 жыл бұрын
Hi tech my bro / teacher I love u brooooo
@prakharsingh45312 жыл бұрын
db.dropDatabase() command used to delete existing database
@masifqadri123 жыл бұрын
Sorry Boss Not Agree with the current example in replies, table add _id column with reply/replies
@FeelFreeToCode5 жыл бұрын
Great 💐👌👌👌👌
@SamareshMaity2314 жыл бұрын
thank you
@vishaltalukar66765 жыл бұрын
Can to make videos on data science using python for free?
@krushna74673 жыл бұрын
db.name.drop() ?
@mr_don_key5 жыл бұрын
very odd that you can explain relationships in mongo.. but are not able to remove collections.. :)
@praveenrangasubhe93742 жыл бұрын
db.collectionname.drop()
@taherlunavadi25595 жыл бұрын
use youtube db.dropDatabase()
@techspider25284 жыл бұрын
use exampledb db.dropDatabase()
@teklezegergish4 жыл бұрын
Use drop to delete from mongo DB
@fincept-tilak21725 жыл бұрын
Data science
@cristianyamidperezgranda29494 жыл бұрын
Thanks, ¿what's is the best way to get all replies from all comments?, is convenient create other collection to duplicate all replies?, thank you, nice video
@disasterunfold78854 жыл бұрын
db.dropDatabase() as simple as that
@jijinp16125 жыл бұрын
mongo youtube --eval "db.dropDatabase()"
@pavanagarwal67534 жыл бұрын
can i edit my comment? Answer is "yes"
@Srinath666 Жыл бұрын
use and after that db.dropDatabase() to delete
@muramullasiri50874 жыл бұрын
db.dropDatabase()
@sweetdevil36474 жыл бұрын
db.COLLECTION_NAME.drop() !!!
@vishaltalukar66765 жыл бұрын
First
@akhilakhil93254 жыл бұрын
poor
@NewtonIsLive5 жыл бұрын
you wasted my time , waste of time
@NewtonIsLive5 жыл бұрын
you wasted my time..
@usamajaved35092 жыл бұрын
> show dbs - list of Databases > use > db.dropDatabase()