Data Structures and Tagging

One of my favorite Princeton professors, Ken Steiglitz, used to make data structure jokes at the faculty eating club. It was a treat to eat with Ken and other computer science faculty members, including Hector Garcia-Molina and Dick Lipton, as conversation varied from algorithmic complexity to new research projects to what creative overhead accounting was taxing our latest grant money. As soon as the menus arrived, however, you could count on Ken to peruse the last page, visibly stop his survey halfway down at the "Array of Fresh Fruits" selection, and pronounce, "Why always an array of fruits? Why not a heap? Or a linked list of cheeses?"

He always made the joke, and I always laughed at it. Of course, he was paying, so I found immense humor in data structure misuse. Until I started thinking about the problem, and realized that Ken was right. I've been thinking about relational databases, and not arrays of fruits, but the problem remains about just desserts.

Why do we insist on cramming nearly everything into a relationship database? Relations are fair data structures for data that fits neatly into rows, and can be reduced into tables such that no information is lost. Tags, however, scream for something more hierarchical, more capable of expressing one-to-many relationships and many-to-many relationships between tags and tag clouds. Directories may be a better fit, as they resemble a hierarchical data store more than a relationship database.

A complicating factor is SQL. Part of the popularity of PHP, I believe, is that it makes talking to SQL databases significantly simpler for the coder who wasn't Hectored into understanding relational algebra.

What if SQL and RDBMS should be (partially) replaced in our Web 2.0 acronym vernacular with LDAP, ATOM and RDF? That's the question I asked some of my favorite architects as I was getting snowed on last night. Interesting answers to follow.

Comments:

Post a Comment:
Comments are closed for this entry.
About

Hal Stern's thoughts on software, services, cloud computing, security, privacy, and data management

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today