I feel like we need a database that is more integrated with the frontend. Typical web apps have client-side state management, then a graphql/rest layer with caching implemented on the frontend and backend, then some ORM, and then a big old SQL database on the backend.The modern app simply wants to query/update data, show real-time updates to this data, and then have a nice normalized cache so one piece of data is the same everywhere it's rendered.I've been fixated for a while on the thought that any solution needs to be built on top of an existing db like Postgres or SQLite, with SQL as the primary interface (like every other DB has these days), but I feel like this is holding progress back.Data schemas these days are less fixed, they change often, and involve interacting with third-party data sources (usually large nested and unstructured JSON), as well as being more graph-like, and tree-like. SQL becomes unwieldy under these conditions. For example, try figuring out the best way to store a tree in SQL, or querying 2 or more M-M joins, or storing a json response from a thirty-party service in a normalized way, or trying to implement materialized view maintenance.We need more flexibility than SQL and the relational model offers.I also think apps should be built such that they can run entirely in the browser, and then the backend is just a thin interface to the data. Most apps end up implementing the entirety of the backend in the client anyway in order to have a snappy experience.I feel perhaps there is liberation in a more hackable/modular database that can run on the frontend and backend.On the frontend, the focus would be optimizing the amount of data we need to pull from the backend to be able to run as many queries as possible without fetching, and then efficiently checking for freshness of the local dataset.On the backend, with AssemblyScript (TS syntax -> WASM), we could provide an accessible and efficient way to implement the underlying layers of the database engine and could also expose the query planner and executors to the user.