reddit / emacs

Notion or small databases in emacs

LowCom · 2022-06-21 03:55
Notion uses small noob(one who doesn't know sql and other database concepts) friendly databases with the option to easily define whether a field is a date, a number or URL etc. These databases can also be viewed in many formats, like table view, list view or board view. Can such a database be developed in emacs? Is there any such module? Apart from this, people use notion for easy document markup and linking pages. I think org mode does this so much better. The markup is simple and great and also allows to link to other pages. Almost everything else notion does, emacs does better. But the database thing is where notion seems to excel at. I also heard software like airtable provide small, noob friendly databases.
MitchellMarquez42 · 2022-06-21 04:52
For database integration, there's org-roam. Org tables are actually pretty good too. You can define formulas with elisp and everything.
LowCom · 2022-06-21 05:23
Yeah I do use org tables a lot, though I feel it's lacking in certain things. For eg, it hangs if the table is big. Like 100 or more rows.
ftrx · 2022-06-21 06:10
For reasons unknown to me the Emacs community is regularly hostile against DBs... Maybe Emacs need to merge with Smalltalk GUI part to reach DB/dynamic contents in-buffers. You can use SQL and a DB like https://irreal.org/blog/?p=10256 but it's not what you look for unfortunately...
Turbulent-Echidna · 2022-06-21 06:50
Have a look at Recutils https://www.gnu.org/software/recutils/, it's cool stuff!
flexibeast · 2022-06-21 10:23
> the Emacs community is regularly hostile against DBs... Interesting; could you share some examples of this?
wasamasa · 2022-06-21 10:37
There was sqlite discussion on emacs-devel where many people voiced concerns about plaintext data stored in opaque databases, thereby losing the ease of editing and introspection capabilities.
flexibeast · 2022-06-21 10:38
Ah okay, thanks, yes, i remember that now .... Have there been other instances as well?
DeltaBuffalo · 2022-06-21 11:07
https://github.com/nicferrier/emacs-db
ftrx · 2022-06-21 11:38
I do not have collected "episodes", but observed them here and there anytime a DB discussion pops up, for note storage, for transclusion, for financial transactions etc... Essentially the point is always: "we need DB for performances and flexibility" vs "we need to avoid DB to keep anything usable as pure text". I can understand both points, but seen the performance and *practical* flexibly part I honestly favor having a DB-like storage.
flexibeast · 2022-06-21 11:46
\*nod\* Perl5 has had the backend-independent ['DBI' system](https://dbi.perl.org/) for years, allowing one to [use CSV files as a backend in addition to the usual relational databases, e.g. PostgreSQL](https://metacpan.org/search?q=DBD%3A%3A). i'd be interested to know if there's any *technical* reason that something like this couldn't be done in Emacs. (i assume that the issue is more likely to be that Somebody™ has to care enough to be both willing and able to implement it.)
ftrx · 2022-06-21 13:39
I can't answer seen my limited elisp level, however I do not know how much can scale a massive CSV usage in performances terms... Emacs have made many performance improvements, for instance in org-mode, but many operations like org-ql querying on large note-bases, transclusion, org-agenda generation etc are painfully slow and still a bit limited...
flexibeast · 2022-06-21 14:10
Well, the idea is that, with a DBI-like infrastructure, one could start out with CSV, but then move to using a relational database once a certain level of performance is desired/required. i've been through a similar process with one of my Nextcloud installations - NC is PHP-based and therefore uses PHP's [PDO system](https://www.php.net/manual/en/book.pdo.php), and though the installation was initially using SQLite, i've been able to transition to using PostgreSQL as the backend with a minimum of fuss.
AlanYx · 2022-06-21 14:42
Although Notion is database-backed, I'm skeptical about whether anyone uses Notion to store enough information that a database is really required. The interface for adding rows to Notion is very mouse-intensive, so adding thousands of rows would be tedious. And I've read that the system slows down to a crawl after a fairly modest number of rows (see e.g., here: [https://www.reddit.com/r/Notion/comments/bs5y9i/notion\_is\_unusable\_for\_over\_2000\_rows\_help\_needed/](https://www.reddit.com/r/Notion/comments/bs5y9i/notion_is_unusable_for_over_2000_rows_help_needed/)). Just plain org properties and column views in emacs can handle datasets of that size.
vfclists · 2022-06-21 17:44
Emacs will soon be getting postgres interfacing via a [module](https://github.com/anse1/emacs-libpq) and will be getting SQLite [Emacs team considering including SQLite : emacs](https://www.reddit.com/r/emacs/comments/rlwipm/emacs_team_considering_including_sqlite/) Whether it will get a database agnostic SQL layer is entirely another matter. For me I think using Django and interfacing to it via a REST API will be the way forward. FWIW a decent FFI interface will be more useful than all these modules, something it looks like Emacs will never have until it gets new management.
LowCom · 2022-06-22 02:15
Yeah I really disliked notion after using it for a while. - Mouse heavy usage - Web application - Learning syntax of a proprietary app which won't be useful anywhere else..it's blocks etc. Initially I really liked it's easy document markup features, wiki, database when I didn't know about computers and programming much. Now that I am into linux, bash, python etc I feel like there are much better tools. But notion does offer something unique which is hard to pinpoint exactly.
sunnyata · 2022-06-22 12:40
I've seen people cite it as a downside of org-roam, and I would agree. Plain text in Emacs, GNU tools and *NIX generally is not just a historical coincidence, it's a core ingredient of their success. I wouldn't trade it for supposed convenience, or performance actually.
timmymayes · 2022-06-23 04:23
For me it's not the # of rows it's the relational based nature. I have databases related to each other have views that enable me build out various workflow/pipelines. I really love emacs, keyboard control and some of the org features look cool but I've not seen much that looks like it would really compete well with my notion setup. This may just be a naïve take but I have searched and asked around to see an org setup that could be used how I'm using notion and haven't found anything comparable unfortunately.
timmymayes · 2022-06-23 04:24
For me it's 100% the relational databases for all my data and pushing it into views that I slice and dice based off what I'm doing.
AlanYx · 2022-06-23 13:48
I'm not slagging Notion in principle -- I've seen some really complicated Notion setups/workflows. (And I actually love the Notion page editor; I think it's an all-around good set of UI choices.) It's fun to set complicated things up in Notion. But I think it's pretty rare that people can keep up with such complicated systems. At least for me, I find that when work gets busy I stop using complicated systems for a while and get a backlog and then eventually it falls apart, or I have some new need and realize I have to customize the system somehow because it's kind of rigid but I'm busy at work and don't have time to customize right now. That's personally why I always end up back in emacs. It's also why, although I like org-roam, I don't use it. There's enough in core org that meets my needs in a sufficiently free-form way, and emacs is just so brutally quick and efficient for everything, especially getting information in. As another example, Tiddlywiki is a lot like Notion, in that there's a lot of clicking around but you can set up complicated things. I think most Tiddlywiki enthusiasts eventually end up writing custom code to make using the system quicker and with less friction, but that's harder to do with something like Notion. If you're looking for a fairly complicated quasi-relational example in emacs, you might check out the Vino wine database ([https://github.com/d12frosted/vino](https://github.com/d12frosted/vino)), which is built on vulpea, which is a database-backed emacs package. The author recently launched another project on top of that, [https://barberry.io/](https://barberry.io/), which has a lot of the features you'd find in a complicated Notion workflow. But if Notion works for you, don't switch -- use whatever tools work best for you.
timmymayes · 2022-06-23 15:17
I get what you're saying and that has been something I've run into in the past with other systems. The setup I have now is the only system I've ever successfully used through all the hurdles you've explained. That's my main conflict...I don't want to give up my most successful system. My one worry is notion going away and data ownership. The relational data setup enables me to do so much with minimal effort. It also enables effortless capture of any idea/task/media, flag it minimally and have built in workflows for them. I have a full content production pipeline for work (my day job for now is marketing), a game design pipeline for my board games which I make on the side, my goal/project/task pipeline, my daily, weekly, monthly, quarterly, yearly review pipeline and a second brain esque note/media setup. All of this with a series of views or dashboards that enable me to focus on the area I'm working on atm via filtered views. I appreciate your tips and oil look in to it
Clear_Ad_491 · 2022-06-24 14:40
It works brilliant with a small amount of data and i liked it a lot, but when your notes and lists grows notion get to slow.. so back to org-mode again ;)
artwheat · 2022-06-25 19:16
+1 for RecUtils, I’ve been looking for a tool like this for some time.