Skip to main content


developerWorks  >  XML | Web development  >

Push RSS to new limits

Use RSS to construct an associative database

developerWorks

Level: Intermediate

Jonathan Levin , Trainer and consultant, Freelance

18 Dec 2007

Register now or sign in using your IBM ID and password.

This tutorial presents an innovative use of the well-known Really Simple Syndication (RSS) format's associative properties to emulate the functionality of a simple relational database. It demonstrates using RSS channels to store contact information and meeting information—much as a personal address book and calendar does. It uses RSS elements and attributes such as items and guids to create a neural-network-like mesh of related data.

In this tutorial

This tutorial is intended for people who want to better understand the well-known Really Simple Syndication (RSS) format and what it can do. Specifically, it shows how to leverage some of the lesser-known features of RSS to provide better data storage.

This tutorial assumes that you understand the basic concepts of XML, but familiarity with RSS is not required. Programming examples use PHP, but the basic concepts apply for any programming language.

Share this...

digg Digg this story
del.icio.us Post to del.icio.us
Slashdot Slashdot it!

Many people know that RSS is the format used for most syndication purposes, such as site feeds, but in the past few years it's also become the storage format of choice for other applications, such as data distribution, contact management, and other purposes. By storing data as RSS, you make it possible to use RSS aggregators and readers to access that data.

All of this leads to the notion of using RSS to store information that previously might be stored in a relational database.


Objectives

  • Review the RSS format and some actual feed samples.

  • Redefine classic RSS format for an alternative purpose: storing arbitrary data items and their associations.

  • Define your database format with three tables, query them, and provide an associative lookup.

  • Handle the query results, leave them in XML form or transform them to user-presentable content using XML StyleSheet Transformation Language (XSLT).

Prerequisites

You'll need the following tools to follow along with this tutorial:

  • PHP: Any version of PHP will do nicely. This tutorial uses PHP's back-end textual processing rather than the traditional Document Object Model (DOM) to process the XML.
  • Your favorite XML editor is required to edit XML and XSLT files. The author uses vim on UNIX®, and Notepad on Windows®.

System requirements

You will need JavaScript enabled in your browser.

All functionality is available online.



Duration

2 hours





Formats

html, pdf


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!


Back to top


Document options

Document options requiring JavaScript are not displayed