Design a system to keep track of changes in an SQL database

You are given access to a client's database. Your goal is to keep your cloud in sync with this local, on-premise database.

  • The connection is handled for you, and you can run SQL against the database.
  • You do not have access to any extra trail/logs from the said database.
  • The tables in the database do not necessarily have createdAt / updatedAt fields.
  • The database is used by your client for critical operations during the day and cannot be bombarded with queries during that period of time.
  • If you want to rely on an SQL engine, you are limited to embedded databases (e.g. SQLite)
  • The client database has 2-4 GB of data, running on a HDD of 80 GB.
  • The computer's spec are the average specs for a 2008 PC.
  • You have sufficient space to duplicate the source database, but you should optimize for space efficiency.

How do you architect your solution?

Comments (8)