Display the tables listed in database load libraries

This preview shows page 5 - 8 out of 8 pages.

Display the tables listed in database Print(dbShowCollections(conn)) Load libraries library(“RMongo”) library(“mongolite”) bank.csv is a dataset which is being stored in mongodb using below code.
Post_data = data.table::fread(“bank.csv”) My_collection = mongo(collection = “post_data”, db=mydb ) My_collection$insert(Post_data) IN PYTHON:- Import pymongo Import json Import pprint Conn = MongoClient(port=27017) Select_db= conn.mydb Post = select_db.movie #Create a collection Post_data = { ‘title’ : ’python and MongoDB learning’ , ‘content’ : ’pymongo is fun’, ‘Author’ : ’Ajith’ } #Store the above created collection in mydb database using its instance named Select_db Result = post.insert_one(post_data)
4. Why do we call MongoDB as Schema less database?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture