Rails serialization. Does it apply well here? -
i have 2 models attackreport , attackreportround. each report can have many rounds. describes how attack made. how have designed wanted @ first. however, if attack has, 30 rounds, attackreportround table can become way big.
therefore, thinking of way store in single row if possible, or in efficient way. attack round keeps information attacker hit, damage, defender health , stuff that.
i thinking of serializing data every round in single attackreport entry, maybe using comma separated values or sort of rails serialization.
what in case ?
database tables can hold lot of rows before performing badly, if using indices properly. have considered 'archiving' old attackreport , attackreportround entries in other tables? assuming attackreport year ago isn't queried -- depends on app doing.
if go serialization, i'd use built-in rails 1 (it serializes yaml , requires little coding on part) before doing own csv solution.
Comments
Post a Comment