Posts

Mongobd2

 ASSIGNMENT 2 1] Create a database with the name 'Company'  > use Company switched to db Company 2] 'Employee' Collection > db.createCollection('Employee') { "ok" : 1 }   QUERIES: 1]Insert atleast 5 documents in ‘Employee’ collection. >db.Employee.insert({id:'10', fname:'Iffat', lname:'Chichkar', email:'abc@gmail.com' ,pno:'8021549632', addr:[{hno:'286', street:'Bhawani peth', city:'Pune', state:'Maharashtra', country:'India', pincode:'411042'}], salary:'35,000', designation:'CSS', experience:'Fresher', Dateofjoining:'19/06/2019', birthdate:'26/01/1999'}) WriteResult({ "nInserted" : 1 }) >db.Employee.insert({id:'11', fname:'Aishwarya', lname:'Cholayil', email:'xyz@gmail.com', pno:'9964752103', addr:[{hno:'18', street:'Undri', city:'Pune', sta...

Mongodb1

 ASSIGNMENT 1 1] Create a database with the name 'Movie'  > use Movie  switched to db Movie 2] 'Film' Collection. >db.Film.insert({id:1,title:'Dilwale',r_year:'2015',cat:'comedy',actors:[{fname:'ShahRukh',lname:'Khan'}],director:[{fname:'Rohit',lname:'Shetty'}],r_details:[{place:'Mumbai',date:'18-12-2015',rate:5}]}) WriteResult({ "nInserted" : 1 }) 3] 'Actor' Collection. >db.Actor.insert({id:1111,fname:'ShahRukh',lname:'Khan',address:[{street:'Bandstand',city:'Mumbai',country:'India',pincode:'400050'}],c_details:[{email_id:'kingkhan@aaa.com',phone_no:'9876543210'}],age:'52'}) WriteResult({ "nInserted" : 1 }) QUERIES: 1] A] Insert atleast one document with Film belonging to two categories. > db.Film.insert({ ... id:1, ... title:'Mission Mangal', ... r_year:'2019', ... cat:[...