RDiaTool is a utility written in Ruby that parses uncompressed Dia  files to produce helpful results.  The first helpful result will be parsing database diagrams and then generating helpful code from said diagrams.