I'm confused about routing table sizes in BGP vs OSPF. My understanding is that in an AS with the routers running OSPF, each router will have the whole picture of the network, and as such will have an entry for each router and the metric for reaching it. If the routers in the AS are running BGP, each router will only be aware of its neighbors; as such, it will have much fewer entries.
Is this assumption correct? If it is, could you provide an example showing how this is so, and why this is always true?