MongoDB & NoSQL (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)
What is BSON and why does MongoDB use BSON instead of plain JSON?
junior LevelDatabases & SQL
In Simple Words: BSON is a binary serialization format for JSON-like documents:
- Data Types: JSON only supports String, Number, Boolean, Array, Object, Null. BSON adds Date, Binary data (for hashes/images), 64-bit Integers (Long), Decimal128 (for precise financial currency), and ObjectId.
- Traversability: BSON encodes field length prefixes, allowing MongoDB to skip over unneeded fields during query scans without parsing the entire document string.