Some investors see a lot of value in Oracle (NYSE:ORCL) shares. The database-software giant's own management, for one, recently called it "an unbelievable buy" and authorized another $10 billion of stock buybacks.

That's not necessarily wrong, but you don't have to look too far afield to find a better value stock in the tech sector. Right now, it's hard to beat the long-term value you'll get from IBM (NYSE:IBM) shares.

A stack of coins, topped with a bundle of rolled-up $10 bills. There's a shadow of this arrangement on the wall behind it that looks like a rocket in flight.

Image source: Getty Images.

Oracle's story

Oracle is a former titan of business on its way down. A new breed of database platforms has arrived, challenging not only Oracle's business model but also the technical foundations of its flagship product line. The future belongs to so-called NoSQL databases, which can organize and manage unstructured data at a scale and speed that's completely alien to Oracle-style relational databases.

Even Oracle knows it and is playing catch-up with its own cloud-based NoSQL platform. But it's too little, too late, and Oracle comes with the wrong kind of street cred to pull off that transformation.

IBM's story

IBM found itself in a similar situation five years ago. Ex-CEO Sam Palmisano had pulled Big Blue up by its bootstraps, creating a celebrated business model where one company provided all the hardware, software, and associated services it might take to run a successful IT operation at enterprise scale. Oracle was one of the many would-be IBM clones that attempted to copy Palmisano's fantastic template.

But markets change, and companies like IBM and Oracle must change along with the environment if they want to stay relevant and successful. Big Blue's current CEO Ginni Rometty stepped in with a clear vision of dramatic market changes and a mandate to do whatever was necessary to stay abreast with the new times. Rometty didn't just follow that change but started spearheading the change right away.

Half-a-decade later, cloud computing is the buzzword of choice around the entire IT industry; this is exactly where Rometty was aiming all along. The company has sacrificed billions of dollars in annual revenues by shedding outdated computing-hardware units to refocus on cloud-based data analytics and management. Artificial intelligence plays a large part in IBM's new strategy. So does corporate mobility, and the company is a leading provider of blockchain technologies for corporate clients.

If you're playing buzzword bingo at home, your gaming card must be pretty full by now. That's fine. As I said, IBM is driving many of these trends rather than just following along.

These so-called strategic imperatives accounted for more than half of IBM's total sales in 2018 and will only continue to outgrow the remaining legacy operations over time. We're looking at a hockey-stick moment for IBM's long-term revenue growth, where the annual increases should start stacking up very quickly after a few years of falling sales. The same trends should also expand IBM's profit margins over the next few years.

The upshot: Big Blue is winning -- and the stock is cheap!

IBM's radical strategy shift has been hard on its stock prices. Its shares have lost 24% of their value over the last five years, or a less hair-raising 9% if you account for its generous dividend payouts along the way. Today, IBM shares are trading at just 9.5 times forward earnings and 12 times trailing free cash flows. That's a great bargain for a long-running turnaround story that's bouncing off the rock-bottom deep end of a five-year trough.

Glancing over at Oracle, I see a company struggling to keep up with the changing markets rather than setting the tone for a new era. Its shares are trading for 14 times forward earnings and 16.6 times trailing cash flows. You just can't convince me that Oracle's shares are a better buy than IBM's right now.

Anders Bylund owns shares of IBM. The Motley Fool owns shares of Oracle. The Motley Fool is short shares of IBM and has the following options: long January 2020 $30 calls on Oracle. The Motley Fool has a disclosure policy.