Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What about storing all the item ids in a text array (on another table, one related to these items somehow)?

  int[]
If the items are being ordered manually by the user, then they cannot be of a very large length.


That may meet your needs. You’ll lose some of the benefits of database constraints and indexing.

And while the submission uses it as an example, the use case of reordering items in a list needn’t be limited to lists manually ordered by a user.


It's not "an example", it's the entire point of the article.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: