Giter Club home page Giter Club logo

mongodb-project's Introduction

ASSIGNEMENT-MongoDB

MongoDB

4 TH FEBRUARY 2018

Team Members:

Prashant Wankhede Abhishek Shankarnarayanan

	ETL Section
	Python modules used:

• Codecs • Pymongo

Strategy:

Open files (movies.dat, ratings.dat, tags.dat) in a read mode using codecs module as file handler.

Using lines.strip(), so that then all lines won't be held at the same time. Then splitting each line on ::

separated values according to column names. Finally, inserting each line using db.collectionname.insert_one() command to successfully record into the mongo database “db” at location C:\data\db where the server is running at localhost:27017.

Questions

Answers for all questions are as follows including additional personal queries from Question 5 to 7.

1)What genre is the movie CopyCat in?

Answer:

Crime|Drama|Horror|Mystery|Thriller

2)what genre has the most movies?

Answer:

Genre | Count


Action | 1473 Adventure | 1025 Animation | 286 Children's | 0 Comedy | 3703 Crime | 1118 Documentary | 482 Drama | 5339 Maximum value Fantasy | 543 Film-Noir | 148 Horror | 1013 Musical | 436 Mystery | 509 Romance | 1685 Sci-Fi | 754 Thriller | 1706 War | 511 Western | 275

3)what tags did user 146 use to describe the movie "2001: A Space Odyssey”

Answer:

set(Arthur C. Clarke,artificial intelligence,based on a book)

4)What are the top 5 movies with the highest avg rating?

Answer:

Movie ID: 64275 | Avg Rating: 5.0 Movie ID: 42783 | Avg Rating: 5.0 Movie ID: 33264 | Avg Rating: 5.0 Movie ID: 53355 | Avg Rating: 5.0 Movie ID: 51209 | Avg Rating: 5.0

5) How many the number of movies a particular user has rated?

Answer:

userid:14717

44

6) List the users similar to a particular user in terms of rating?

Answer:

userid: 1 139 149 182 215 217 281 326 351 357 426 456 459 494 517 524 556 588 589 590 601 621 634 672 701 719 745 757 775 780 785 …..

7) Which tag appears most?

Answer:

sci-fi

mongodb-project's People

Contributors

prashaw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.