Skip to main content

Posts

Showing posts with the label N1QL

MongoDB to Couchbase for developers: Part 4: Data Modeling

"To Embed or Not to Embed. That is the Question."    Hamlet Data modeling is a well defined and mature field in relational database systems. The model provides a consistent framework for application developers to add and manipulate the data. Everything is great until you need to change. This lack of schema flexibility was a key trigger NoSQL database systems.   As we've learned before , both MongoDB and Couchbase are JSON based document database.   JSON gives the developers the schema flexibility; the indexes,  collections, query engine provide access paths to this data;  the developer uses MQL in MongoDB and N1QL in Couchbase to query this data.  Let's compare the modeling methods in Couchbase. Note: T his article is short because the modeling options are similar. That's a good thing. Some differences in modeling options, access methods and optimizations are highlighted below. Query processing on JSON Comparison of modeling options and featu...

MongoDB to Couchbase for Developers: Part 2: Database Objects

    MongoDB developers and DBAs work with physical clusters, machines, instances, storage systems, disks, etc. All MongoDB users, developers, and their applications work with logical entities: databases, collections, documents, fields, shards, users, data types.  There are a lot of similarities with Couchbase since both are document (JSON) oriented databases.  Let’s compare and contrast the two with respect to database objects.  Here’s the first part of this series comparing the architecture.   MongoDB Organization A full list of MongoDB schema objects is listed here and here . A database instance can have many databases; A database can have many collections; Each collection can have many indexes.  Each collection can be sharded based into multiple chunks on multiple nodes of a cluster using hash-sharding strategy or index sharding strategy.  The MongoDB indexes are local to their data.  Therefore, the indexes use the same strategy as ...