Overview

Skill Level: Beginner

How to choose a DBMS for the project, taking into account the needs of the company.

Ingredients

The database management system is chosen depending on the tasks of the business. For example, startups need a quick start with minimal investment. On the other hand, banks need to keep data correctly; otherwise customers may lose their money. Today I want to talk about how to choose a DBMS for the project, taking into account the needs of the company.

Step-by-step

  1. Databases for a newly created company

    Problem: The business model of many newly launched businesses may change after entering the market. For example, the Groupon service initially brought people together to solve problems, and only then switched to selling coupons.

    Even if the business model remains the same, the company may have new challenges and needs. Therefore, at the start, it is risky to choose a database management system designed to solve narrow problems. The chosen DBMS may not be suitable for new types of business processes and transferring data from one system to another can be difficult and expensive.

    What to do: For a small startup, it is better to choose one of the relational databases, for example, PostgreSQL or MySQL. They are suitable for a wide range of tasks. For fast-growing companies, it makes sense to use two or three DBMSs at once. For example, MySQL or PostgreSQL for long-term data storage, and Redis for fast query processing.

  2. Databases for testing new products and updates

    Problem: It is important for startups to quickly test hypotheses and new services in order to understand which products or services are in demand among customers and at the same time to minimize startup costs.

    Large companies contain their own IT infrastructure and a team of specialists to service it. At the same time, they also need to test new products and service updates while maintaining the stable operation of existing solutions.

    Deploying or expanding your own IT infrastructure is an expensive and lengthy process as you need to buy and configure expensive equipment, maintain it even during downtime.

    What to do: At the start, it does not make sense to purchase equipment and build your own IT infrastructure. And if it is already built, instead of expanding, you can move the tests to the cloud.

    If you rent a cloud database, which you can set up in two clicks and pay only for the used computing power, you will save on the purchase and maintenance of equipment.

  3. Databases for storing data

    Problem: For some companies, it is important that the data remain unchanged, and each time reproduced in its original form. Again, for banks, it is critical to conduct all transactions correctly; otherwise customers may lose money. Mistakes in inventory storage can disrupt retail operations.

    What to do: Relational databases such as MySQL or PostgreSQL are suitable for such a business. They allow you to store structured information, which is always grouped based on the same criteria and does not change. For example, in a bank, it can be the information about the sender, the recipient, and the transfer amount.

    In MySQL and PostgreSQL, each row or column stores only one data type. These DBMSs are stable; the occurrence of errors in the data is almost impossible. Due to the features of their design and high reliability, the safety and immutability of information is ensured.

  4. Databases for projects with unpredictable workloads

    Problem: In some areas, the load on IT infrastructure depends on the season. The most vivid example is Black Friday. During this period, sales in many online stores increase by 100%.

    For such peak periods, additional processing power is required. Of course, you can scale the DBMS, that is, add resources to it – new servers, but they are expensive and will stay idle for the rest of the year.

    What to do: For projects with unpredictable workloads, scaling cloud databases is easier and cheaper. PostgreSQL or MongoDB can be configured to provision new resources quickly.

    In the event of a sharp increase in traffic, the company receives additional resources of the cloud DBMS automatically or upon request. In this case, only actually spent resources are paid.

  5. Databases for analytics and big data

    Problem: Companies analyze data to optimize business processes and predict the popularity of their products or services. For example:

    • Transportation companies evaluate the movement of goods in different directions to develop new routes.
    • Retailers analyze the demand in order to plan the assortment and merchandising strategy.
    • In health, disease data is used to predict epidemics.

    If there is plenty of information to analyze, then such data is called big. In order for the machine algorithm to draw reliable predictions and conclusions, it is necessary to quickly extract data based on specified criteria. The relational databases like MySQL and PostgreSQL will not cope with this task. It takes them a long time to process large amounts of information.

    What to do: Here, you need a special analytical database, for example, ClickHouse. It quickly performs analytical queries and can process more than a billion lines in one second. This means that the company will be able to quickly receive and use the necessary information.

  6. Databases for fast query processing

    Problem: Some services must quickly process user requests in real-time. This is important if you are developing a social network, dating application, streaming platform or any product in which the user creates a personal profile. Such projects also have to deal with numerous transactions, real-time analytics, counters, authentication, and other operations involving a quick database response.

    What to do: Redis is a distributed, in-memory key-value database that may offer really high-performance. It is suitable for such situations. Redis stores data in memory; that is why it is responding to queries ten times faster than MySQL or PostgreSQL.

    It can be used on its own or as an additional database in cases where the number of requests is growing sharply, and you need to process them quickly.

  7. Databases for special tasks

    Problem: Sometimes, a business needs to solve narrow tasks. For example, to encrypt passwords, make ratings, analyze transport routes or monitor the movements of couriers in real-time.

    What to do: You need a database that allows you to connect extensions or use special commands to solve non-standard tasks.

    For PostgreSQL and Postgres Pro, a large number of additional extensions have been developed. For example, cryptography extensions will encrypt personal data for secure transmission over the network. In the event of theft, attackers receive only anonymized information. The PostGIS extension is suitable for map services, for example, for searching through geographic data.

    Redis has a set of special commands that allow you to use the database to solve narrow tasks in real-time. For example, ranking players in games, content analytics, geographic data management, tracking the location of vehicles, etc.

  8. Checklist

    1.    A startup may change its business model. Therefore, it is better to choose a DBMS suitable for solving a wide range of problems or use two or three databases at once.

    2.    Large companies and startups can test updates or new products in the cloud database without buying expensive equipment.

    3.    In a business where the load on the infrastructure depends on the season, it is important to quickly scale the database – this is convenient to do in the cloud.

    4.    Relational databases, for example, MySQL or PostgreSQL, allow storing information unchanged.

    5.    For working with big data, ClickHouse works perfectly well. It allows us to quickly perform analytical queries.

    6.    Redis, a high-performance DBMS, allows you to respond to user requests quickly; it stores data in memory.

    7.    Use extensions for solving narrow tasks.

     

    ————————————————————————————————————————————–

    About the Author: David Balaban is a computer security researcher with over 17 years of experience in malware analysis and antivirus software evaluation. David runs Privacy-PC.com and MacSecurity.net projects that present expert opinions on contemporary information security matters, including social engineering, malware, penetration testing, threat intelligence, online privacy, and white hat hacking. David has a strong malware troubleshooting background, with the recent focus on ransomware countermeasures.

Join The Discussion