Posts by Planet NoSQL
Author: Planet NoSQL
MongoDB to Couchbase for developers: Part 4: Data Modeling

Feed: Planet NoSQL. Author: Keshav Murthy. "To Embed or Not to Embed. That is the Question." HamletData 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 ... Read More
MongoDB to Couchbase for Developers. Part 3: Data Types
Feed: Planet NoSQL. Author: Keshav Murthy. In the article on MongoDB and Couchbase database objects, we saw the mapping from databases to buckets, collections to collections, documents to documents and field to fields. The data itself is stored within these fields. The {"field": "value"} is commonly called key-value pairs. Every key has a value and the value is the data. This value self describes the data under BSON or JSON definition in MongoDB and Couchbase.MongoDB uses BSON, Couchbase uses JSON -- both are document oriented and JSON based. Couchbase uses JSON exactly, MongoDB uses extended JSON called BSON, binary JSON.As part of ... Read More
MongoDB to Couchbase for Developers: Part 2: Database Objects
Feed: Planet NoSQL. Author: Keshav Murthy. 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 OrganizationA full list of MongoDB schema objects is listed here and here. A database instance can have many databases; A database can have many collections; ... Read More
MongoDB to Couchbase for Developers: Part 1: Architecture
Feed: Planet NoSQL. Author: Keshav Murthy. IntroductionBy any measure, MongoDB is a popular document-oriented JSON database. In the last dozen years, it has grown from its humble beginnings of a single lock per database to a modern multi-document transaction with snapshot isolation. MongoDB University has trained a large number of developers to develop the MongoDB database.There are many JSON databases now. While it's easy to start with MongoDB to learn NoSQL and flexible JSON schema, many customers choose Couchbase for performance, scale, and SQL. As you progress in your database evaluation and evolution, it's easier to start from what you ... Read More
Introduction to Couchbase for Oracle Developers and Experts: Part 7: Optimizer
Feed: Planet NoSQL. Author: Keshav Murthy. To database what Yoda is to Star Wars, optimizer is. - YodaSeparating the HOW (logical, physical representations, access methods) from WHAT (the SQL query) was the genius of the relational model. SQL has been unreasonably effective for relational model and beyond. A good optimizer is critical for SQL irrespective of the data model. The job of an optimizer is to produce an efficient execution algorithm, commonly known as the query plan or simply the plan. Oracle is a RDBMS, used a rule based optimizer(RBO) for many years before switching to Selinger style cost-based optimizer. ... Read More
Introduction to Couchbase for Oracle Developers and Experts: Part 8: Transactions
Feed: Planet NoSQL. Author: Keshav Murthy. Six thousand years ago, the Sumerians invented writing for transaction processing - Gray and ReuterTransaction is a set of read and write actions consisting ofUnprotected actions on the transient state outside the transaction statement scope and state (e.g. storage allocations, dictionary management)Protected change the persisted data, actions must be reflected in transaction outcomeReal actions using sensors and actuators, once done, cannot be undone.Transaction ExamplesORACLECouchbaseOracle automatically starts a multi-statement transaction for every new statement. So, issuing BEGIN WORK or START TRANSACTION is unnecessaryBEGIN WORK, START TRANSACTION are all synonymous and start a multi statement transaction. – Transaction ... Read More
Introduction to Couchbase for Oracle Developers & Experts: Part 6: indexing
Feed: Planet NoSQL. Author: Keshav Murthy. "Use the Index, Luke!" -- https://use-the-index-luke.comORACLECouchbaseOVERVIEWIndex DocumentationIndex DocumentationTypes of Indexes: Primary & secondary Index (B-tree)Bitmap IndexPartial IndexPartitioned IndexFunction-based indexSpatial indexSearch indexes (full text search)Types of Indexes: Primary & secondary index (lock-free skiplist)Partial indexPartitioned indexFunctional-key indexArray indexFlex indexesSearch indexSpatial indexIndexing data structuresB-TreeBitmapSpatialInverted treeIndexing data structuresLock-free skiplistInverted tree (text)Z-curve (spatial)CLASSES of INDEXESOracle indexes which can be large and is managed thru bufferpools. Oracle text index can be creed with inmemory option.Couchbase has two classes of indexes: Standard secondary index which can be large and relevant entries are paged in based on usage, memory optimized index, optimized for performance is ... Read More
Introduction to Couchbase for Oracle Developers & Experts: Part 5: Statements and Features.

Feed: Planet NoSQL. Author: Keshav Murthy. SQL is the only 22nd century tool available in 21st centuryHere are the articles comparing architecture, database objects, data types and data modeling of Oracle with Couchbase. This will focus on SQL support. Oracle was the first and staunch supporter of SQL. Oracle's SQL implementation beat IBM to market by two years. That changed the fortune of one or two people :-) All of the modern relational databases implement SQL. So much so, relational databases are sometimes called SQL databases, much to the chagrin of C. J. Date. Nations are known by their languages... English, French, and American(!). It's not a ... Read More
Introduction to Couchbase for Oracle Developers & Experts: Part 4: Data Modeling
Feed: Planet NoSQL. Author: Keshav Murthy. "There are three things important in the database world: Performance, Performance, and Performance." Bruce Lindsay Let me start with a real world effect of right modeling on the application performance. Here's the except from a talk by Amadeus engineers on their customer experience management application (traveler loyalty app) which they migrated from an enterprise RDBMS to Couchbase. Performance comparison between the enterprise RDBMS and Couchbase:"In terms of stability and performance, it was quite amazing as well. It has 100% availability for over one year and counting. In terms of performance, it was night and day ... Read More
Introduction to Couchbase for Oracle Developers & Experts: Part 3: Data types
Feed: Planet NoSQL. Author: Keshav Murthy. As part of data remodeling, while moving from the relational model to the JSON model, you’ll have to consider the data type mapping. In Oracle, you’ll have to create and declare the types of each column explicitly before you load the data or write queries. In Couchbase, you simply conform to JSON syntax and the data type interpretation is automatic and implicit. Here’s the overview of mappings, conversion, and arithmetic on these data types.[Here’s the home page for the series: http://blog.planetnosql.com/2022/01/introduction-to-couchbase-for-oracle.html]ReModeling: From relational to Document model OracleCouchbaseModelRelational, Object-relationalJSON model with N1QL (SQL for JSON)Data TypesLong list of ... Read More
Recent Comments