The Thinglink data model
This post describes the data model on thinglink.org: the kinds of information that the site knows about, their fields, and the relationships between them.
Let’s start with a diagram:
You could also read A URL design for thinglink.org, published previously on this blog, to get an idea of how this data model translates onto the website.
Each of the boxes in that diagram is represented in the thinglink database with a number of fields and relationships:
The thinglink is the core of the data model. As can be seen from the diagram, all other data on thinglink.org references a thinglink. A thinglink has the following fields:
- code (e.g. 123ABC)
- viewCount (incremented every time someone views the thinglink’s webpage)
- photo (ID, url, thumbnail URL and title)
- linker (the user who created this thinglink)
- maker (one or more people who made the thing that this thinglink represents)
In order to comment or to create or edit a thinglink, users must be logged into the site. User records have the following fields:
- flickr ID and username
Thinglink tags are the same concept as flickr tags: a folksonomy made up of text strings attached to thinglinks.
Unlike flickr, tags may only be added, edited or deleted from a thinglink by the user who created the thinglink. Tags are presented on thinglink pages, and in a list on the thinglink.org homepage showing the most popular tags.
The labeling area of thinglink.org is currently under development and no label data is stored in the database.
A picture from the user’s flickr account can be associated with a thinglink. The data about this association is stored in the thinglink table as described above. The flickr picture is displayed with the thinglink in thumbnail or fullsize form wherever appropriate.
A thinglink may have the country of its origin listed. Countries are chosen from a controlled list in a dropdown on thinglink.org when the thinglink is created or edited. A list of popular countries is displayed on the thinglink.org homepage.
A thinglink may have the year of its making stated when the thinglink is created or edited. A list of popular years is displayed on the thinglink.org homepage.