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

  • Home
  • SEARCH
  • 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 3212044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:47:50+00:00 2026-05-17T14:47:50+00:00

I am new to database programming and want some tips on performance / best

  • 0

I am new to database programming and want some tips on performance / best practices. I am parsing some websites to scrap television episode infos and placing them into an MS SQL 2008 R2 relational database.

Lets say i have a table filled with type Episode. When i start a new parsing, i generate a new list of Episodes. The thing is, i want the database to match exactly as the new list. Currently I’m doing a mass delete all then insert all. Problem is I’m not sure if this is the best way to go about it, especially since i’m concerned about data persistancy (episode_id primary indexes staying the same for long periods of time).

Is there some easy way to insert any new episodes into the table, update any ones that have changed, and delete any that no longer exist anymore, such that the end result is exactly the same as the new list of episodes. An episode would be compared by the series id, season number, and episode number.

Edit:

A Series type contains a list of multiple different episode types, for instance:

List<TVDBEpisode>
List<TVRageEpisode>
List<TVcomEpisode>

I would parse a single site at a time for instance:

    public void ParseTVDB(Series ser)
    {
        var eps = new List<TVDBEpisode>();
        //... Parse tvdb and add each epsiode to this list
        //... Make the Series' existing TVDBEpisodes match the new TVDBEpisodes
    }

    public void ParseTVRage(Series ser)
    {
        var eps = new List<TVRageEpisode>();
        //... Parse tvrage and add each epsiode to this list
        //... Make the Series' existing TVRageEpisodes match the new TVRageEpisodes
    }

    public void ParseTVcom(Series ser)
    {
        var eps = new List<TVcomEpisode>();
        //... Parse tvcom and add each epsiode to this list
        //... Make the Series' existing TVcomEpisodes match the new TVcomEpisodes
    }
  • 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-17T14:47:51+00:00Added an answer on May 17, 2026 at 2:47 pm

    Yes, have a look at the AttachAllOnSubmit(), InsertAllOnSubmit(), and DeleteAllOnSubmit(). The methods are built into LINQ to SQL and will executive the apprpriate operations that you’re referring to above. Here some example code.

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

Sidebar

Related Questions

I am new to PHP but not programming in general. I want to store
I am new to programming and would like to write the following within a
I have created a new database table with the name 'table'. Now i'm trying
I have some methods that are used for initializing and cleaning up a database
hello everyone I am newto programming and I am just a little bit confused.
I've got a PHP database class which connects to MySQL and wraps up all
I'm working on some Ruby code that needs to create primary keys on existing
I am working on a project that is a customized and specific CMS. In
In my application I have a DataSet that holds tables that are used in
I created classes: public class Country { public long CountryId {get;set;} public string CountryName

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.