I have set up a database with the following column headings, ID, POI, filename. I believe that I must set a Primary Key. At the moment that is ID. However, a customer may decide to change the order of their database, for example move ID 20 to number 2. But because it is a primary key, it cannot be duplicated. I tried to add in an extra column, I made that auto increment, and then make the ID column the primary key, however, i am being told that the auto increment column should also be the primary key. Therefore, how can you set up a database that will allow the rows to be moved around?
An ID shouldn't change. Ever. It identifies the data.
Keep the auto-increment ID as the primary key and use it to identify the records.
It sounds like the customer is asking for a manual ordering/sorting value. That's a separate concept than an identifier and should be a separate column. Something like SortOrder
perhaps. A sort order doesn't need to be unique, and can really be any integer value. So simply let it be exactly that... an integer column.
For use cases and business operations where the manually-specified sort order is applicable, ORDER BY
that column.