As a beginner woodworker, should I buy a table saw or a band saw?
It depends on what you're cutting, why you're cutting it, and what type of cuts you're making.
Long Straight Cuts
When it comes to long straight cuts, a table saw is the best in the business.  Set the fence, turn it on, and it'll cut the same width pieces forever. With a band saw (or most other saws), you'll be looking at using some type of jig for long straight cuts.  Though even with a jig, you can end up with a bit of wobble in the cut since the blade may be a bit flexible.
Scrolling Cuts
If you're scrolling, you're not using a table saw. A band saw is going to allow you to make tighter radius curves, and do more accurate scrolling work.
Depth of Cut
In some cases you'll not want to cut clean through a board. Maybe you're cutting a dado, a groove, a tongue, etc. In these cases, the height adjustable blade on a table saw can be quite handy. You're not making these cuts on a band saw, though you could always use a router.
Beveling
Some table saws also allow you to tilt the blade, which allows you to make long straight bevel cuts.  You can do bevel cuts on a band saw, but you're going to have to tilt the work piece instead of the saw blade.
Materials
If you're working with more than just wood, a band saw will be your friend.  You'll be able to cut metal, wood, plastics, and even meat, simply by installing an appropriate blade.  A table saw is simply not going to offer the same versatility.
Kerf
Kerf, is the amount of material removed by the saw blade. Since a band saws blades are thinner, they'll have a smaller kerf than a table saw.  Whether that's a pro or con is up to you, but there you go.
Noise
In almost all cases, a band saw is going to be much quieter than a table saw.
Safety
Some people feel safer around a band saw. Maybe because it's quieter, or doesn't look as ominous. I'm not sure what the reason, that's just how it is.  Don't be fooled, a band saw will take your finger off just the same as a table saw.

In the end, it depends what types of cuts you'll be making most, what materials you'll be using, and your own personal preference.  I say, get both!