From Perspective, I want to edit a DB cell from a table selected cell

I might be able to dig out a sample later. Meanwhile have a look at the docs.

https://docs.inductiveautomation.com/display/DOC81/Perspective+-+Table+Scripting

Then have a look at Quick help - editable Perspective Table - #3 by PGriffith and pay particular attention to the posts by the IA staff (identifiable by the IA icon on their photographs).