The creators of MongoDB (MDB 4.83%) built the database to address traditional databases' limitations that create difficulties for app developers. Since its launch in 2009, it has gained massive popularity among developers by tackling their pain points.

In October 2017, the company came public at an initial offering price of $24 per share. If you had purchased the stock at that price, your return on investment today would be an astounding 1,625%. However, MongoDB's shares have underperformed since the end of 2021 due to the company's lack of profitability in a rising interest rate environment. Although the stock has recently rallied, the risk of it dropping again in case a recession gets underway is high.

Suppose you are a worried shareholder wondering what to do in this uncertain environment. It would be best if you remained invested in MongoDB stock despite the risk its price could fall in the short term. Here's why.

1. Artificial intelligence (AI) needs a great database

MongoDB has many favorable qualities that make it an excellent choice for use in many forms of AI. Some of these attributes include:

  • Flexible data model: MongoDB uses a data model that makes it easy to store and process data that can't fit easily in the rows and columns of an Excel spreadsheet, such as images, audio, and unformatted text data.
  • Scalability: The database can quickly scale to meet the demands of large AI applications.
  • Performance: It can often be faster than traditional databases for certain queries, which is beneficial for AI applications that process large amounts of data in real-time.
  • Community: It has an extensive and active community of developers, so many resources are available to help developers new to the platform.

After OpenAI introduced ChatGPT in late 2022, it created massive interest from companies in all forms of AI. Since MongoDB is popular for AI usage, its sales should benefit significantly from the proliferation of AI applications.

2. It's vital to the application economy

"Application economy" refers to the economic activity produced when creating, selling, and using mobile apps and other software applications. The specific portion of the application economy where MongoDB plays is the database management software market. According to IDC, the $95 billion market will expand at a 13% compound annual growth rate to reach around $138 billion in 2026.

MongoDB's success depends directly on the success of the applications that software developers build. The more popular an application becomes, the more developers spend on its platform. MongoDB's chief executive officer says it this way:

As these applications become successful, customers spend more with MongoDB. In other words, their spend on our platform is directly aligned with their usage of their underlying application. Therefore, the value they derived from it. While the growth rate of existing applications can vary based on a number of factors, including macro conditions, the relationship between ... application usage growth and MongoDB spend has remained consistent.

MongoDB is one of the most popular databases supporting developers because its attributes make it a good choice for mobile apps, social media platforms, and e-commerce websites. It consistently ranks in Stack Overflow's annual developer survey in the top five most popular databases for all developers. And in the 2023 survey, it was the second-most-popular database for those learning coding.

As a result of MongoDB's popularity among developers, it has been able to achieve significant revenue growth. In the 2022 fiscal year, its revenue soared 47% versus the previous year to $1.28 billion, driven by the increasing adoption of MongoDB by developers building applications for the application economy.

3. Real-time data is a popular feature

Users highly value MongoDB's ability to access real-time data because it enables them to make informed decisions. Real-time data updates instantly as events occur, which is vital for businesses to make timely adjustments. For instance, an online retailer can use real-time data to identify popular and unpopular products and adjust prices, stock levels, and marketing campaigns accordingly.

Real-time data is also vital for companies that need to track customer behavior. A bank, for example, can use real-time data to detect fraudulent transactions and prevent them by monitoring customer spending on credit and debit cards. Overall, real-time data is becoming increasingly crucial for businesses of all sizes. It allows them to make better decisions, improve customer service, and prevent fraud -- all mission-critical functions.

Investors want to see profitability

MongoDB has yet to achieve profitability, both on the basis of Generally Accepted Accounting Principles (GAAP), or when adjusted to exclude non-operating costs. Despite rising revenue, GAAP operating income profitability has been going downhill since its initial public offering until relatively recently.

MDB Operating Income (Quarterly) Chart
MDB Operating Income (Quarterly) data by YCharts.

In a bull market, investors are usually ok with a "growth at all costs" strategy of chasing market share and revenue growth at the expense of profitability. However, in a slowing economy, a company with declining revenue growth and profitability falling will see investors become rapidly disenchanted and sell the stock.

In July 2022, MongoDB's operating expenses grew more than its declining revenue growth, resulting in a significant drop in operating income profitability, as shown in the following data.

MDB Revenue (Quarterly YoY Growth) Chart
MDB Revenue (Quarterly YoY Growth) data by YCharts.

In a rising interest rate environment with lingering possibilities of a recession, Wall Street hates seeing operating income sink more deeply into the red. Eventually, the stock plunged to a 52-week low on November 9, 2022, to $135.15.

The company has since reigned in costs, and operating income has improved significantly, a reason why the stock now sells at $373.00.

Suppose you invest in this stock at its current price. In that case, you are betting on MongoDB's ability to re-accelerate revenue as the economy rebounds, manage expenses, outperform its competitors, and eventually see profitability -- a difficult task. Its high growth potential comes with a risky price-to-sales ratio of 19. Hold on to current shares, but wait for a more reasonable valuation before buying new shares.