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 576875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:05:37+00:00 2026-05-13T14:05:37+00:00

I have ran into this problem a few times and I am wondering what

  • 0

I have ran into this problem a few times and I am wondering what other people are doing.

When I am creating a database, sometimes I have to import data into a table on a regular basis, let’s say daily. What I normally do is delete all of the records and reimport every record from the external data source.

Many times I will have to store some more data that relates to the imported records, but doesn’t come from the original import source. Typically this “extra data” comes from user input. So, I will create another table with a primary key matching the key of the table that gets the imported data, and store this additional data in the new table. If that doesn’t make sense here is an example:

In an old legacy system, we store employee data. But, I need to use this data in a web application that can’t connect to this old legacy system. So, I create a database with a table that matches the schema of the data that I have in the old system and I import each record into this table every day. When I do the import, I drop every record and import every record.

But in my new system, employees can save a bio. So in another table, I store this and their Id.

It would be simpler to have only one table, but I can’t do that because I would drop data that doesn’t exist elsewhere when I do the import.

Another bad thing is that, because I am deleting all of these records for the import, I can’t define foreign key constraints with related data.

I hate designing databases this way, because I know there is a better way. Wouldn’t it be nice if I could do updates when I import the data, instead of deleting and importing it all?

I am using Sql server 2008 but am interested to hear of strategies that can work with any RDBMS.

  • 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-13T14:05:37+00:00Added an answer on May 13, 2026 at 2:05 pm

    Well, when you do the import, import into a temp table, and then update the records in the production table (update in the generic sense of the word: delete what’s deleted, add what’s new, modify what’s changed).

    You might also want to check out the new MERGE SQL command in 2008, it just might turn out to be very helpful for this case.

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

Sidebar

Related Questions

Never ran into this problem with jQuery before. I have the following: $(document).ready(function() {
I ran into this RegExp /[[0]]/ in JavaScript, and have been wondering what it
I've ran into this scenario a few times now and I cant explain it.
I ran into this situation today. I have an object which I'm testing for
Currently developing a PHP framework and have ran into my first problem. I need
I am coding a text based Java game, I have ran into a few
I ran into such problem: I have one header file: //first variant: #ifndef LIBRARIES_H
I ran into a problem recently and found out that this is a bona-fide
I've never ran into this problem before. The menu looks good on Windows, but
I have ran into an interesting issue while trying to create a more usable

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.