pseudo-code to get emu db key