Array or Individual Rows
Posted: Fri Dec 11, 2009 8:29 am
I have a page where you drag and reorder items, their order is stored numerically in a db.
In the end I will have multiple categories where you can reorder objects and an object can appear in multiple categories.
I need to store multi order numbers for each object.
Would it be more efficient to:
a) Have a table where each row is: category id, item id & position array
OR
b) Have a table where each row is: category id, item id, position
So choice "a" is less rows but contains an array and choice "b" is simpler data and more rows.
Any help would be appreciated, thanks!
In the end I will have multiple categories where you can reorder objects and an object can appear in multiple categories.
I need to store multi order numbers for each object.
Would it be more efficient to:
a) Have a table where each row is: category id, item id & position array
OR
b) Have a table where each row is: category id, item id, position
So choice "a" is less rows but contains an array and choice "b" is simpler data and more rows.
Any help would be appreciated, thanks!