This repository contains a MongoDB mini-project showcasing basic database operations such as creating users, collections, inserting, querying data, managing indexes and implementing user roles and privileges. It includes a JavaScript file with MongoDB commands and a directory of screenshots demonstrating authorization configurations.
- User creation and role assignment with specific privileges.
- Creation of collections and insertion of sample data.
- Index creation for optimized queries.
- Basic CRUD operations (Create, Read, Update, Delete).
- Aggregation queries for data analysis.
- Screenshots illustrating MongoDB authorization setups.
-
Ensure you have MongoDB installed and running on your local machine.
-
Clone this repository to your local machine:
git clone https://github.com/GMKAKISTOS/Mini_Project_MongoDB.git cd Mini_Project_MongoDB
-
Connect to MongoDB: You can connect to MongoDB using the MongoDB shell or a MongoDB client such as Compass.
-
Run the script: Execute the
Mini_Project_MongoDB.jsfile in the MongoDB shell. This script contains commands to create users, collections, insert data and perform various database operations. Open the MongoDB shell and run:mongo < Mini_Project_MongoDB.js
Alternatively, paste the contents of the file directly into the MongoDB shell.
3. View Screenshots: Refer to the screenshots in the MongoDB_Authorization directory for guidance on setting up user roles and privileges. These images provide a visual reference for configuring authentication.
- MongoDB: The primary database system used in this project. Required for running the provided JavaScript script.