GithubHelp home page GithubHelp logo

oe_mongodb_practice's Introduction

OE_MongoDB_Practice

Laboratory practice for the Mongo DB lecture.

IF NECESSARY

install Mongo DB Comunity version form the link:

https://www.mongodb.com/try/download/community?tck=docs_server

since the new version of mongo requires the databese tools to be installed separately. they can be found in the link: https://www.mongodb.com/try/download/database-tools

(For Windows) Copy the files inside the forlder "bin" into the C:\Program Files\MongoDB\Server\x.x\bin

Prepare de Database

In a CMD window on the repository folder (Mongo DB is NOT runing)

mongoimport --db test --collection movieDetails --file imdb-new.json

What is the output of the previous command?

Run Mongo DB

mongosh

or in the previous version

mongo

Access the database "test"

use test

confirm that the data set was imported properly.

db.movieDetails.count();

You should get a total of 2295 collections

now try

db.movieDetails.findOne();

TASK

Create queries to find out the requiered information:

How many Comedies are in the movieDetails?

How many Western films exist among its genres?

How many movies in the movieDetails collection have exactly 1 award won or 1 award nominations?

How many documents list just these two writers: "Ethan Coen" and "Joel Coen", in that order?

How many movies match the following criteria?

  • The cast includes either of the following actors: "Seth MacFarlane".
  • The viewerRating is greater than 7.
  • The mpaaRating is "R".

Show the top 5 rated film with the most voted (by imdb) films. Show only title and ratings and votes.

oe_mongodb_practice's People

Contributors

ricknoboa137 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.