Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Firstly, I think you need to dispense with the idea of SQL Backups for this and shift to tables that record data changes. Then you have a source database containing all your regular tables, plus another table that records a list of saved versions of it.</p> <p>So table X might contain columns TestID, TestDesc, TestDesc2, etc Then you might have a table that contains SavedDBID, SavedDBTitle,etc</p> <p>Next, for each table X you have a table X_Changes. This has the same columns as table X, but also includes a SavedDBID column. This would be used to record any changed rows between the source database and the Saved one for a given SavedDBID.</p> <p>When the user logs on, you create a clone of the source database. Then you use the Changes tables to make the clone's tables reflect the saved version. As the user updates the main tables in the clone, the changed rows should also be updated in the clone's Changes tables. If the user decides to save their copy, use the Clone's changes tables to record the differences between the Source and the Clone in the original database, then discard the Clone.</p> <p>I hope this is understandable. It will certainly make any schema changes easier to immediately reflect in the 'backups' as you'd only have one database schema to change. I think this is much more straightforward than using SQL Backups. As for copying databases around using flash cards, you can give them a copy of the source database but only including info on the sessions they want.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload