darcys22 / godbledger

Accounting Software with GRPC endpoints and SQL Backends
https://www.godbledger.com/
GNU General Public License v3.0
479 stars 56 forks source link

Integrate Graph Database #166

Open mingsterism opened 2 years ago

mingsterism commented 2 years ago

Would be interested to see how a graph database can assist GoDbLedger and offer unique queries and insights. Given that all transactions have relationships, we can add metadata to each transaction in order to do analytics? The meta data should assist other systems to do automatic classification of expenses These data would play well within a graph database.

It can be integrated as an add on database, something optional. and going through the message broker.

darcys22 commented 2 years ago

Hi Mingsterism,

This is a super interesting concept and the database backend is already implemented as an interface to support both MySQL and Sqlite. So making a graph database backend would be as simple as implementing the interface defined here:

https://github.com/darcys22/godbledger/blob/master/godbledger/db/database.go

Would be very interesting to explore this idea further!

mingsterism commented 2 years ago

awesome. that's great. would take a look at that file and see if something can be done. however, do you see any angles as to how a graphdb can add useful insights to an accouting ledger system? am curious to hear your thoughts.

my idea is that graph analytics can be done across all the transactions, and possibly to find unique relationships among them. but this requires more data within the database, like 1) who created the transaction 2) what is the classification of this transaction 3) who approved the transaction. I'm not too sure if this data should be in godbledger or as a seperate system

Example analytics we can do with graph 1) which employee in the company is spending the most 2) Who is approving the expenses within the company. and who is making the requests

fundamentally a graph database makes sense only if there's multiple entities and relationships among the entities.