Just like on the client, scripts that execute on the server a particular set of APIs that they have access to. This API suite is broader than the client side API in part because making an API available on the client requires sending code from the server to the client, for possible execution, which can slow page loads, and also in part because server scripts execute on the server! The server has an extremely low-latency connection to the database, which makes more robust scripting possible and much more efficient.