Clone this repository locally using:
https://github.com/SMBUD-Group14/MongoDB-project.git
Or download the repository and unzip it.
Verify that you have python installed using:
python --version
If not, download it from the official website.
Install the required packages (from the "app" folder):
pip install -r requirements.txt
-
Log into your MongoDB account
-
After creating a new Cluster, click on
Connect
on the cluster -
Then choose as connection method
Connect your application
-
Select your driver
Python
and version3.6 or later
-
Add your connection string into the application code by copying the link that has been generated
-
Replace the link obtained in line 159 of the app.py source code, remembering to replace and myFirstDatabase respectively with the user password and name of the database that the connection will use by default
-
Create the database with
database name = smbud_data
and the collections withcollection name = certifications
andcollection name = authorizedBodies
-
To populate the collections, import respectively the
certifications.csv
andab.csv
files present in thedb
folder of the repo and modify all dates with typedate
and all ids with typeobjectID
Navigate to the folder where this repository has been cloned, then into "app" folder and run:
python app.py
From there you can execute queries about the collected data.