Posts

Showing posts from November, 2023

Neo4j

 Neo4j Solutions Library database: create(author:Person{name:"John Le Carre",born:19-10-1932}) create(reader:Person{name:"lan"}) create(reader:Person{name:"Alan"}) create(supplier:Person{name:"Rahul"}) create(book1:Book{name:"Story Book",title:["Tinker","Tailor","Soldier","spy"],published:1974,city:"Pune"}) create(book2:Book{name:"Suspens Story Book",title:"One Man in Havana",published:1958,city:'Mumbai'}) create(publisher1:Publisher{name:'Mr.Joshi',City:'Pune'}) match(n) return n Relationships: match(a:Publisher),(b:Book) where a.name="Mr.Joshi" and b.name="Story Book" create (a)-[r1:published_by]->(b)  match(a:Publisher),(b:Book) where a.name="Mr.Joshi" and b.name="Suspense Story Book" create (a)-[r1:published_by]->(b)  match(a:Person),(b:Book) where a.name="John Le Carre" and b.name=...

Mongodb4

 ASSIGNMENT 4 1] Sort the employees in the descending order of their designation.  > db.Employee.find().sort({designation:-1}).pretty() {  "_id" : ObjectId("5d882bd60cf0806c8460b5ba"),  "id" : "10",  "fname" : "Iffat",  "lname" : "Chichkar",  "email" : "abc@gmail.com",  "pno" : "8021549632",  "addr" : [   {    "hno" : "20",    "street" : "MG. Road",    "city" : "Pune",    "state" : "Maharashtra",    "country" : "India",    "pincode" : "411028"   }  ],  "salary" : "35,000",  "designation" : "Manager",  "experience" : "Fresher",  "Dateofjoining" : "19/06/2019",  "birthdate" : "26/01/1999" } 2] Count the total number of employees in a collec...

Mongodb3

 ASSIGNMENT  3 1] Find the titles of all the films starting with the letter ‘A’ released during the year 2019.   > db.Movie.find({Fname:/^A/},{$and:[{Release:{$gt:'2009'}},{Release:{$lt:'2019'}}]}) { "_id" : ObjectId("5d7c7197244112940e51b775") } > db.Movie.aggregate([{$group:{_id:'$Actors',name:{$push:'$Fname'}}}]).pretty() { "_id" : [ { "Afname" : "Patrick", "Alname" : "Louse" } ], "name" : [ "IT" ] } { "_id" : [ { "Afname" : "Sharukh", "Alname" : "Khan" } ], "name" : [ "DDLJ", "Love you Zindagi" ] } { "_id" : [ { "Afname" : [ "Akshay", "Ritesh" ], "Alname" : [ "Kumar", "Deshmukh" ] } ], "name" : [ ...