Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
23 views

?MongoDB X ?python

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
23 views

?MongoDB X ?python

Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
o1 @Mongobs using Pyt CRUD operation with MongoDB vsii SAVE ITA 02 What Is MongoDB? MongoDB is a document database with the scalability and flexibility that you want with the querying and in dexing that you need - MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from document to document and data structure can be changed over time - The document model maps to the objects in your application code, making data easy to work with - Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and analyze your data - MongoDB is a distributed database at its core, so high availability, horizontal scaling, and geographic distribution are built in and easy to use Need to run MongoDB? High avellebity through built-in replication and faover Ea Horizontal scelality with native sharding , sai “atone nncmanses - Endtovendsecunty i Saeemis - Native document validation and schema exploration ‘Tactreame) “Wy. * woress: 4 € with Compass eek HG hey tn nga - Management toting for automation, monitoring 7 and backup te - Ful elastic database as a service with bultAn , best prctces 8 SAVE ITA 03 How to perform CRUD operations in MongoDB using Python. To install pymongo we need to type the below command in the command prompt. We will be using MongoDB compass, a GUI used to interact with data stored in MongoDB. You can find the MongoDB compass installation here: https://www.mongodb.com/docs/compass/master/install/ Choose which type of deployment is best for you Download MongoDB Compass SAVE ITA 04 Firstly, we need to import the pymongo package and To connect to the MongoDB server, we will use the MongoClient method. Create Database We can create a database using the below command. Ce ea ee as) CeCe omc) SAVE ITA 05 Inserting documents in the collection SAVE ITA 06 Retrieving the data from the collection SAVE ITA 07 Updating the documents in the collection Updating the documents in the collection {"Emp_ID": {"$eq" rhe) collection, SET Ma tion.update_one(present_data, new_data) Pre rc Meee Tee a1 Ste rel eee LS eure Te Pm Ce) SAVE ITA 08 Deleting documents from the collectio ""“Deleting documents from the collection {"Emp_ID": "JA20221 caterer (query) (query) SAVE ITA

You might also like