Hmmm that's a pretty good question in many ways
Both broke certain grounds in the "mainstream", Sabbath getting "gothic" metal into a "household name" kind of thing, and Metallica got speed/thrash into the mainstream
Personal preference would be Sabbath with DIO since I never really cared for Ozzys "vocals"
Metallica was Cliff Burton. When he got squashed by that bus, they had one albums worth of Cliff material left (which would be "And justice....") then they were left to make their own stuff up... the albums that came after that proved that Cliff was the ENTIRE band, pretty much the same way that AC/DC sucked the bone after Bonn (SP?) died, they just kept trying to emulate what they used to do when the genius was with them
Despite thinking rather highly of themselves, McTallicas output post mid-80s has been pathetic- case in point that AWFUL "symphony" album, where they got a whole orchestra to basically play chord patterns in 4-4 time and didn't make a single arrangement to actually justify a few dozen people being involved
MAN I wish I had Live Evil here on CD dammit, DIO's interpretations of the "classic" sabbath were second to none
OH and Rainbow kicked all sorts of serious butt, I would take them over either McTallica or Sabbath if given the choice