I'm new to develop in plugin. Now I try to connect same current database connection that application use. Can I do that? and How?

Thank you,

Krerkkiat