In the past all my db needs were solved by sqlite. Now designing a db that can potentially be large i looked into “Distributed Transaction”. How do i program that? I found some results explaining what distributed transaction is but non explained how to program it.
I know in code i have a few transactions that i may want to batch into a larger transaction. I use .NET. How might i do something like create a user where his PK is in one database and his user information such as name and settings are in another database. This may be a separate question but if i have two functions. One updates a media description and the other updates the content which could be on the same server or separate. How i nest these transactions and only commit at the end?
For an introduction to the concept, see Wikipedia.
For use in .NET, look at the
System.Transactionsnamespace, especially theTransactionScopeclass. This will enable you to hook into the use of DTC. If you look at theSystem.Data.SQLiteproject then you can see how they have integrated DTC with SQLite.