Network
Language · FA
Dark mode

REFERENCE

Database Types

Relational to vector — 15 database categories, query languages, scaling strategies.

Database Type Reference

TypeModelNotable ExamplesQuery LanguageBest ForScaling Approach
Relational (SQL)Tables + rows + FKPostgreSQL, MySQL, SQLite, MSSQL, OracleSQLACID transactions, structured data, reportsVertical + read replicas
DocumentJSON / BSON treesMongoDB, CouchDB, Firestore, RavenDBMQL, JSON filterFlexible schema, semi-structured, CMS, catalogsHorizontal sharding
Key-ValueK → V pairsRedis, DynamoDB, Memcached, RiakGET / SET / DELCache, sessions, counters, leaderboardsHorizontal (consistent hashing)
Wide-ColumnColumn familiesCassandra, HBase, BigTable, ScyllaDBCQL, HQLTime-series, IoT, logs, write-heavy workloadsHorizontal (ring topology)
GraphNodes + edges + propertiesNeo4j, ArangoDB, Amazon Neptune, TigerGraphCypher, Gremlin, SPARQLSocial networks, knowledge graphs, fraud detectionModerate (graph partitioning is hard)
Time-SeriesTimestamped rows + retentionInfluxDB, TimescaleDB, Prometheus, QuestDBInfluxQL, SQL, PromQLMetrics, sensor data, monitoring, finance ticksHorizontal (time-based partitioning)
VectorHigh-dim embedding vectorsPinecone, Weaviate, Qdrant, pgvector, ChromaANN similarity searchSemantic search, RAG, recommendation, AI/MLHorizontal (HNSW / IVF indexing)
Search / Full-TextInverted indexElasticsearch, OpenSearch, Meilisearch, TypesenseLucene DSL, JSON queryFull-text search, log analytics, autocompleteHorizontal (shards + replicas)
In-MemoryRAM-first (optional persist)Redis, Memcached, VoltDB, Apache IgniteVariesUltra-low latency cache, pub/sub, rate limitingLimited by RAM
ObjectObject graph (OO persistence)db4o, ObjectDB, Realm (mobile)OQL, proprietaryCAD models, complex object graphs, mobileSingle-node / embedded
Embedded / FileFile-based, localSQLite, LevelDB, RocksDB, LMDBSQL, key-value APIMobile apps, IoT, local desktop, browserSingle-node
Ledger / BlockchainAppend-only, cryptographicAmazon QLDB, Hyperledger Fabric, BigchainDBSQL-like, chaincodeAudit trails, compliance, supply chain, DeFiDistributed consensus
Spatial / GISGeospatial indexingPostGIS, MongoDB, CockroachDBST_ functions, GeoJSONMaps, routing, geofencing, location servicesPostGIS extends PostgreSQL
Columnar / OLAPColumn-oriented storageClickHouse, DuckDB, BigQuery, RedshiftSQLAnalytics, warehousing, OLAP queriesMassive horizontal (MPP)
Multi-ModelCombines modelsArangoDB, Cosmos DB, FaunaDBAQL, SQL-like, GraphQLApps needing doc + graph + key-value in one DBHorizontal

CAP Theorem

Every distributed database trades off between: Consistency (all nodes see same data), Availability (every request gets a response), Partition tolerance (survives network splits). You can only guarantee two of the three.

ACID vs BASE

PropertyACID (SQL)BASE (NoSQL)
FocusStrong consistencyHigh availability
ConsistencyImmediateEventual
TransactionsFull ACIDOften limited
ExamplesPostgreSQL, MySQLMongoDB, Cassandra