Articles → MONGODB → Introduction To MongoDB
Introduction To MongoDB
How The Data Is Stored In MongoDB?
Relational Database VS MongoDB
| Relational Database | MongoDB |
|---|
| Table | Collection |
| Rows | Documents |
| Column | Field |
BSON
Benefits Of BSON Format Over JSON
- BSON is more lightweight than JSON
- BSON traverses much more quickly than the JSON format
- BSON supports efficient data encoding and decoding
Why BSON Is Lightweight Compared To JSON?
Data Types In BSON
| Data Type | Description |
|---|
| Double | Represents the floating-point numbers |
| String | Represents the UTF-8 encoded strings |
| Object | Represents embedded documents |
| Array | Represents arrays of elements |
| Binary Data | Represents binary data such as images or other blobs |
| ObjectID | Represents a unique identifier for documents |
| Boolean | Represents Boolean values of true or false |
| Date | Represents a date and time value |
| Null | Represents a null value |
| Regular Expression | Represents regular expression patterns |
| JavaScript | Represents JavaScript code |
| JavaScript (with scope) | Represents JavaScript code with additional scope |
| 32-bit Integer | Represents 32-bit signed integers |
| Timestamp | Represents a BSON timestamp |
| 64-bit Integer | Represents 64-bit signed integers |
| Decimal128 | Represents 128-bit decimal floating-point numbers |
| Min Key | Represents a lower bound for comparison purposes |
| Max Key | Represents an upper bound for comparison purposes |
| Posted By - | Karan Gupta |
| |
| Posted On - | Thursday, February 2, 2023 |
| |
| Updated On - | Tuesday, February 20, 2024 |