Sobes.tech
Junior — Middle

What database management systems are you familiar with and have used in practice?

sobes.tech AI

Answer from AI

In practice, with Node.js, the following database management systems (DBMS) are often used:

  • Relational (SQL):

    • PostgreSQL — powerful, supports complex queries and transactions.
    • MySQL / MariaDB — popular relational databases with broad support.
  • NoSQL:

    • MongoDB — document-oriented database, well integrated with JSON and JavaScript.
    • Redis — in-memory key-value store, often used for caching and fast operations.
  • Others:

    • SQLite — lightweight embedded database for small projects.

Example of connecting to MongoDB using mongoose:

const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/mydb', {useNewUrlParser: true, useUnifiedTopology: true});

The choice of DBMS depends on project requirements, data volume, and operation nature.