Dimensional lumber (eg landscape timbers, 4x4s ) lasts WAY longer than flat boards.
The first raised beds I ever built were of boards. I used corner braces, middle braces and everything I could think of. Still in 3-4 years they were all warped and falling apart.
At the next house, I built raised beds out of stacked 4x4 pine fence posts (alternate stacked at the corners) held together with steel rebar pounded down through the stack. I sealed them with varnish. :
At the time I moved away from that house, they had been there for about 14 years and were still going strong. I did recoat the outside every few years, mainly for cosmetics, but of course once the dirt is in, it's never going to get redone inside.
This is my most recent creations. It's landscape timbers. Not nearly as good wood as the pine fence posts, but cheaper. These only cost me about $30 each to build, which I think is about as cheap as you can get for an 8x4 raised bed. Probably won't last as long as the 4x4's.