Menu

Post image 1
Post image 2
1 / 2
0

BSON and OSON: documents are designed to be nested, not flat

DEV Community: mongodb·Franck Pachot·2 days ago
#x8fJ9aXQ
#dev#field#document#documents#flat#fields
Reading 0:00
15s threshold

I like vendors benchmarks as they are often good illustrations of worst practice. Rather than focusing on real implementation trade-offs, they pick an extreme case that favors their own implementation by chance but is not optimized in the competitor's — because it is simply not how that technology is meant to be used. For example, Oracle published a "2x" benchmark results using YCSB, a key-value benchmark (slide 14 here ), and a "529x" test misusing the raw BSON purpose ( here ). Both have something in common: they compare a relational database against a document database by using neither technology as it was designed to be used — no normalized tables, no nested documents, just flat key-value fields. The latter test is even worse: it uses 1,000 top-level fields in a single document. Don't do that! While having thousands of columns in an SQL table is usually undesirable, it's acceptable to have hundreds or even thousands of fields in a document, as they represent multiple entities and value objects.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More