Introduction to MongoDB and setup
This commit is contained in:
54
Week-05/Day_03/README.md
Normal file
54
Week-05/Day_03/README.md
Normal file
@@ -0,0 +1,54 @@
|
||||
## Introduction to MongoDB
|
||||
|
||||
This task focuses on understanding **MongoDB**, a popular NoSQL database used in modern web applications. Unlike traditional relational databases, MongoDB stores data in a flexible, JSON-like format.
|
||||
|
||||
---
|
||||
|
||||
## MongoDB Structure
|
||||
|
||||
| Level | Description |
|
||||
| ---------- | --------------------------------- |
|
||||
| Database | Contains collections |
|
||||
| Collection | Group of documents (like a table) |
|
||||
| Document | JSON-like data (like a row) |
|
||||
|
||||
---
|
||||
|
||||
## Example Document
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Rupesh",
|
||||
"age": 23,
|
||||
"course": "MCA",
|
||||
"skills": ["JavaScript", "Node.js"]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Installation Steps
|
||||
|
||||
1. Download MongoDB from official website
|
||||
2. Install MongoDB Community Edition
|
||||
3. Start MongoDB server:
|
||||
|
||||
```bash
|
||||
mongod
|
||||
```
|
||||
|
||||
4. Open Mongo shell:
|
||||
|
||||
```bash
|
||||
mongosh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Basic Commands
|
||||
|
||||
```bash
|
||||
show dbs
|
||||
use studentDB
|
||||
show collections
|
||||
```
|
||||
Reference in New Issue
Block a user