Database Types
There are many database types available. They have different characteristics for different use cases. Each of them has benefits and disadvantages
▪ Key Value Databases
▪ Relational Databases
▪ Graph Databases
▪ Wide Column Databases
▪ Document Databases
▪ Search Databases
Key Value Databases
Characteristics
▪ Data is saved in key-value pairs
▪ unique key
▪ no joins
▪ in-memory
Best for
▪ Caching
▪ Message Queue
very fast
limited storage
no primary database
Wide Column Databases
if you need to store more complex key value date you can use column DB you have the same key, but value is divided multiple column
Characteristics
▪ A two-dimensional key-value store
▪ Data is saved in tables, rows, and columns
▪ Names and format can vary from row to row (schema-less)
▪ Queries similar to SQL
Best for:
▪ Time-Series
▪ IoT-Records
historical -records
scalable
no joins
limited compared to relational DB
no primary DB
Document Databases
Characteristics
▪ Data is stored as JSON-like documents
▪ Schema-less
▪ No joins
▪ Denormalized
Best for:
▪ Mobile Apps
▪ Game Apps
▪ CMS
▪ Most Apps
faster to read
easy to get started
primary database
slower writes
Relational Databases
Characteristics
▪ Data is stored in tables, rows, and columns
▪ Schema (schema and data types need to be created first)
▪ Normalized to avoid duplicated data
▪ Most used in industry
to store structured data
Best for:
▪ Structured data
ACID
easy to get started
primary database
❌ difficult to scale
❌ unstructured data
ACID = Atomicity, Consistency, Isolation, Durability
▪ No half-changes are updated in database
▪ Either ALL changes get applied or NON
BEST FOR:
GRAPHS
PATTERNS
Last updated