Saving in a database when order is important?

Hi all,

I have a custom class. Each member of the class uses a variable number of string replacement rules, like A uses rules 1, 5, 12, 22, B uses rules 2, 8, 4, and C uses rules 15, 3, 5, 12, 8. The order in which these rules are executed is of course important.

What would be the standard way of storing an ordered list like these in a database?

add a field “SEQ_NUM” and add it to your SELECT statement

Sorry, should have explained a bit more.

I’m also trying to use Bob’s ActiveRecord class.

So I have a table PROTEASES which maps to the custom class Proteases.

I have a table REPLACEMENT_RULES which maps to a custom class ReplacementRules.

As far as I can see … ah, got it now. I need a One-to-many table with two foreign keys FK_PROTEASES and FK_REPLACEMENT_RULES and a field Order.