25. Client-Side Embedded Database

The Problem

Some business applications need local relational storage for temporary, offline, cached, or working data.

The React Difficulty

React has no built-in embedded SQL database. Developers add a browser database package and manage its schema, connection, and query API.

React Approach

// Example using an application-installed browser database library
const db = await openLocalDatabase("erp-cache");
await db.exec("CREATE TABLE IF NOT EXISTS Items (Id INTEGER, Name TEXT)");
const rows = await db.query("SELECT * FROM Items WHERE Id = ?", [10]);

MS Approach

ManySet provides a direct runtime-oriented approach for this recurring business-application task.

await ms.db.exec(`
    CREATE TABLE IF NOT EXISTS Items (
        Id INTEGER,
        Name TEXT
    )
`);

const rows = await ms.db.query(
    "SELECT * FROM Items WHERE Id = ?", [10]
);

Why this way is useful in business applications :

The comparison is intended to show where ManySet supplies a business-application abstraction around a recurring task, while keeping HTML and JavaScript visible and directly usable.

Key Point :

ManySet reduces the amount of framework-specific composition required for this particular task, without requiring the React/Angular mechanism to be represented as inherently wrong or incapable.