If you're investing in individual stocks, it's a good idea to focus on companies that have major competitive advantages. That's doubly important when it comes to tech stocks, given how quickly things can change. A tech company without competitive advantages can fall apart quickly when the tech landscape shifts.

International Business Machines (IBM 1.47%), Cisco Systems (CSCO 0.61%), and Oracle (ORCL 2.40%), despite being decades-old tech giants in a world where newer companies like Amazon.com and Netflix get all the attention, have some killer advantages that investors shouldn't ignore.

A view looking up at IBM's Global Center for Watson IoT in Munich, Germany.

Image source: IBM.

International Business Machines

Shares of IBM are down over the past five years, which is the result of a long string of revenue declines that only recently came to an end. Profits have plunged and the company executed a major shift toward cloud computing, artificial intelligence, and other growth areas. The legacy businesses, now representing a bit more than half of total revenue, continue to drag down IBM's results.

Despite all of this, IBM has managed to produce at least $12 billion of free cash flow each year throughout its transformation, allowing it to invest in growth initiatives, continue to raise its dividend, and buy back billions worth of its own stock. IBM was able to do that because its biggest competitive advantage is its entrenched status and sometimes decades-long relationships with its customers. Simply put, IBM isn't going anywhere.

A whopping 97% of the world's largest banks rely on IBM products and services. Nine out of 10 global credit card transactions are run through IBM's mainframe systems. Eight out of 10 travel reservations are handled by IBM systems. In certain industries, IBM is deeply embedded.

These relationships are an asset when customers are looking to adopt new technologies. Here's one example: The Australian federal government signed a Whole of Government agreement with IBM in July, worth around $750 million over five years that covers hardware, software, cloud-based solutions, artificial intelligence, cybersecurity, blockchain, and even quantum computing. IBM and Australia have a relationship that goes back 40 years.

While IBM stock hasn't performed well for a long time, it's a mistake to count the company out.

Cisco Systems

Cisco leads the market for Ethernet switches by a wide margin. The company enjoyed a 53% market share at the end of 2017, dwarfing the 10.3% market share of No. 2, Huawei. Cisco's dominance has persisted for years, despite the constant threat of cheap commodity hardware undercutting the company on price.

Cisco has remained dominant in part because the price of its hardware is a minor factor for its customers. More important are the ongoing costs of running that hardware. Cisco CEO Chuck Robbins estimated earlier this year that companies spend $15 on operating costs over five years for every $1 spent on networking equipment. Cheap hardware isn't so cheap when the total cost of ownership is considered.

That's likely the reason why Amazon, which was reportedly considering selling its homegrown networking hardware to third-parties, dropped the idea. Amazon was reportedly planning to undercut Cisco on price by as much as 80%. But it would have been a years-long slog to convince Cisco's customers to switch, even with much lower prices. Cisco has continued to thrive over the years despite the availability of cheap networking hardware.

Cisco's products add value that more than offsets the lower prices offered by competitors. Its dominant market share is proof of that. The company needs to keep innovating to maintain this advantage, and its success with its latest subscription-based Catalyst 9000 switches suggests that it's doing just that.

Oracle

Despite missing the boat on cloud computing, Oracle remains the dominant force in the database market. The company enjoyed a 41.6% share of the database software market in 2015. Oracle's dominance has likely eroded a bit since then, given the onslaught of competition, but the company is still the database king.

Oracle has been able to maintain its outsize database market share in the age of cloud computing even with plenty of new competition from Amazon and smaller players like MongoDB because it's hard to switch away from Oracle. Switching costs are immense, plain and simple. A company that runs mission-critical workloads with Oracle's database is unlikely to want to go through the pain and disruption of ripping out that database, even if it would save a little money.

Amazon and salesforce.com, both Oracle competitors, still rely on Oracle's database software. Amazon has been working for years to drop Oracle software and plans to be done by 2020, while Salesforce is targeting 2023. The fact that it's taking these gigantic companies, with near-boundless resources, this long to drop Oracle's products tells you all you need to know about switching costs. Smaller companies that rely on Oracle's software are stuck, for all intents and purposes.

This switching cost advantage doesn't help Oracle win new customers -- it may actually hurt it as companies look to avoid getting locked into Oracle's database. But it does provide a stable customer base that should keep the profits flowing for the foreseeable future.