Structuring Data

In order for data, or information, to prove useful, we need to organize it into a coherent structure. There are several historical developments where we have attempted to organize and standardize information structures and best practices. We need to develop standards, and organizational structures, in order to facilitate data re-use and interchange.

Relational Databases
Relational databases have been developed over the course of decades. There are several relational database engines, notably the PostgreSQL and MySQL engines. A query language, called Structured Query Language, has been developed to facilitate the discovery, manipulation, and re-organization of relational data.

Impedence Mismatch
Relational databases have an "Impedence Mismatch" between programming languages and data structures in the database. This means that extra programming methods must be used to map, or utilize, relational data in various projects, e.g. Object Oriented programs.

JSON
JSON stands for JavaScript Object Notation. JSON is semi-structured and designed to be human readable.

In JSON, there are two types of values:
 * objects {"property": "value"}
 * arrays ["lists","of","values"]

Structure: nested sets (objects, arrays)

JSON Schema
Specify structure, check for conformance. A schema is not reqiured in advance, and JSON is known as a "self describing" markup.
 * A JSON Schema can used by JSON Editors even for rendering a graphical user interface GUI (see JSON Editor for placing Icon on a Open Layers Map )

Queries
There are several competing standards for JSON querying:
 * JSON Path,
 * JAQL,
 * JSONiq

Ordering
JSON Arrays are numerically indexed and so can be considered ordered data structures.

Implementation
JSON has been implemented in many NoSQL systems (as an input/output method). Additionally, some document management systems and programming languages (JavaScript, Python, etc.) support JSON.

Programming interface
JSON maps more or less directly to many programming languages' data structures.

Learning Task

 * Create a JSON Schema from a JSON object of your choice with JSON2Schema Generator.
 * Learn to convert XML records into JSON by checking a web-based GitHub example http://dfsq.github.io/xml2json/#/xml/paste
 * Explore a GitHub Book about JSON Schema that defines the structure of a JSON file and facilitates the validation of a given JSON file against the JSON Schema.

XML
XML is structuring data like JSON. Furthermore XML provides also the concept of a Schema to check if a given XML document is valid (see Tutorial W3C Schools https://www.w3schools.com/xml/schema_intro.asp as introduction to XML Schema).