Elasticsearch is built to search and analyze data across many machines, while a relational database stores records and changes them safely in transactions. Elasticsearch keeps denormalized JSON documents spread over nodes. A relational database keeps normalized rows in tables and joins them at query time.
Elasticsearch
Relational database
Data model
Document-oriented JSON
Tables with rows and columns
Schema
Flexible
Fixed
Scaling
Horizontal, by adding nodes
Mostly vertical
Guarantees
Near real-time search
ACID transactions
Relationships
Denormalized data
Normalized data with JOINs
Interface
RESTful API
SQL queries
Workload
Optimized for read-heavy search
Balanced reads and writes
Elasticsearch is the better fit for search, analytics and unstructured data. A relational database is the better fit for transactional work that needs ACID properties, such as orders and payments. Many systems use both. The database stays the source of truth, and Elasticsearch holds a copy of the data for search.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.