Junior — Middle
Can you name the main types of databases and their features?
sobes.tech AI
Answer from AI
Main types of databases and their features:
-
Relational Databases (SQL)
- Store data in tables with a clearly defined schema.
- Use SQL language for queries.
- Provide transactions and data integrity.
- Examples: MySQL, PostgreSQL, Oracle.
-
Document-oriented Databases (NoSQL)
- Store data as documents (usually JSON-like).
- Flexible schema, easily scalable.
- Suitable for storing unstructured data.
- Examples: MongoDB, CouchDB.
-
Key-Value Stores
- Very simple model: a key associated with a single value.
- High performance and scalability.
- Used for caching and sessions.
- Examples: Redis, Riak.
-
Graph Databases
- Store data as nodes and edges.
- Suitable for complex relationships, e.g., social networks.
- Examples: Neo4j, JanusGraph.
-
Columnar Databases
- Store data by columns, not rows.
- Efficient for analytical queries.
- Examples: Apache Cassandra, HBase.
The choice of database depends on requirements for data structure, volume, speed, and query type.