PyMongo is a Python distribution that contains tools for working with MongoDB, So in this blog post let's see some basic methods that perform CRUD operations to a collection. insert_one(), insert_many(), find_one(), find(), update(), delete(), ...
I, Connect and Create Database
II, Create, Write
1, insert()
can be used to insert 1 or more records.
insert() method returns
2, insert_one()
inserts a single record into a DB
3, insert_many()
inserts multiple record into a collection
III, Update
1, update()
2, update_one()
3, update_many()
4, replace_one()
IV, Select data, Read, Find, Search, Sort
1, find()
returns all records
2, find_one()
return first record
3, Filter
find all records whose username starts with 'a'
4, Sort
ASC
DESC