A database engine embedded within a browser implements a system that facilitates managing client-side data for web-based applications. During operation, the system receives a Uniform Resource Locator (URL) at the browser. The system then retrieves a web-page associated with the URL. Next, the system executes a script associated with the web-page. While executing this script, the system receives a request to open a database. In response to this request, the system uses the database engine to open a database associated with the web-page, wherein the database engine is embedded in the browser. The system then uses the database engine to execute database commands.