I've had great success using SQLite as both a desktop application file format and web server database. I'll mention just one thing I like about it in the desktop application realm: undo/redo is implemented entirely within SQLite using in-memory tables and triggers following this as a starting point:
https://www.sqlite.org/undoredo.htmlIt's not perfect, but it fills the niche nicely.