Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Database #174

Closed
danieldaeschle opened this issue Sep 4, 2018 · 6 comments
Closed

SQL Database #174

danieldaeschle opened this issue Sep 4, 2018 · 6 comments

Comments

@danieldaeschle
Copy link

Sorry for opening another issue xD

I really want to have the choice between an MySQL/PostgreSQL and SQLite.

@zadam
Copy link
Owner

zadam commented Sep 4, 2018

This would introduce extra complexity while providing close to zero benefit for the user. SQLite is perfectly fine for the Trilium workload.

@zadam zadam closed this as completed Sep 4, 2018
@danieldaeschle
Copy link
Author

use an orm and you have no more complexitivity

@zadam
Copy link
Owner

zadam commented Sep 4, 2018

There's still extra complexity in providing a way to configure the database access and documenting it.

ORM means you can use only lowest common denominator in SQL features - e.g. how do I use CTE (which are critical for Trilium performance) from an ORM? The end result is that performance suffers needlessly.

ORM abstractions are often leaky anyway and you need to implement special cases for individual databases anyway.

(I'm not an ORM hater and I know their place, but Trilium just doesn't need one).

@jakerr
Copy link

jakerr commented Jan 17, 2019

I agree that an ORM is probably overkill for Trilium. I also agree that SQLite is more than adequate for the workload - however adding an abstraction layer would make it easier deploy a Trilium server on a cloud provider that has ephemeral storage as many of them do. Heroku and App Engine for example both support hosted databases but don't give you direct filesystem access to persistent storage as sqlite requires.

Maybe a framework like the anydb-sql - npm or sql-client - npm could provide an abstraction to make using PostgreSQL or MySQL possible without adding to much complexity to the project.

@OJFord
Copy link

OJFord commented Oct 25, 2019

Another benefit would be that if you already have the pg (or whatever) DBMS then Trilium can just slide in to the existing backup policy etc. rather than also backing up the disk storage, or adding a job to dump from sqlite.

@YQGong
Copy link

YQGong commented Jun 3, 2021

Another benefit would be that if you already have the pg (or whatever) DBMS then Trilium can just slide in to the existing backup policy etc. rather than also backing up the disk storage, or adding a job to dump from sqlite.

agreed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants