Concept Flow - String and number types
Start: Insert Document
Check Field Types
String?
Yes→Store as String
No
Number?
Yes→Store as Number
No
Error or Other Type Handling
Document Stored in Collection
When inserting data, MongoDB checks each field's type. Strings are stored as text, numbers as numeric values, ensuring correct data handling.