The adage is to buy low and sell high. But I've never been a huge fan of that thinking. 

Companies are routinely hitting all-time highs. Sitting on the sidelines may work sometimes, but it exacts a high cost if a company you're eyeing just keeps on growing.

That's why I'm buying a highflier in October. Shares of MongoDB (NASDAQ:MDB) may be three times more expensive now than they were in February, but I think we're still at the beginning of a very long growth story.

Rocket takes off from the hand of the businessman.

Image source: Getty Images.

What exactly does MongoDB do?

MongoDB's stated mission is, "to unleash the power of software and data for innovators everywhere." That sounds like rosy marketing speak, so it's important to understand how it plans on accomplishing this mission.

I'm not a coder, so I'm going to give the view from 30,000 feet of what MongoDB actually does: It offers companies access to an open-source database that crunches all the data it can collect. Such service has typically been dominated by Oracle (NYSE:ORCL)

However, there's a key differentiator: Whereas Oracle's databases speak a language that's quickly becoming outdated (SQL), MongoDB functions on a different one (NoSQL) that is quickly gaining in popularity.

Instead of trying to describe the difference between these two, I'll let this passage from a blog post by a Motley Fool member and IT architect going by the screen name shikotus do the explaining:

As a lay person, you can equate Oracle to Excel-all your data is in nice rows and columns, across many tabs, where [as] MongoDB data is like the files in your Windows Explorer-just a bunch of [possibly tagged] documents in hierarchical directory structures. 

There are scenarios where Oracle's language is still prefered -- especially financial transactions. If you want a more technical dive into the difference, this article on Couchbase is a good starting place.

The bottom line -- again, from 30,000 feet -- is that MongoDB is the leader in a new type of database language that's gaining market share.

Here's what's really exciting about MongoDB

Of course, just because a company is a first-mover in a new niche doesn't make it a good investment. Just look at GoPro: While it may have been the first to market tiny action-cameras, there was nothing to prevent the competition from coming in and offering the same thing for less. 

That's where moats -- or sustainable competitive advantages -- come into play. And MongoDB has two huge ones growing wider by the day: high switching costs, and the network effect.

As fellow Motley Fool writer Timothy Green wrote -- ironically, about Oracle -- last month:

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.

The same could be said for MongoDB. Critically, despite these huge switching costs, MongoDB is starting to become a more serious threat for Oracle.

These high switching costs are also evidenced by MongoDB's net annual revenue expansion rate. All this metric really does is take the total money spent by all customers in Year One and compare it to the total money spent by those same customers in Year Two. This eliminates the effects of new customers from year to year.

This metric -- which is only published once per year -- has been over 120% for three years now. What this means is:

  1. Customers are staying with MongoDB (evidence of high switching costs).
  2. Those customers are adding more services (making said switching costs even higher).

The network effect, on the other hand, comes into play when each additional user of a product makes the overall service more useful. The classic example of this is Facebook. Think about it: What would be the point of joining Facebook if none of your friends were there? Each additional friend who joins makes Facebook more enticing.

With MongoDB, it's not quite as straightforward. The company uses open-source technology. That means that anyone can build applications that run on MongoDB's databases.

Here's where the network effect comes in: As MongoDB gets more customers, third-party app developers know their solutions will get in front of the most eyes if they're built in MongoDB's ecosystem. It's a phenomenon that feeds on itself, creating winner-take-all dynamics.

The results speak for themselves

If you're still skeptical, consider MongoDB's results thus far: 

Chart of MongoDB's Subscription Revenue by year

Chart by author. Data source: SEC filings. 2018 results include first two fiscal quarters only.

As if these numbers aren't impressive in their own right, the 2018 results only include the first two fiscal quarters of the year. Using 2014 as a starting point, the company's subscription growth rate stands at 60% per year!

The company's success with new offerings portends lots of heady growth still to come. Take the company's Atlas database-as-a-service as an example.

  • In 2016, Atlas brought in roughly $1 million in sales (1% of all sales).
  • In 2017, Atlas brought in roughly $10 million in sales (7% of all sales).
  • Over the past six months, Atlas has brought in roughly $16 million in sales (16% of all sales in 2018).

It isn't much of a stretch to expect that Atlas -- an offering that didn't even exist three years ago -- will account for 20% of sales in 2018. The company has similar opportunities with other tools, like MongoDB Stitch.

How I'm approaching MongoDB 

Add all of these pieces together, and I believe MongoDB is a compelling investment opportunity. However, while my excitement is sky-high, I'm also aware that the stock can be volatile. As it's currently free-cash-flow-negative, I'm comfortable easing myself into the stock over time. I intend to devote around 2% of my overall portfolio to MongoDB, and add more over time based on results.

I think growth investors with a long time horizon would be wise to consider doing the same.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.