Target Per Entity Data Migration

Posts   
 
    
mattsmith321 avatar
Posts: 146
Joined: 04-Oct-2004
# Posted on: 30-Mar-2006 00:55:23   

Anybody have any suggestions/strategies for converting the data from an exiting Entity-based model to a Target-Per-Entity model? We are in the process of converting our site to Target Per Entity and while the conversion from one object model to another is relatively straight-forward, getting the data migrated over will be a pretty big challenge.

Any tips/suggestions are appreciated.

Thanks! Matt

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 30-Mar-2006 07:55:52   

I think it depends on your data structure.

Knowing the following might help: 1- your data structure (maybe an example) 2- why you want to turn it into a Target per Entity.

mattsmith321 avatar
Posts: 146
Joined: 04-Oct-2004
# Posted on: 30-Mar-2006 09:30:07   

Walaa wrote:

I think it depends on your data structure.

Knowing the following might help: 1- your data structure (maybe an example) 2- why you want to turn it into a Target per Entity.

1 - What? You haven't been paying attention to my data structure in all of my other posts the past few days? cry

2 - Why? Because all the cool kids are doing it! Just kidding. We have lots of tables with similar attributes that we are wanting to collapse into a table inheritance model. Actually, we would have started out as Target Per Entity a year ago, but it wasn't an option at the time.

In regards to my original post, what I was looking for was some advice based on people's experience on whether we should use DTS, scripts, third party utility, etc. The biggest point of concern for us was how to take multiple tables and merge them into one base table and then also still manage to keep all the IDs and foreign keys. Specifically, we had four entity tables that we were collapsing to a base table and in each of the four tables, they all had rows with the same primary key ID.

Long story short: We used DTS and just offset the starting value for each new entity table that we were adding into the base table.

Thanks anyway!

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 30-Mar-2006 15:31:39   

1 - What? You haven't been paying attention to my data structure in all of my other posts the past few days?

Sorry for that, maybe I'm too lazy to notice disappointed

Anyway, being more a programmer than a DBA, that would have made me make a simple program to perform this data migration. I think it wouldn't have taken more than a couple of hours, especially with LLBLGen around simple_smile

And for sure I would have taken a backup from the database first, who knows what kind of bugs I may have produced :>

mattsmith321 avatar
Posts: 146
Joined: 04-Oct-2004
# Posted on: 30-Mar-2006 16:22:30   

Walaa wrote:

Sorry for that, maybe I'm too lazy to notice disappointed

Hopefully my comment came across as humor and not serious. I wouldn't expect anyone (here or elsewhere) to pay enough attention to put all the pieces together (it would be nice though stuck_out_tongue_winking_eye ). Plus, I'm working on two different projects and the pieces don't quite fit together.

Walaa wrote:

Anyway, being more a programmer than a DBA, that would have made me make a simple program to perform this data migration. I think it wouldn't have taken more than a couple of hours, especially with LLBLGen around simple_smile

That's where I was coming from. We spent some time thinking it through from a programming perspective, but we are definitely thrilled with the DTS results. Something to add to the arsenal. Like one of my earlier posts on table views, I can't believe made it this long without any real exposure to DTS.

Walaa wrote:

And for sure I would have taken a backup from the database first, who knows what kind of bugs I may have produced :>

Backup? We don't need no stinkin' backups! stuck_out_tongue_winking_eye Just kidding! We are still working in our dev environment and are a long way from the production data.