2.01 Introduction
Data is structured in some form, and we have to be concerned about that. There are different levels of structure which can be considered:
Some of the shapes of data we will deal with are:
2.02 Tables
A table has cells with a number of rows and columns. In our case, every row represents a thing. Each column represents a type of information about that thing.
Tables are easy to understand and structure. They’re also very direct in how they communicate information. Tables are very important to Relational Databases.
However, they’re not so good at communicating or structuring data that branches or has hierarchy. A better suited representation for such data would be Trees.
2.03 Trees
A tree in Computer Science is a data structure based on the metaphor of a real tree.
It is worth noting that HTML and XML are examples of tree structures.
Every tree has a root node, every branch in the tree has a path to the root.
Here’s a way of showing data in the form of a tree:
2.04 Other data structures
There are other data structures other than tables and trees:
Graphs
A graph is a tree where we remove the requirement for every node to have exactly one parent. This is more like the WWW. Heterogenous, non-hierarchical, structured data.
The vertices in a graph could be web pages and the edges could be links between them, or perhaps each node is a file with the edges being a filesystem path.
Blobs
Blobs are raw data representations without a perceivable structure. For example, a raw sound file.
Features
Features are pieces of information derived from blobs, for example the sample rate from a raw audio file.
Leave a Reply