Categories
  Encyclosphere.org ENCYCLOREADER
  supported by EncyclosphereKSF

Structuring Data

From Wikiversity - Reading time: 2 min

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

[edit | edit source]

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

[edit | edit source]

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 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

[edit | edit source]

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[1])

Queries

[edit | edit source]

There are several competing standards for JSON querying:

  • JSON Path,
  • JAQL,
  • JSONiq

Ordering

[edit | edit source]

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

Implementation

[edit | edit source]

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

[edit | edit source]

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

Learning Task

[edit | edit source]
  • Create a JSON Schema from a JSON object of your choice with JSON2Schema Generator[2][3].
  • 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 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).

References

[edit | edit source]
  1. JSON Editor to create Open Layers Heatmap - Wikiversity Learning Repository on Github (2017) by Engelbert Niehaus - https://github.com/niebert/openlayer_heatmap
  2. JSON2Schema Generator - (Github repository https://niebert.github.io/JSON2Schema learning resource for Wikiversity) - Web based tool to create a JSON Schema for the Open Source JSON editor developed by Jeremy Dorn - https://niebert.github.io/JSON2Schema/ - Tool that incorporates the JSON Editor created 2017 by Engelbert Niehaus
  3. Github Wiki Documentation about JSON2Schema in Wiki of JSON Editor by Jeremy Dorn (2017) - https://github.com/jdorn/json-editor/wiki/JSON2Schema - accessed 2018/07/11

Licensed under CC BY-SA 3.0 | Source: https://en.wikiversity.org/wiki/Structuring_Data
16 views |
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF