Sobes.tech
Senior

What types of databases are there and what are they used for?

sobes.tech AI

Answer from AI

Database types can be classified by data model and purpose:

  1. Relational databases (RDBMS) — store data in tables with a fixed schema, support SQL. Used for structured data and transactions.

    • Examples: MySQL, PostgreSQL, Oracle.
  2. Document-oriented databases — store data as documents (usually JSON or BSON), flexible schema.

    • Examples: MongoDB, CouchDB.
  3. Key-Value stores — simple key-value pairs, fast access.

    • Examples: Redis, DynamoDB.
  4. Graph databases — store data as graphs (nodes and relationships), suitable for complex interconnections.

    • Examples: Neo4j, JanusGraph.
  5. Column-oriented databases — optimized for analytics, store data by columns.

    • Examples: Apache Cassandra, HBase.
  6. Time-series databases — optimized for storing time-series data.

    • Examples: InfluxDB, TimescaleDB.

Each type is suitable for different tasks: transactional systems, analytics, caching, unstructured data storage, etc.