Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6992667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:39:52+00:00 2026-05-27T19:39:52+00:00

If i have an xml file (uploaded to my server), and i do some

  • 0

If i have an xml file (uploaded to my server), and i do some processing on it to get the data from it,then store those data in my database .

If the user makes some changes (insert,update, delete),then upload the file again to my server . Is there any way to detect the changes (insert , update , delete)to update my database according to rather than just deleting all the data and inserting them again .especially ,there is some data depends on the the existing data(referential integrity)and if i delete all the data , the dependents will be deleted.(cascade delete)!!

Note:

  • I store the file hash , so i know if there is some change is occurred
    since the last uploading.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:39:53+00:00Added an answer on May 27, 2026 at 7:39 pm

    As Darin pointed out in his comment, this depends largely on the structure and content of both your XML file and your database.

    In principle currently you delete a set of rows of a certain number of tables and (re-)insert another set of rows afterwards.

    If you only want to update your database, you could – for each table – first identify all rows you would currently delete (i.e. do a SELECT ... WHERE instead of a DELETE ... WHERE), prepare a set of rows you would insert and compare these two sets (lets call them DELETE and INSERT):

    • Rows that are only in the DELETE set have to be deleted from the database
    • Rows that are only in the INSERT set have to be inserted
    • Rows that are in both the INSERT and DELETE set have to be updated.

    But as mentioned, excatly how and in what order to perform these operations depends on your specific data structures. E.g. if you have dependencies between tables (i.e. parent-child relationships), the delete operation on a parent entity has also to take care of the childs (possibly using a ON DELETE CASCADE clause in your foreign key definition). In this case you should also process parent tables befor their child tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an xml file providing data for a datagrid in Flex 2 that
I have a problem reading uploaded XML file to the string instead of file.
I have xml file that defines some preference screens like the following example <PreferenceScreen
I have xml file with data that i have to display in table. Now
What is the easiest way to convert xml to html? I have xml file
I have an XML file that starts like this: <Elements name=Entities xmlns=XS-GenerationToolElements> I'll have
I have an XML file, which I open in F# like this: let Bookmarks(xmlFile:string)
I have an xml file where I need to comment out a whole piece
I have an XML file loaded into a DOM document, I wish to iterate
I have an XML file and an XML schema in another file and I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.