Been thinking a bit and have come up with the following simple idea which seems to be working.
1)Create a factory object that produces NPC instances based on a static int that is incremented for each new NPC.
2)Store the int in an ordinary field in each NPC object. Use that int for everything to do with the NPC, such as object numbers for models, array/list indices for storage, index into dialogues, quests etc etc.
So, if dbPickObject returns (say) a 2, then you know you need the NPC object at index 2 of your NPC array (or whatever), dialogue index 2, quests indexed for character 2, blah de blah.
Plenty of scope for automating things based on a unique ID, as long one makes sure their other factories for landscape blocks and so on don't generate numbers in the same part of the domain.
Let you know how it works out when the game gets more complicated than it is at the moment
T.