The downside is that you can’t easily query against the individual fields and you can’t index individual JSON fields.
I’m bringing up C# again...
Querying with Mongo using the Mongo driver in C#....
var people = db.GetCollection<People>().AsQueryable();
var seniorMales = from p in people where p.Age >= 65 && p.Sex == “M” select p;
Querying an RDMS with EF:
var people = context.People;
var seniorMales = from p in people where p.Age >= 65 && p.Sex == “M” select p;
Both queries get translated to their respective query languages and run on the server. C# enforces the types in either case and you get compile time type checking and IDE Intellisense. In either case you can index the Age and Sex fields.
NoSQL databases aren’t “schemaless”. Mongo understands the schema of JSON data and can query against it just like an RDMS understands rows and columns.
I’m bringing up C# again...
Querying with Mongo using the Mongo driver in C#....
Querying an RDMS with EF: Both queries get translated to their respective query languages and run on the server. C# enforces the types in either case and you get compile time type checking and IDE Intellisense. In either case you can index the Age and Sex fields.NoSQL databases aren’t “schemaless”. Mongo understands the schema of JSON data and can query against it just like an RDMS understands rows and columns.