To get started, get a Winegard HD7698P and an RCA TVPRAMP1R preamplifier.
If you point it at San Francisco you can expect to see some of the signals from the Sacramento market. Or if you turn it toward Sacramento, expect to see some of the SF signals.
If you want to maximize your chances at seeing all that you can, you'll need to consider using two antennas. It's not practical to combine these into a single coax, unless you want to literally take on the challenge of building a cable TV head-end using several hundred dollars to a few thousand dollars of equipment per channel. You can make a very practical system by simply running cable from each antenna to each TV location and then terminate one antenna in the built-in tuner, the second in an external tuner.
http://forum.tvfool.com/showthread.php?t=2882