To describe an NFS mount in a Database I have the following tables (simplified):
NFS_Export: id (PK), name, path
NICs: id (PK), name
NFS_Export_NIC_priorities: id (PK), nfs_export_id (FK), nic_id (FK)
My problem is that the NICs used for an NFS export are a list where the order gives the priority and the user must be able to change that order.
Currently I order the NICs by the NFS_Export_NIC_priorities id. The lower the id the higher the priority. But that means to resort the order I have to swap two or more entries which sounds like a bad idea.
Is there a better way to store a list where the order matters and is changable?