Tally has no open database, so data cannot be read from the company file. The supported route is Tally's XML gateway on port 9000. Sales Sathi pulls masters and vouchers through that gateway, stores them in MySQL tables keyed on Tally's GUID, and syncs incrementally using Tally's AlterID counters.
Tally stores data in a proprietary compressed format that only the Tally engine understands. Anything claiming to read it directly is reverse-engineering the format, and breaks on the next version.
Tally exposes two change counters per company, one for masters and one for vouchers. Storing the last value seen means only records above that watermark need to be pulled, which turns a company with five lakh vouchers into a few hundred rows per cycle.
Those counters tell you what changed. They do not tell you what was deleted. So each cycle also re-reads the recent weeks and removes anything that has vanished from Tally. Without that step, a deleted voucher lives on in the reports forever.
No. The company file is a proprietary format with no SQL interface. The supported routes are Tally's XML gateway and its ODBC driver, both of which require Tally to be running with the company loaded.
Each sync re-reads a recent window, typically forty-five days, and reports every voucher Tally still holds. Anything in that range that has disappeared is removed from the warehouse, so reports never show a voucher that no longer exists.