The guys at the top want sort order to be customizable in our app. So I have a table that effectively defines the data type. What is the best way to store our sort order. If
Use an int field. When you update the sort order of one row, you only have to update the field on the row you're updating and any rows between the row's old and new positions. This means that swapping two rows only involves touching those two rows. Also, for rows you're updating that aren't your "active" row, you only need to increment or decrement the field; the queries are easy to write.