There's a big divide between server-side and client-side Javascript, and I think this is confusing to alot of people. They are not the same, and they can't even talk directly to each other, so server-side Javascript is just what it is: another scripting language, with no special advantages over PHP, JSP, ASP/VB, etc...
It's not until you get into Java or ActiveX that you can have client-server state communication.
Sleuth, If you are on a Linux server, I don't think there is a server-side javascript interpreter, yet. I remember some talk of an attempt to do it with Perl (called Fesi, I think), but I don't think its a very mature system. (This was mentioned in Professional Javascript by Wrox Press).
Client-side Javascript won't do this, and even if there is a server-side Javascript for Linux, I doubt it has a good database access layer. Perl:

BI or PHP are much better choices for this. What database are you using? If you know Perl, why on Earth do you need Javascript for this? (sorry to throw so much at you at once ;-) )