From: Pit Capitain Date: 2007-02-08T23:41:43+09:00 Subject: Re: General Approach to Data Validation Drew Olson schrieb: > I posted some questions yesterday about getting ActiveRecord working > with Oracle 10g, and I'm happy to say I was successful. ActiveRecord > makes pulling and manipulating data so easy. Now, I'm writing some data > validation scripts. Here's the goal: given two data sources, confirm > that specific fields in the first table are the same as the fields in > the 2nd for the same record, check to see if there are records in the > 1st table that aren't in the 2nd, and vise-versa. I was wondering if my > general approach is the fastest way to do this, as I'm not new to ruby > but generally new to writing high performance sql (and thus the > corresponding ActiveRecord statements). I'm working with very large > datasets here and want to streamline the code as much as possible. Drew, I would try to perform the comparison inside the database, especially if your datasets are "very large". (How large is this actually?) Given that you are working with Oracle, I would use Oracle's database links to get access to both tables. Regards, Pit