The 5W (the W stands for Winter) is the viscosity of that oil when cold, and the 30 is the viscosity of the Oil when it's at 212 degrees-

That being said, the "30" designation uses what is called "Viscosity Index Improvers" which is mostly Polymer based (which is a form of plastic)-part of the reason you change Oil (other than to get the trash out) is that with multi-grade Oils, the Polymer can shear leaving you with the lower number to protect your engine-

Now, when you say "straight" 20-50, there really is no such thing-a straight weight would be, say, a straight 30 weight (straight weight Oils do not have Viscosity Index Improvers)-they are graded by a "hydrocarbon chain" which is a molecule that consists primarily of hydrogen and carbon (there is more to that subject, but Ill keep it short here)-

A short Hydrocarbon chain would be a lower Base Weight (say a straight 10 weight), whereas a long hydrocarbon chain could be, say a 40 weight (the longer the hydrocarbon chain, the higher the number)-

It is absolutely ok to mix straight weight Oils, but I would not recommend blending multi-viscosity Oils (there are just too many Additive package differences)-hope this helps-

edit: Ooops! Looks like I've been tree'd-