I wasn’t able to find any information on the max length for a string data type in MongoDB on the main mongodb.org site. I’m coming from a relational database background and there are usually max lengths.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This other question should answer your question:
Note that in the picked answer for that question the commenter mentions that it could be as large as 8mb or 16mb now.
So to answer your question, it’s not necessarily that a single string can only be a certain length, but rather that the whole document must be under 16MB.