From: Allan Wind Date: 2012-03-26T11:47:49+09:00 Subject: Re: Undecided on how to approach a problem of storing html tables in a database On 2012-03-26 11:22:30, Scott H. wrote: > I was hoping to get some advice from you all on 3 things: > 1. Storing arbitrary hashes in a mysql database You can store arbitrary data in text fields, but you lose many of benefits (schema, searching, indexing, joins etc). There are mysql plugins, I believe, to deal with json in the database. There are other serialization formats you could consider (say, protobuf). Have you looked into any of the NoSQL databases yet? Redis might be a better fit for key-value, or you could go the document database route with CouchDB or MongoDB. > I'm trying to solve a problem where we report loads of interesting disk > stats, including health values in a series of webpages for our servers, > so I'm aiming to collect the information like unique array number, disk > position, serial number, firmware value, current health value and > probably chuck it into a hash, then store that in a more reasonable form > in a database, against a server serial number and date > The database schema is relatively straightforward, and what I've managed > so far appears a bit more sane in ruby than in python or perl. Can you store the data in mysql, templates elsewhere and render the combination either on demand or periodically? Any particular reason why you building this from scratch? There are a ton of systems out there already (nagios, munin, cacti, etc). Most of these make it fairly easy to write custom plugins. serverfault might be a good place to cruise for ideas. /Allan -- Allan Wind Life Integrity, LLC