3. Semi-structured Data (JSON & XML) Flashcards
What is structured data? Given an example
Data with high degree of organization, conforming to a data model which defines what the fields of data are and how they will be stored.
An example of this is data in a relational database, where data is managed using SQL
What is semi structured data? Give an example
Form of structured data which does not conform to a formal structure such as with relational databases, but does contain tags and/or markers to enforce hierarchies of records and fields within data.
An example of this is using JSON, which allows transfer of data between programs using parsers such as javax
What is unstructured data? Give and example
Data that does not conform to any formal structure or data model, or is not organized in a pre-defined manner.
An example of this is gathering bulk text online, or media such as images and streamed data
Describe the main features of JSON (3)
- JavaScript Object Notation is a standard data-interchange format derived from JavaScript
- It is text based so is language dependent, so can be used with any programming language.
- It is so popular because it’s easy for humans to read and write, but is also easy for machines to parse and generate
Describe the main features of XML (3)
- eXtensible Markup Language is standard, flexible text format derived from SGML
- It was originally designed to meet the challenges of large-scale electronic publishing
- Used to exchange a wide variety of data on the web
How would XML be ‘well-formed’ (3)
- It contains only properly encoded legal Unicode characters
- The begin, end and empty-element tags that delimit elements are all correctly nested
- There is a single root element that contains all other elements
What is a Streaming API? (3)
- Provides input and output streams that recognise basic syntax
- Provides methods to read/write next tag or object from document
- Good for query and modify tasks, and processing large objects
What is a Object Model (In-memory) API? (3)
- Provides in-memory representation of whole XML document or JSON object
- Provides methods to read/write whole thing
- Good for load and unload tasks, particularly for smaller objects