0

I am using SQLite embedded in a .Net Desktop application developed with WPF.

SQLite provides a callback for any write operation performed to the database (within the same connection) ref

In this callback, it provides the following which leads to the records being affected

  • Event (Insert /Update/Delete)
  • Table Name
  • Row Id

I am looking for a NoSQL alternative that also provides such callback and could be embedded in a desktop application targeting .Net Framework 4.8


I like the lightweight LiteDB but couldn't find data changes callback support

2
  • MongoDB please check this article mongodb.github.io/mongo-csharp-driver/2.9/reference/driver/… Commented Aug 31, 2021 at 14:24
  • Thanks, @MohemanTariq, It is a client application, distributing MongoDB with the app will be a huge dependency. I was looking for a lightweight solution like LiteDB, which could maintain data in just a single file Commented Aug 31, 2021 at 14:33

1 Answer 1

1

I ended up using the Realm Database.
Realm lets register a notification handler on a specific collection. The handler receives a description of changes since the last notification. Specifically, this description consists of three lists of indices:

  • The indices of the objects that were deleted.
  • The indices of the objects that were inserted.
  • The indices of the objects that were modified.

Another plus point of Realm over SQLite is that these change notifications are NOT limited to changes from the same connection.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.