SlideShare a Scribd company logo
1 of 32
How to choose the
right Database
HELLO!
I am Jatin Chuglani
Product Manager, Zeta
Ex-infoworks, Amazon
LinkedIn
Blog
2
Who is this PPT for?
▪ Anyone trying to make a decision about the storage
architecture for their application
▪ Students, Engineers, Architects
3
What is a Database?
What is a Database?
A database is an organized collection of data stored and accessed
electronically
5
Importance of the right database
6
▪ Databases are a core part of any application
architecture
▪ Database architecture will determine
▫ How many users can be served by the application
▫ Time it takes to respond to a request
▫ How much downtime would there for the system
▪ Migrating Databases is an expensive/time-consuming
operation
Prep work before the
Decision
Questions to ask yourself
▪ Who are my users?
▪ What are my users’ short term and long term goals and
requirements?
▪ Which languages and tools should I be using to meet those
requirements?
▪ How would I grow my team as per my users and their
requirements?
8
Decision Framework
9
Maintenance
● Maturity
● Maintainability
● Community
Support
Functional Reqs
● Query
Patterns
● Evolution
● Language
Support
Scale
● Scalability
● Latency
● Reliability
● Consistency
Types of Databases
In Focus Today
Relational DBs
▪ MySQL
▪ SQL Server
▪ Oracle
NoSQL DBs
▪ Cassandra
▪ MongoDB
▪ Neo4j
Evented Datastores
▪ Kafka
▪ Azure EventHubs
11
In Focus Today
▪ Storage structure
▫ How is the data logically stored
▪ Querying support
▫ Ways the data be accessed
▪ Scalability
▫ How to account for future growth
▪ Use cases
▫ Where to use these databases
12
Relational Databases
Relational DBs
▪ MySQL
▪ SQL Server
▪ Oracle
Relational Databases Overview
▪ “SQL” (Structured Query Language)
Databases
▪ Tables can have (Foreign Key)
relationships with each other
▪ Allow creation of tables with Fixed
Structure
▪ Powerful Query interface with SQL
▪ Can be vertically scaled easily,
horizontal scaling requires more
effort 14
Storage Structure
▪ Foreign Key - Primary Key
Relationship
▪ Columns are assigned a
datatype
▪ Columns can have
constraints
15
Querying Capabilities
▪ SQL
▫ Joins!
▫ Subqueries
▫ Filter, etc.
▪ Object Relational Mapper (ORM)
▪ Mature Language Support
16
Scalability
▪ Vertical Scaling (Bigger
Machines)
▪ Horizontal Scaling
▫ Replicas (same data in
multiple machines)
▫ Sharding (distributing
data)
▫ Joins could suffer
17
Use Cases
▪ Relational Query Requirements
▪ Flexibility in Query Patterns
▫ Data Analytics
▪ Column Constraints Requirements
▫ Transaction Processing
▪ Small to Large Scale*
▫ Boutique Ecommerce Website
18
*With Sharding and Replicas
NoSQL Databases
NoSQL DBs
▪ Cassandra
▪ MongoDB
▪ Neo4j
NoSQL Databases Overview
▪ “NoSQL” is a loaded term, which refers to any database
without SQL
▪ Started getting popular in late 2000s
▪ Schema is not pre-defined, “Schemaless” or “Schema-on-
Read”
▪ Instead of breaking data into multiple units (or tables), the
data is typically stored together as one.
20
Storage Structure*
Wide Column DBs
▪ Tables, Rows,
columns
▪ “Column
Families” are
stored together
▪ No Relationships
▪ No/limited joins
▪ e.g. Cassandra
Document DBs
▪ JSON like storage
structure
▪ Data stored in
one nested
structure called
“Documents”
▪ E.g. MongoDB
21
*There are other NoSQL stores like key-value (Redis), GraphDB(Neo4j) and search
engines (Elastic), we will skip those in today’s conversation
Scalability
▪ Vertical Scaling (Bigger
Machines)
▪ Highly Horizontal Scalable
▫ Tables/documents are self
contained
▫ Load Balancer/router layer
22
Querying Capabilities
▪ Custom Query Languages
▫ Range from SQL-like
(CQL/Cassandra) to very
different
(JavaScript/MongoDB)
▪ REST API Support
▪ Querying primarily dependent
on IDs
▪ Programming Language Support
mileage may vary 23
Use Cases
▪ Fixed Access Pattern, cases where everything always comes
together
▪ High Scale and Low latency requirements
▫ Gaming servers
▪ Evolving Data
▫ Product Catalogs
24
Evented Datastores
Evented DBs
▪ Kafka
▪ Azure
EventHubs
Evented Datastores Overview
▪ Also, called “Messaging
Queues”
▪ Storage of “Events”
▪ Event = self-
contained,immutable object
with timestamp
▪ “Producers” and
“Consumers” of events
▪ Used in conjunction with
SQL/NoSQL stores
26
Difference from Conventional Databases
▪ Focus on transient data, data usually deleted after sometime
▪ Query tools mostly focused on offsets (message number)
▪ No support for secondary indexes / other search capabilities
27
Storage Structure
▪ Data could be in multiple
formats
▫ JSON
▫ Text
▫ Binary
▪ Schema constraints can
sometimes be added
28
Querying Capabilities
▪ Consumers can read/write data
using offsets, i.e., message
number
▪ Some high level functions
▫ Data manipulations
▫ Aggregation over small
periods of time
29
Scalability
▪ Vertical Scaling (Bigger Machines)
▪ Horizontally Scalable
▫ Partitioning
30
Use Cases
▪ Asynchronous Systems
▫ Order Processing
▪ Stream Processing
▫ Fraud Detection
▪ Keep systems in sync
▫ Change Data Capture
31
32
THANKS!
Any questions?

More Related Content

Similar to How to choose the right database for your needs

Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Don Demcsak
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesKyle Banerjee
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistTony Rogerson
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7abdulrahmanhelan
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]Huy Do
 
Transform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big DataTransform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big DataAshnikbiz
 
Data Lake Acceleration vs. Data Virtualization - What’s the difference?
Data Lake Acceleration vs. Data Virtualization - What’s the difference?Data Lake Acceleration vs. Data Virtualization - What’s the difference?
Data Lake Acceleration vs. Data Virtualization - What’s the difference?Denodo
 
Evolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraEvolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraVishal Puri
 
Understanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of EfficiencyUnderstanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of EfficiencyKnoldus Inc.
 
No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresqlZaid Shabbir
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxRahul Borate
 
introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Databasenehabsairam
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDBMongoDB
 
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)Binary Studio
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageBethmi Gunasekara
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBAhmed Farag
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Lucas Jellema
 

Similar to How to choose the right database for your needs (20)

Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)Big Data (NJ SQL Server User Group)
Big Data (NJ SQL Server User Group)
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Evolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/SpecialistEvolution of the DBA to Data Platform Administrator/Specialist
Evolution of the DBA to Data Platform Administrator/Specialist
 
Relational and non relational database 7
Relational and non relational database 7Relational and non relational database 7
Relational and non relational database 7
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
Transform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big DataTransform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big Data
 
Data Lake Acceleration vs. Data Virtualization - What’s the difference?
Data Lake Acceleration vs. Data Virtualization - What’s the difference?Data Lake Acceleration vs. Data Virtualization - What’s the difference?
Data Lake Acceleration vs. Data Virtualization - What’s the difference?
 
Evolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital eraEvolution of Distributed Database Technologies in the Digital era
Evolution of Distributed Database Technologies in the Digital era
 
Understanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of EfficiencyUnderstanding System Design and Architecture Blueprints of Efficiency
Understanding System Design and Architecture Blueprints of Efficiency
 
UNIT-2.pptx
UNIT-2.pptxUNIT-2.pptx
UNIT-2.pptx
 
No sql bigdata and postgresql
No sql bigdata and postgresqlNo sql bigdata and postgresql
No sql bigdata and postgresql
 
UNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptxUNIT I Introduction to NoSQL.pptx
UNIT I Introduction to NoSQL.pptx
 
introduction to NOSQL Database
introduction to NOSQL Databaseintroduction to NOSQL Database
introduction to NOSQL Database
 
When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)
NoSQL vs SQL (by Dmitriy Beseda, JS developer and coach Binary Studio Academy)
 
NoSql Brownbag
NoSql BrownbagNoSql Brownbag
NoSql Brownbag
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
Introduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDBIntroduction to NoSQL and MongoDB
Introduction to NoSQL and MongoDB
 
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
Introducing NoSQL and MongoDB to complement Relational Databases (AMIS SIG 14...
 

Recently uploaded

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

How to choose the right database for your needs

  • 1. How to choose the right Database
  • 2. HELLO! I am Jatin Chuglani Product Manager, Zeta Ex-infoworks, Amazon LinkedIn Blog 2
  • 3. Who is this PPT for? ▪ Anyone trying to make a decision about the storage architecture for their application ▪ Students, Engineers, Architects 3
  • 4. What is a Database?
  • 5. What is a Database? A database is an organized collection of data stored and accessed electronically 5
  • 6. Importance of the right database 6 ▪ Databases are a core part of any application architecture ▪ Database architecture will determine ▫ How many users can be served by the application ▫ Time it takes to respond to a request ▫ How much downtime would there for the system ▪ Migrating Databases is an expensive/time-consuming operation
  • 7. Prep work before the Decision
  • 8. Questions to ask yourself ▪ Who are my users? ▪ What are my users’ short term and long term goals and requirements? ▪ Which languages and tools should I be using to meet those requirements? ▪ How would I grow my team as per my users and their requirements? 8
  • 9. Decision Framework 9 Maintenance ● Maturity ● Maintainability ● Community Support Functional Reqs ● Query Patterns ● Evolution ● Language Support Scale ● Scalability ● Latency ● Reliability ● Consistency
  • 11. In Focus Today Relational DBs ▪ MySQL ▪ SQL Server ▪ Oracle NoSQL DBs ▪ Cassandra ▪ MongoDB ▪ Neo4j Evented Datastores ▪ Kafka ▪ Azure EventHubs 11
  • 12. In Focus Today ▪ Storage structure ▫ How is the data logically stored ▪ Querying support ▫ Ways the data be accessed ▪ Scalability ▫ How to account for future growth ▪ Use cases ▫ Where to use these databases 12
  • 13. Relational Databases Relational DBs ▪ MySQL ▪ SQL Server ▪ Oracle
  • 14. Relational Databases Overview ▪ “SQL” (Structured Query Language) Databases ▪ Tables can have (Foreign Key) relationships with each other ▪ Allow creation of tables with Fixed Structure ▪ Powerful Query interface with SQL ▪ Can be vertically scaled easily, horizontal scaling requires more effort 14
  • 15. Storage Structure ▪ Foreign Key - Primary Key Relationship ▪ Columns are assigned a datatype ▪ Columns can have constraints 15
  • 16. Querying Capabilities ▪ SQL ▫ Joins! ▫ Subqueries ▫ Filter, etc. ▪ Object Relational Mapper (ORM) ▪ Mature Language Support 16
  • 17. Scalability ▪ Vertical Scaling (Bigger Machines) ▪ Horizontal Scaling ▫ Replicas (same data in multiple machines) ▫ Sharding (distributing data) ▫ Joins could suffer 17
  • 18. Use Cases ▪ Relational Query Requirements ▪ Flexibility in Query Patterns ▫ Data Analytics ▪ Column Constraints Requirements ▫ Transaction Processing ▪ Small to Large Scale* ▫ Boutique Ecommerce Website 18 *With Sharding and Replicas
  • 19. NoSQL Databases NoSQL DBs ▪ Cassandra ▪ MongoDB ▪ Neo4j
  • 20. NoSQL Databases Overview ▪ “NoSQL” is a loaded term, which refers to any database without SQL ▪ Started getting popular in late 2000s ▪ Schema is not pre-defined, “Schemaless” or “Schema-on- Read” ▪ Instead of breaking data into multiple units (or tables), the data is typically stored together as one. 20
  • 21. Storage Structure* Wide Column DBs ▪ Tables, Rows, columns ▪ “Column Families” are stored together ▪ No Relationships ▪ No/limited joins ▪ e.g. Cassandra Document DBs ▪ JSON like storage structure ▪ Data stored in one nested structure called “Documents” ▪ E.g. MongoDB 21 *There are other NoSQL stores like key-value (Redis), GraphDB(Neo4j) and search engines (Elastic), we will skip those in today’s conversation
  • 22. Scalability ▪ Vertical Scaling (Bigger Machines) ▪ Highly Horizontal Scalable ▫ Tables/documents are self contained ▫ Load Balancer/router layer 22
  • 23. Querying Capabilities ▪ Custom Query Languages ▫ Range from SQL-like (CQL/Cassandra) to very different (JavaScript/MongoDB) ▪ REST API Support ▪ Querying primarily dependent on IDs ▪ Programming Language Support mileage may vary 23
  • 24. Use Cases ▪ Fixed Access Pattern, cases where everything always comes together ▪ High Scale and Low latency requirements ▫ Gaming servers ▪ Evolving Data ▫ Product Catalogs 24
  • 25. Evented Datastores Evented DBs ▪ Kafka ▪ Azure EventHubs
  • 26. Evented Datastores Overview ▪ Also, called “Messaging Queues” ▪ Storage of “Events” ▪ Event = self- contained,immutable object with timestamp ▪ “Producers” and “Consumers” of events ▪ Used in conjunction with SQL/NoSQL stores 26
  • 27. Difference from Conventional Databases ▪ Focus on transient data, data usually deleted after sometime ▪ Query tools mostly focused on offsets (message number) ▪ No support for secondary indexes / other search capabilities 27
  • 28. Storage Structure ▪ Data could be in multiple formats ▫ JSON ▫ Text ▫ Binary ▪ Schema constraints can sometimes be added 28
  • 29. Querying Capabilities ▪ Consumers can read/write data using offsets, i.e., message number ▪ Some high level functions ▫ Data manipulations ▫ Aggregation over small periods of time 29
  • 30. Scalability ▪ Vertical Scaling (Bigger Machines) ▪ Horizontally Scalable ▫ Partitioning 30
  • 31. Use Cases ▪ Asynchronous Systems ▫ Order Processing ▪ Stream Processing ▫ Fraud Detection ▪ Keep systems in sync ▫ Change Data Capture 31

Editor's Notes

  1. Please add at least 1 line of description here
  2. (kSQL/Kafka)