This repository contains Python scripts for interacting with a locally hosted MongoDB instance. The provided scripts facilitate connecting to the MongoDB server, loading the sample_mflix database, and solving queries related to comments, movies, and theaters.
-
Clone the Repository: Clone this repository to your local machine:
git clone <repository_url>
-
Navigate to Repository Directory: Move into the cloned repository directory:
cd <repository_directory>
-
Install Dependencies: Install the required Python libraries listed in
requirements.txt:pip install -r requirements.txt
-
Connect to MongoDB Server: Use
connectServer.pyto connect to your local MongoDB instance. Ensure MongoDB server is running.python connectServer.py
-
Load Sample Database: Run
create-load-database.pyto load thesample_mflixdataset into your MongoDB database.python create-load-database.py
- commentsSolution.py: Contains methods to solve MongoDB queries related to comments section.
- moviesSolution.py: Contains methods to solve MongoDB queries related to movies section.
- theatreSolution.py: Contains methods to solve MongoDB queries related to theaters section.