3 ms·
Holy heck. What a coincidence. For the last few days, I was thinking about databases and was wondering if per user database can be possible. To be honest I was
by anyfactor 4y ago
Holy heck. What a coincidence. For the last few days, I was thinking about databases and was wondering if per user database can be possible. To be honest I was thinking about duckdb and sqlite3, with a mothership kinda postgreSQL database.
I was thinking having a "your very own database" could be a justifiable reason for a price bump from pro to enterprise version. Then I was thinking of the idea of SQLite being something like a web-deliverable database instead of JSON responses through an REST API.
Edit:
I would really love to hear about this database per user approach. The more I think about this the more I am fascinated.
Like for what amount of data-size justifies to have an SQLite3 db or something more bulkier? A CV has very small amount of data, so why not just use a JSON file? I wonder in that case if accessing a JSON file from a cloud storage could be more performant compared to SQLite3. You don't need to have the full set of utilities of SQL if you are just showing the entire data.
- harryvederci 4y agoHaha awesome! Good to see lots of people are starting to see SQLite as an option, I think it used to be misunderstood as a toy database. It'll take some time before I can really recommend this workflow, I'll make sure to add a blog to the withoutdistractions.com platform soon. I didn't expect this to hit the front page as it's my first "Show HN", otherwise I would have created one up front with an RSS feed. For me I went from Postgres to one central SQLite file to the current approach. I don't what the best approach would be, but I just put a user id column in every table and instead of having an integer primary key, I have a primary key of user id + table id. Then I have some Janet logic in place to get all table + column names except for a few private ones from the user's DB file, and put those in the "global" DB file. If anyone knows a better way to do this I'm all ears! I think SQLite has some kind of native way now to merge DB files with the same schema as well, but I think there was some limitation on the amount of tables you could apply this to. Not 100% sure, though.