title: my CID program the best way to backup database locally?
body: <p>-my Cid program written in java code ..</p>
  
  <p>-my Cid program can add cases and modify them .. </p>
  
  <p>-my program connected to 2 databases  1 is the primary and 1 is the secondary ..</p>
  
  <ul>
  <li>my data base  is sqllite .. </li>
  </ul>
  
  <p>-the cases that i insert have content(Text) and photos(image) for each case ..</p>
  
  <p>-when i insert the data i insert it in the primary database first then in the secondary database .. same when i modify ..</p>
  
  <p>so my questions is how can i make sure that is every case that i insert is added into both databases ?? same for modify .. ??</p>
  
  <p>and what i do if the program closed before he insert it to secondary database (for example if the program crushed or by miss click closed ) how can i fix the missing case in the secondary database </p>
  
  <p>============================</p>
  
  <p>i am still new here if i didn't clear any part please tell me what i have tell you more about my program .. thank you for help </p>