Needle's "Blank" Data Format
Written by Chuck McCallum Tuesday, 31 August 2010 17:42
In Needle, the underlying data is a graph: "nodes" of data are linked to other data nodes. If you're used to thinking of your data as tables, either single spreadsheets or relational tables in a database, this can be an adjustment. After you're used to it, though, a graph representation will often feel more natural. In cases where it isn't, a table can still be straightforwardly represented as a graph.
There are some cases where the graph representation isn't immediately obvious. Take this example:
| Date | Time | Home | Away |
|---|---|---|---|
| Sept. 4 | 7:30pm | D.C. United | Columbus |
| Sept. 4 | 8:30pm | FC Dallas | Toronto FC |
| Sept. 5 | 8:30pm | Houston | San Jose |
This is a portion of the Major League Soccer schedule. It's about games, but there isn't anything by itself that can stand for a distinct game: Games don't have names. Instead, in Needle, we would create a "Game" type with a "blank" data format. "Blank" means it has no intrinsic value of its own, and is instead defined by its links to a "Date/Time", "Home", and "Away". Were it not for double headers, the time wouldn't be essential to the definition of a game.

Two new sample domains are good examples of the versatility of "blank" data formats: U.S. nuclear reactors and the CDC's vaccine recomendations for travellers. If you look at the domain model for the CDC domain, you'll see that "Vaccine Recommendation" has a "blank" data format and is related to a single "Vaccine or Disease", a single "Explanation", and any number of countries:
- Vaccine Recommendation:
- Vaccine or Disease
- Explanation
- Country (multiple)
The U.S. Nuclear Reactors domain is similar: When you look at its domain model, note that "Reactor" has a "blank" data format, and is linked to a single "Plant" and a single "Unit Number".
- Reactor:
- Plant
- Unit Number
| < Prev | Next > |
|---|



