To Delete or to Update ? Any

Results 1 to 3 of 3

Thread: To Delete or to Update ? Any

  1. #1
    Patty Guest

    Default To Delete or to Update ? Any

    I would like to change multiple information in 2 seperate tables (MsAccess). Is it preferable to do an UPDATE or to simply DELETE the existing records (using the unique ID) and insert new records instead? If I delete will the size of the database grow, is there a negative side to it?<BR><BR>I know that it is much less work and coding to delete and reinsert them, since updating records need specific and correct ID&#039;s specially when you are dealing with relational databases.<BR><BR>So, to delete or not to delete ?

  2. #2
    Join Date
    Dec 1969

    Default Hmm...

    How could you delete the record without knowing the id or criteria for deletion?<BR><BR>I don&#039;t see how delete/insert is any easier...You perform<BR>a delete the same way you would an update with the WHERE clause.<BR><BR>In fact, it is much more work for the database.

  3. #3
    patty Guest

    Default Ok...let me be a little specific

    I have several tables: tbl_styles, tbl_models, tbl_modelColor, tbl_color<BR><BR>Each style has different models associated, and each model has different color associated to it. tbl_styles is related to tbl_models (key IDstyle). tbl_model is related to tbl_modelColor (key IDModel) and tbl_color is related to tbl_modelColor(key IdColor).<BR><BR>What I have is only the IDstyle value. for me to update the values in tbl_modelColor, I need to do a select to get the IDModel. I need to change several values in tbl_styles, tbl_models and multiple records in tbl_modelColor<BR><BR>Wouldn&#039;t it be easier to delete the record in tbl_model (using the IDStyle) and reinsert the model and all associated modelcolor values ???<BR><BR>P.S. how do I update several records at once (in tbl_modelColor)<BR>that have the same IDModel?<BR><BR>Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts