Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Push RSS to new limits

Use RSS to construct an associative database

Jonathan Levin, Trainer and consultant, Freelance
Jonathan Levin is a freelance trainer and consultant in a myriad array of topics, ranging from XML/XSLT and Ajax, through low-level protocols and device drivers for Linux and Windows. He has designed and developed a lightweight Web-desktop environment called JADE (http://jade.hisown.com) that provides enterprise-class email, calendaring, RSS, and full remote file system functionality which makes extensive use of XML and XSLT along with PHP in the backend and JavaScript in the frontend.

Summary:  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.

Date:  18 Dec 2007
Level:  Intermediate PDF:  A4 and Letter (71 KB | 22 pages)Get Adobe® Reader®

Activity:  11246 views
Comments:  

Before you start

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.

About this tutorial

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.

The tutorial begins with an explanation of the RSS format and some actual feed samples. It then takes a twist on the classic format, and redefines it for your alternative purpose: storing arbitrary data items and their associations. You define your database format with three tables, and proceed to query them, showing that you can both emulate traditional SQL SELECT, and also provide an associative lookup. Lastly, you learn how to handle the query results, leaving them in XML form, or transforming them to user-presentable content using XML StyleSheet Transformation Language (XSLT).


Prerequisites

The following tools are needed 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®.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML, Web development
ArticleID=276324
TutorialTitle=Push RSS to new limits
publish-date=12182007
author1-email=JL@hisown.com
author1-email-cc=dwxed@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.