are quite different. They are similar only in that they are both located at the ridge and are sandwiched between opposing rafters.
actually supports the rafters at the ridge, transferring live loads to posts or gable end walls. A ridge beam is typically needed if the roof slope is less than 4 in 12. (A wall can also be used.) The ridge beam should be at least a 2 by 6, and is often one size deeper than the rafters. The beam should be supported by posts no smaller than 2 by 4's every 4 feet. Where the posts are longer than about 8 feet, they have to be laterally braced to prevent buckling. (Engineered ridge beams may have much longer spans.)
Where ridge beams are used, there is no risk of spreading rafters. It's not necessary to tie the bottom of opposing rafter pairs together. Ridge beams are often used on asymmetric roofs where the slope on one side is much different from the other, the wall heights are different on either side, or dormers interrupt the roof slopes.
If the slope of the roof is 4 in 12 or more, and the bottoms of opposing rafters are tied together by ceiling joists, a ridge beam is not required. A
is used instead. A ridge board does not support the rafters at the ridge. They are typically a nominal 1 inch board and are usually one size deeper than the rafter size (so that rafters cut on an angle will have full bearing on the board). Ideally the rafters should oppose each other directly but many authorities will allow the rafters to be offset by their width.
make is easier to build the roof
transfer loads between nearly opposing rafter pairs
Ridge boards don't carry much live load. Loads from an opposing rafter are offset (with apologies to the engineers) by the other rafter.
The ridge board can be omitted if the rafters oppose each other directly.