Having used DataMapper for a while now on this project, I’m starting to see the complexity I’ve created. By using MySQL for storing the data required in a relational format, it is taking too long to update the data (the admin back end hasn’t been completed yet).
Now I’ve sketched out a CouchDB/CouchRest solution, it is concise and simple. A Relational data structure was completely ineffective for this project. It worked, important, and was difficult to interact with, time consuming.
Using the concept of document storage, the data is accessible in a natural form. The data being stored in the project are finance rates.
- $40,000-$60,000 2yrs is 4%
- $20,000-$39,999 2yrs is 5%
It is simple now to go into futon and edit this document. It has been fun learning the CouchRest/CouchDB way and not nearly as complex as what I thought it might be. This is probably due to the fact that all my OO knowledge I picked up in Java is finally starting to filter through to the Ruby syntax :)
Now I need to figure out how to store users with accounts. I could use DM/MySQL still as this relational structure fits this type of data. At the same time I’m interested in how far I can push the concept of an “Account” document and using the “View” to get data.
DataMapper still has potential via the CouchDB adapter, right now as far as I’m aware it isn’t quite as straightforward to use as CouchRest. I like DataMapper and the way it works, it is very much the tool I’ll use when dealing with MySQL and relational datasets. Maybe once CouchDB settles down and the DM refactor has been completed and the CouchDB adapter catches up, I’ll have another go.
Tool / Job, pick the one suitable for the task :)