I haven't had much experience with database triggers, so it's hard for me to compare the pros/cons of using triggers vs using CouchDB.
Thinking about it, as far as the stats stuff goes, I don't think there is anything we did that can't be done via your suggested approach (triggers, materialized views, archive tables, etc). However, we're just a few developers here. We don't have a DBA. We're much more at home with Javascript than with the MySQL trigger syntax. So, CouchDB was a much more natural fit.
We're also making heavy use of the fact that CouchDB is schema-less. I'm not too familiar with the XML and/or JSON datatypes supported by the different relational databases, but some quick googling seems to indicate that querying the database for the contents of this data can be difficult. In other words, storing and retrieving XML appears to work OK, but (looking at Postgres) I can't seem to find a way to, for example, find all rows where the xml document in the 'xml' column has a <city> tag that is equal to 'Chicago'. Again, I could be very wrong here, I just don't see it after about 10 minutes of looking.
Working with documents is very natural in CouchDB, as that is what is was designed for. Not only can you easily find all documents with a city property equal to 'Chicago', but you can also programatically interact with that data in the map and reduce functions, using Javascript.
Thinking about it, as far as the stats stuff goes, I don't think there is anything we did that can't be done via your suggested approach (triggers, materialized views, archive tables, etc). However, we're just a few developers here. We don't have a DBA. We're much more at home with Javascript than with the MySQL trigger syntax. So, CouchDB was a much more natural fit.
We're also making heavy use of the fact that CouchDB is schema-less. I'm not too familiar with the XML and/or JSON datatypes supported by the different relational databases, but some quick googling seems to indicate that querying the database for the contents of this data can be difficult. In other words, storing and retrieving XML appears to work OK, but (looking at Postgres) I can't seem to find a way to, for example, find all rows where the xml document in the 'xml' column has a <city> tag that is equal to 'Chicago'. Again, I could be very wrong here, I just don't see it after about 10 minutes of looking.
Working with documents is very natural in CouchDB, as that is what is was designed for. Not only can you easily find all documents with a city property equal to 'Chicago', but you can also programatically interact with that data in the map and reduce functions, using Javascript.