In Commentary on
30 March 2009 tagged browsers, cars, database, design, food, links, scalability, security, Web development with no comments
- Jason Santa Maria: Reflections on Layer Tennis. Really, really great post on participating in Layer Tennis. I loved this.
- SF Gate: Food, service uneven at Absinthe. A review of Top Chef participant Jamie “Top Scallop” Lauren’s San Francisco restaurant by Michael Bauer. Brutal.
- John Resig: Determining Browser Market Share. Deep thoughts on measuring browser market share.
- New York Times: Vast Spy System Loots Computers in 103 Countries. Uncovered by researchers at the University of Toronto. Also read this followup from James Fallows.
- Goodnight, Raleigh: Memorializing a Magnificent Oak and “The Great Pacificator”. A little local knowledge about Raleigh.
- The Economist: Germany’s racy auto banks.
- Tim Bray: On Rack. A nice, short introduction to Rack, the glue that provides an interface from Ruby applications to Web servers.
- MySQL Performance Blog: PROCEDURE ANALYSE. Very useful for optimizing your MySQL schema.
- Vanessa Fox: Transforming the Relationship Between Citizens and Government: Making Content Findable Online. Advice on making data more searchable, pertinent to anyone publishing online.
- Last.fm: Last.fm Radio Announcement. Users not in the US, UK, or Germany have to pay up to listen. Music licensing sucks.
- LastFM Firefox Extension. Scrobbles Pandora tracks to Last.fm, for people like me who feel weird anytime they listen to a song and the data isn’t transmitted to Last.fm.
- intranation: Development virtual machines on OS X using VMWare and Ubuntu. A clever alternative to MacPorts or Fink.
- Trustico: Buy GeoTrust, VeriSign SSL Certificates At Cheaper Prices – Strategic Partner United States. I hate paying for certificates. These guys are cheap.
In Commentary on
8 February 2009 tagged database, questions, software development with 4 comments
I’m looking for people to give me some ammunition to win an argument with myself. I have a database table that stores denormalized data for presentation in reports. One of the columns will hold some messages that are taken from three different tables.
The three tables are parents, children, and child_messages, which contains custom messages associated with the keys stored in children. To include the children in a report that lists a number of parents, you have to do all sorts of stupid tricks. Denormalization is easier, especially because on this report there are a number of similar scenarios that all involve different tables, making things even more complex than I’ve already described. (I’m planning a blog post to describe this denormalization approach for later.)
The question is how to store the denormalized data. On the Web page, it’s presented in an unordered list. The data can also be downloaded in CSV format.
Some options include:
- Storing the messages in an unordered list. The nice thing here is that in the default case you don’t have to do anything to transform the data once it’s fetched. Just print it. If you do have to parse it, HTML is not the most difficult thing to parse.
- Storing the messages in YAML. It’s lightweight and there are already plenty of libraries to parse it. The downside is that the reports would always have to parse and transform it. Also, we’re not talking about an arbitrary data structure but rather a list of messages. So the flexibility of YAML doesn’t provide any value.
- Storing the messages in line-feed delimited format. Lighter and simpler than including HTML in the field, but again, must be transformed in all cases.
I also considered some other HTML options, but ultimately decided against all of them because there’s no point in using HTML if it’s not going to be the HTML that’s actually displayed on the page.
Opinions?