JavaScript+Execution+Environments

= JavaScript Execution Environments =

Windows
Microsoft JScript .NET is an implementation of JavaScript on the Common Language Runtime (CLR). As such it can be used within any .NET application and intermixed with other CLR languages such as C# or Visual Basic.

Java
Mozilla Rhino is an implementation of JavaScript written entirely in Java. Its can be used on any platform that supports Java.

Other
Google V8 is an implementation of JavaScript that is a component of Google's Chrome browser. It can also be used standalone, is written in C++, and runs on Windows (XP or newer), Mac OS X (10.5 or newer) and Linux on the following processor architectures: IA-32, x64 or ARM.

Apple JavaScriptCore (aka SquirrelFish, Nitro) is an implementation of JavaScript that is a component of WebKit. WebKit is used in a variety of Web browsers and other HTML capable applications including Apple Safari, Microsoft Entourage, Symbian S60 browser, Blackberry Bowser, and the Playstation 3 browser. It can also be used standalone, is written in C++, and runs on a wide variety of operating systems and processor architectures.

Using JavaScript in Database Queries
Microsoft SQLServer stored procedures can be written using any CLR-based language and are thus able to execute JavaScript expressions via JScript .NET.

Oracle Databases support stored procedures written in Java and can therefore execute JavaScript expressions via Rhino.

PostgreSQL stored procedures can be written in JavaScript using the PLV8JS plug-in.

IBM DB2 stored procedures can be written in Java. Such procedures can use JavaScript expressions via Rhino.

MySQL supports user defined functions (UDFs) written in native code that can extend the functionality of the server. Such UDFs could use one of the JavaScript execution engines listed above to execute JavaScript expressions.

Many NoSQL databases offer Java or JavaScript natively and thus offer an easy path to executing JavaScript expressions within queries. The following databases all support Java or JavaScript natively: MongoDB, CouchDB, Riak, Cassandra, Voldemort and Neo4J.