How JSON sparked nosql



The long hegemony of SQL and RDBMS is over. Dozens of NoSQL databases have sprung up, the document variety in particular catering to developers who favor the JSON (JavaScript Object Notation) format.

In this week's New Tech Forum, VoltDB CTO Ryan Betts looks at relational databases and JSON data structures and shows how and why they can be combined to offer the best of both worlds. -- Paul Venezia

JSON's benefits and challenges: Agility, structure, and interactivity

JSON is the data structure of the Web. It's a simple data format that allows programmers to store and communicate sets of values, lists, and key-value mappings across systems.

As JSON adoption has grown, database vendors have sprung up offering JSON-centric document databases. Now, increasingly, traditional relational-style databases are integrating JSON features, resulting in a best-of-both worlds benefit to developers and database administrators.

JSON started as the "serialized object notation" for JavaScript, the programming language of the Web. With a nice combination of simplicity (the essentials of the format are specified in five grammar diagrams at JSON.org) and "just enough structure," JSON has quickly expanded beyond the Web into applications and services. For example, JSON is displacing the more complex XML format as the serialization format for exchanging data between applications.

Developer friendliness

Application developers must manage both code and data. Code is verbs, or the instructions and descriptions of how to perform a task. Code is the recipe.

Data are the nouns: users, locations, recordings, amounts -- the ingredients the recipe combines. As more application developers adopt JSON as their preferred data format, the need is growing for JSON-friendly databases. Few coding tasks are more annoying or more bug prone than mechanically
translating information between formats.

As a consequence, several NoSQL document store database vendors have chosen JSON as their primary data representation in a stark break from traditional relational schemes used by MySQL, PostgreSQL, VoltDB, MS SQL Server, Oracle and others. This is a natural fit for developers who use JSON as the data interchange format in their applications.


Additionally, the relative agility of JSON (JSON records are well structured but easily extended) has attracted developers looking to avoid painful database schema migrations in agile environments. Data and schema, in volume, can be hard to change. Rewriting a large dataset stored on disk while
keeping the associated applications online can be time consuming. It can take days of background processing, in moderate to large examples, to upgrade data.

In contrast, JSON's lack of a predefined schema makes upgrades easy. Developers can store and update documents without restrictions.

Document vs. relational databases
Of course, eliminating restrictions and allowing arbitrary data in your database can have its downsides, too. Giving up the relational database model has drawbacks for developers, enterprise architects, and the businesses they serve. In fact, relational databases originally came to popularity
displacing systems similar in structure to today's JSON document stores.

In practice, documented-oriented databases have many intrinsic flaws. Querying a document database requires "navigating" the document. Queries must be less declarative and more navigational, resulting in tighter coupling between applications and the database. Document stores have each invented their own query languages, a regression in standardization that is unnecessary.

Though the SQL query language has many proprietary extensions, it has a well-specified core that makes applications and user skills portable across database systems. Popular document stores remove an important abstraction between physical storage of data and logical structure of data. This will be a
substantial limitation on optimizations over the long term.

The relational system abstracts the physical arrangement of data from its logical schema, enabling relational systems to make the definition of the data they store queryable. A program can introspect the logical structure and constraints of a relational system. This powerful ability has led to a rich ecosystem of management and monitoring tools for relational systems.

Finally, relational systems, unlike document store databases, allow normalization of data (i.e, data can be factored so redundant information is stored only once) and constraints that enforce consistency (e.g., every order must reference a valid customer). Document stores enable neither, putting the
full complexity of maintaining correctness on the application developer.

Shaking out a solution
Database vendors are acknowledging the adoption, popularity and the utility of the JSON format and are integrating support for JSON in to their traditional relational systems -- a best-of-both-worlds approach.

Adding the ability to store and query JSON records in the context of the traditional relational system gives developers the benefit of a powerful choice. What portions of my data should be abstracted -- and where are constraints and strict schema guarantees important to my application?  Where does
flexibility instead of consistency checks matter most? Additionally, these integrations add JSON query capability as a natural extension to SQL,
enabling powerful queries across arbitrary sets of JSON records combined with data stored in traditional table cells.


In reality, it will be substantially easier for relational vendors to extend their systems to include JSON than it will be for the new document store vendors to retrofit their non-relational systems with the features lost in the move away from relational structures. Enormous value remains in relational structure, which has proven itself over the last 20 years, along with the rich ecosystem that surrounds relational databases.

So what's so special about JSON? It's a microcosm emblematic of the deep impact of the Web and Web-oriented programming models, even penetrating to the recesses of the data management tier. It has giving rise to new vendors catering to the preferences of modern developers. And ultimately, JSON will also teach relational databases useful new tricks.

New Tech Forum provides a venue to explore and discuss emerging enterprise technology in unprecedented depth and breadth. The selection is subjective, based on our pick of the technologies we believe to be important and of greatest interest to InfoWorld readers. InfoWorld does not accept marketing collateral for publication and reserves the right to edit all contributed content. Send all inquiries to newtechforum@infoworld.com.

Comments


  1. Hi there everyone, I have come across almost all the web development sites. However, your website is far better than other in form of content, tools and easiness of using website. Since I am a developer, I am always looking forward to make people aware of web development tools. I can help you people out by introducing you to range of json tools. Here is the link jsononline


    ReplyDelete

  2. Hi there everyone. There is this incredible gadget that would surely amaze you. This heat press machine with a variety of features can do wonders. There is a separate heat press machine for T-shirts and larger items. And a 5 in 1 heat press for t-shirts, mugs, caps, mats and garments. And another 6 in 1 heat press for bags, mugs, T-shirts, caps, tiles, Plates and mouse- pads. Get yourself this amazing gadget and make your belongings look chick. Here is the link of the site Heat Press Reviews

    ReplyDelete

Post a Comment

Popular posts from this blog

VMware fix for Invalid manifest and ova file import failed errors

SOAPUI - import certificate

Session Timeout in Oracle Access Manager