db.test1.insertOne( { "StudentId" :1, "StudentName" : "Joseph Connor" } ) db.test1.find() db.test1.insertOne // remove tinker show dbs db.dropDatabase() show dbs use tinker // create index db.test1.createIndex( { "StudentId": 1 }, { unique: true } ) doc = { "StudentId" :1, "StudentName" : "Joseph Connor" } doc db.test1.insertOne(doc) db.test1.insertOne(doc) doc2 = { "StudentId" :2, "StudentName" : "Susan Connor" } db.test1.insertOne(doc2) db.test1.insertMany([ { "StudentId" :5, "GPA": 3.72 }, { "StudentId" :3, "GPA": 1.69, "x": "whatever will be, will be" }, { "BCAssetId": "78c22fc6-5dec-11ec-bf63-0242ac130002", "BCAssetType": "BCAssetTypeMetadata", "BCAssetName": "BCAssetTypeMetadata: MBSEModel", "ForBCAssetType": "MBSEModel", "Version": { "Version": "1.0", "Subversion": null, "StartTime": "2019-01-13T07:23:13+06:00" } } ]) db.test1.find() use toyu db.student.find() // Show all information of students majoring in 'CINF'. // db.collection.find(query: {"major": "CINF"}, projection: { "_id": 0 }, options) db.student.find({"major": "CINF"}, { "_id": 0 } ) db.student.find({"major": "CINF"}) db.student.find({"major": "CINF"}, { "_id": false } )