RE: Yellow Pages and Google...
They must have some monster SEO stuff going on. (not to mention all the sponsored adwords for SME's that show up by YLO.)
The Yellow Pages use the oldest SEO trick in the book - provide high quality content.
In your example, if I search for "dentist ottawa" and the Ottawa Yellow Pages link comes up, there's a good chance I would select it - because in my past experience the Yellow Pages contains pretty accurate lists of professionals. (Google records the fact that I choose this link, and increases its weight.) Then, because the Yellow Pages link does contain a lot of dentists, I probably won't return to the Google page and select a different link. (Google presumably records cases where I return and select another link, and reduces the weight of the original link.)
Google may also include Yellow Pages in its list of sites that are known to contain information that people want (such as Wikipedia), and automatically give it a higher rank.
In some areas, Yellow and Google may be competitors but there is also a symbiotic relationship between them.