(1) The browser user has to *allow* the use of components that are marked as "unsafe for scripting" (and they are! used wrong, they could wipe out things!).
(2) The browser user has to mark your site as a "trusted site".
(3) Depending on what kind of database you are talking about, you might still have enormously complex connection issues.
In short, even though it's theoretically possible, it's a really really bad idea. And probably won't work the way you want it to, anyway.