All language subtitles for 006 MongoDB CRUD Operations in the Shell Delete_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,240 --> 00:00:07,410 So previously we've seen how to create, read and update using MongoDB in the Mongo shell. And now 2 00:00:07,410 --> 00:00:12,000 it's time to look at how we would delete data from our collections. 3 00:00:12,030 --> 00:00:18,170 And again if I scroll down in this CRUD documentation we've got a section that tells us how to do this. 4 00:00:18,340 --> 00:00:24,650 And you can see that the two main methods we'll rely on is deleteOne and deleteMany. 5 00:00:24,660 --> 00:00:27,370 And this is an example of how you would use it. 6 00:00:27,450 --> 00:00:35,460 So you would say db.collection name.deleteMany or deleteOne and in the filter you would specify 7 00:00:35,730 --> 00:00:38,510 which records you want to delete. 8 00:00:38,520 --> 00:00:44,700 This is a good opportunity to translate what you see in the documentation to actual working code that 9 00:00:44,700 --> 00:00:46,750 does what you want it to. 10 00:00:46,830 --> 00:00:53,490 I want you to remove this second record that we added which is the pencil record by reading and using 11 00:00:53,490 --> 00:00:55,590 the documentation on MongoDB. 12 00:00:55,740 --> 00:00:58,160 Pause the video now and give that a try. 13 00:01:00,410 --> 00:01:01,120 OK. 14 00:01:01,190 --> 00:01:05,920 As we saw over here all we need to implement is db.collection 15 00:01:06,020 --> 00:01:15,520 .deleteOne. And we're going to say db.products.deleteOne and then we're going to provide 16 00:01:15,550 --> 00:01:21,850 the filter to find the particular record that we want to delete which in our case it would be easier 17 00:01:22,180 --> 00:01:23,850 to just specify the id 18 00:01:23,920 --> 00:01:26,950 and in this case that's going to be equal to 2. 19 00:01:27,220 --> 00:01:34,150 So now if I hit enter then you can see that my request has been acknowledged and one record has been 20 00:01:34,150 --> 00:01:35,040 deleted. 21 00:01:35,310 --> 00:01:42,070 And now if we use that find method again you can see we only have one record in our products collection. 2166

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.