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:
-
Relational databases (RDBMS) — store data in tables with a fixed schema, support SQL. Used for structured data and transactions.
- Examples: MySQL, PostgreSQL, Oracle.
-
Document-oriented databases — store data as documents (usually JSON or BSON), flexible schema.
- Examples: MongoDB, CouchDB.
-
Key-Value stores — simple key-value pairs, fast access.
- Examples: Redis, DynamoDB.
-
Graph databases — store data as graphs (nodes and relationships), suitable for complex interconnections.
- Examples: Neo4j, JanusGraph.
-
Column-oriented databases — optimized for analytics, store data by columns.
- Examples: Apache Cassandra, HBase.
-
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.