Top-seed Sharapova, playing through a long-running shoulder injury, quelled a potential challenge from India's Sania Mirza 6-2, 6-1 in just over an hour.
Ninth-seed Dementieva controlled younger compatriot Maria Kirilenko 6-2, 6-4.
Anna Chakvetadze, the third seed and winner of her last two events in the US, scored the day's huge upset as she demoralised Williams 6- 7 (5-7), 7-6 (7-3), 6-2 in two and a half hours.
"This is one of the best wins of my career, to beat Venus in the USA is special," said the 20-year-old who has now won a dozen matches in a row.
The winner stands 1-4 against Sharapova, having lost twice to her compatriot this season.
Williams' spirits were dragging on the floor after 79 unforced errors and a missed match point in the second set, thrown away with a double-fault.
"She saved her best for San Diego," Williams said. "I was not at my best level. I'm really tired and it showed. Lots of things went wrong in my game tonight."
Patty Schnyder put a Swiss player into the mix, coming through fewer than 24 hours after beating famed compatriot Martina Hingis in three sets by upsetting Russian fourth-seed Nadia Petrova 6-4, 6-4.
Sharapova was pleased with her performance as she played in her first tournament since losing to Venus Williams in the Wimbledon fourth round. She has spent recent weeks at her house in Manhattan Beach near Los Angeles and is currently learning to boogie-board in the Californian surf.
"I had a good start and was able to play my game," said number two Sharapova. "The two keys were serve and return.
"Sania is a solid player so it's good to get some matches like I've won this week behind my back."
Sharapova dropped serve once, in the second set, only to steal it straight back. "I've got confidence and I'm ready to step it up in my next match," she said.
Schnyder has also been on a recent roll, reaching quarter-finals in Cincinnati and Stanford.
"I made her run a lot and really got my game going well," said Schnyder after ousting Petrova. "I'm feeling great on the court. I just want to keep this up for the weekend."