Forum OpenACS Development: cr_item or acs_object
I writing done a new datamodel and questioned myself what ACS Type this content should be.
It's data that everyday gets a new value and its old values must be storaged.
I believe as a content_item using cr_revision is the one I must choose. However, I'm not quite sure if it's the best approach.
Is there anybody out there?
select content_type__create_type (...)
Then on tcl procs level to add a new rate as well its revisions there will require to use a few methods such as
set revision_id [cr_import_content...]
item::publish -item_id $item_id -revision_id $revision_id
Assuming, a rate is never an actual file, to use cr_revisions doesn't seem to be the correct approach to take.
What's the proper way to storage rates of currencies?
I think a simple table of current rates and an archive table of historical rates would work. You could do it all in one table as well, depends how often you need to refer to each.
I'll design it to storage all in one table only, with a new column to storage the date (timestamptz)
The idea is to show the latest rate in a headline panel, plus I'll built a forecast graphic based on its historic.