SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How to choose the right database
for your workload
Boaz Ziniman
Principal Developer Advocate, Amazon Web Service
@ziniman
boaz.ziniman.aws
bziniman
boaz.work
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why did you choose this database?
“Because we heard X is the best new thing.”
“Because we have a site license for X.”
“Because X is what we know how to use.”
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Why should you choose this database?
“Because this database is purpose built to support
what my application is designed to do.”
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Modern apps have modern requirements
Users: 1 million+
Data volume: TB–PB–EB
Locality: Global
Performance: Milliseconds–microseconds
Request rate: Millions per second
Access: Web, Mobile, IoT, Devices
Scale: Up-down, Out-in
Economics: Pay for what you use
Developer access: No assembly requiredSocial mediaRide hailing Media streaming Dating
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Referential
integrity,
ACID
transactions,
schema-
on-write
Low-latency,
key lookups
with high
throughput and
fast ingestion
of data
Indexing
and storing
documents
with support
for query on
any
attribute
Microseconds
latency, key-
based queries,
and
specialized
data
structures
Creating and
navigating
data relations
easily and
quickly
Lift and shift,
EMR, CRM,
finance
Real-time
bidding,
shopping cart,
social
Content
management,
personalization,
mobile
Leaderboards,
real-time
analytics,
caching
Fraud detection,
social
networking,
recommendation
engine
Indexing and
searching
semistructure
d logs and
data
Product
catalog, help
and FAQs,
full text
Collect, store,
and process
data
sequenced by
time
IoT
applications,
event tracking
Complete,
immutable,
and verifiable
history of all
changes
Systems
of record,
supply chain,
health care,
registrations,
financial
Common data categories and use cases
Relational Key-value Document In-memory Graph Search Time-series Ledger
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS: Purpose-built databases
Amazon
DynamoDB
Amazon
Neptune
Aurora CommercialCommunity
Amazon
ElastiCache
Amazon
Elasticsearch
Service
Amazon
DocumentDB
Amazon
Timestream
Amazon
Quantum
Ledger
Database
Relational Key-value Document In-memory Graph Search Time-series Ledger
Amazon
RDS
PostgreSQL PostgreSQL
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
CHALLENGE
Wanted to enable anyone to learn a
language for free.
SOLUTION
Purpose-built databases from AWS:
• DynamoDB: 31B items tracking
which language exercises completed
• Aurora: primary transactional
database for user data
• ElastiCache: instant access to
common words and phrases
RESULTS
More people learning a language on
Duolingo than entire US school system
300M total users
7B exercises per month
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational Key-value Document Graph
Let’s take a closer look at…
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational Key-value Document Graph
Relational
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Patient
* Patient ID
First Name
Last Name
Gender
DOB
* Doctor ID
Visit
* Visit ID
* Patient ID
* Hospital ID
Date
* Treatment ID
Medical Treatment
* Treatment ID
Procedure
How Performed
Adverse Outcome
Contraindication
Doctor
* Doctor ID
First Name
Last Name
Medical Specialty
* Hospital Affiliation
Hospital
* Hospital ID
Name
Address
Rating
Relational
Referential integrity,
ACID transactions,
schema-on-write
Lift and shift, ERP,
CRM, finance
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational
// Doctors affiliated with Mercy hospital
SELECT
d.first_name, d.last_name
FROM
doctor as d,
hospital as h
WHERE
d.hospital = h.hospital_id
AND h.name = ‘Mercy';
// Number of patient visits each doctor completed last
week
Patient
* Patient ID
First Name
Last Name
Gender
DOB
* Doctor ID
Visit
* Visit ID
* Patient ID
* Hospital ID
Date
* Treatment ID
Medical Treatment
* Treatment ID
Procedure
How Performed
Adverse Outcome
Contraindication
Doctor
* Doctor ID
First Name
Last Name
Medical Specialty
* Hospital Affiliation
Hospital
* Hospital ID
Name
Address
Rating
SELECT
d.first_name, d.last_name, count(*)
FROM
visit as v,
hospital as h,
doctor as d
WHERE
v.hospital_id = h.hospital_id
AND h.hospital_id = d.hospital
AND v.t_date > date_trunc('week’,
CURRENT_TIMESTAMP - interval '1 week')
GROUP BY
d.first_name, d.last_name;
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
You
You
Fully managed services on AWS
Spend time innovating and building new applications, not managing infrastructure
AWS
Self-managed Fully managed
Schema design
Query construction
Query optimization
Automatic failover
Backup and recovery
Isolation and security
Industry compliance
Push-button scaling
Automated patching
Advanced monitoring
Routine maintenance
Built-in best practices
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Move to managed relational databases
Reduce database administrative burden
No need to re-architect existing applications
Get better performance, availability, scalability, and security
Migrate on-premises or cloud-hosted relational databases to managed services
Amazon Aurora
MySQL, PostgreSQL
Amazon RDS
MySQL, PostgreSQL, MariaDB,
Oracle, SQL Server
PostgreSQL
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Aurora
MySQL- and PostgreSQL-compatible relational database built for the cloud
Performance and availability of commercial-grade databases at 1/10th the cost
Performance
and scalability
Availability
and durability
Highly secure Fully managed
5x the throughput of standard
MySQL and 3x that of standard
PostgreSQL; scale out up to
15 read replicas
Fault-tolerant, self-healing
storage; six copies of data
across three Availability Zones;
continuous backup to Amazon S3
Network isolation,
encryption at
rest/transit, compliance
and assurance programs
Managed by Amazon RDS:
No server provisioning,
software patching, setup,
configuration, or backups
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational Key-value Document Graph
Key-value & Document
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon DynamoDB
Fast and flexible key value database service for any scale
Comprehensive
security
Encrypts all data by default
and fully integrates with
AWS Identity and Access
Management for robust
security
Performance at scale
Consistent, single-digit
millisecond response times at
any scale; build applications
with virtually unlimited
throughput
Global database for
global users and apps
Build global applications with
fast access to local data by easily
replicating tables across multiple
AWS Regions
Serverless
No server provisioning,
software patching, or
upgrades; scales up or down
automatically; continuously
backs up your data
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon DynamoDB Data Structure
Table
Items
Attributes
Partition
Key
Sort
Key
Mandatory
Key-value access pattern
Determines data distribution
Optional
Model 1:N relationships
Enables rich query capabilities
All items for key
==, <, >, >=, <=
“begins with”
“between”
“contains”
“in”
sorted results
counts
top/bottom N values
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gamers
Primary Key
Attributes
Gamer Tag Type
Hammer57
Rank
Level Points Tier
87 4050 Elite
Status
Health Progress
90 30
Weapon
Class Damage Range
Taser 87% 50
FluffyDuffy
Rank
Level Points Tier
5 1072 Trainee
Status
Health Progress
37 8
Key-value
// Status of Hammer57
GET {
TableName:"Gamers",
Key: {
"GamerTag":"Hammer57",
"Type":"Status” } }
// Return all Hammer57
QUERY {
TableName:“Gamers”,
KeyConditionExpression:”GamerTag = :a”,
ExpressionAttributeValues: {
“:a”:”Hammer57” } }
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Document
(client) (app) (database)
JSON !JSON
!=
Indexing and storing
documents with
support
for query on
any attribute
Content management,
personalization, mobile
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Document
User profiles
{
id: 181276,
username: "sue1942",
name: {first: "Susan",
last: "Benoit"}
}
{
id: 181276,
username: "sue1942",
name: {first: "Susan",
last: "Benoit"},
ExplodingAcorns: {
hi_score: 3185400,
global_rank: 5139,
bonus_levels: true
},
promotions: ["new user","5%",”acorn"]
}
Indexing and storing
documents with
support
for query on
any attribute
Content management,
personalization, mobile
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon DocumentDB (with MongoDB compatibility)
Fast Scalable Fully
managed
MongoDB
compatible
Millions of requests per
second with millisecond
latency; twice the throughput
of MongoDB
Separation of compute and
storage enables both
layers to scale
independently; scale out to
15 read replicas in minutes
Managed by AWS:
no hardware provisioning;
auto patching, quick setup,
secure, and automatic
backups
Compatible with MongoDB
3.6; use the same SDKs, tools,
and applications with Amazon
DocumentDB
Fast, scalable, and fully managed MongoDB-compatible database service
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relational Key-value Document Graph
Graph
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Relationships enable new applications
Retail fraud detectionRestaurant recommendationsSocial networks
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Graph
// Product recommendation to a user
gremlin> V().has(‘name’,’sara’).as(‘customer’).out(‘follows’).in(‘follows’).out(‘purchased’)
( (‘customer’)).dedup() (‘name’) ('name')
KNO
W
S
PURCHASED PURCHASED
FOLLOWS
PURCHASED
PRODUCT
SPORT
FOLLOWS
FOLLOWS
// Identify a friend in common and
make a recommendation
gremlin> g.V().has('name','mary').as(‘start’).
both('knows').both('knows’).
where(neq(‘start’)).
dedup().by('name').properties('name')
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Different approaches for highly connected data
Purpose-built for a business process
Purpose-built to answer questions about
relationships
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Neptune
Easy
Build powerful queries
easily with Gremlin and
SPARQL
Fast
Query billions of relationships
with millisecond latency
Open
Supports Apache TinkerPop &
W3C RDF graph models
Reliable
Six replicas of your data
across three AZs with full
backup and restore
Fully managed graph database
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://github.com/aws-samples/aws-bookstore-demo-app
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Bookstore Demo
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Bookstore Demo
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Timestream (sign up for the preview)
Fast, scalable, fully managed time-series database
1,000x faster and 1/10th
the
cost of relational databases
Collect data at the rate of
millions of inserts per
second (10M/second)
Trillions of
daily events
Adaptive query processing
engine maintains steady,
predictable performance
Time-series
analytics
Built-in functions for
interpolation, smoothing,
and approximation
Serverless
Automated setup,
configuration, server
provisioning, software
patching
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Quantum Ledger Database (QLDB)
Fully managed ledger database
Track and verify history of all changes made to your application’s data
Immutable
Maintains a sequenced record
of all changes to your data,
which cannot be deleted or
modified; you have the ability
to query and analyze the full
history
Cryptographically
verifiable
Uses cryptography to
generate a secure
output file of your
data’s history
Easy to use
Easy to use, letting you
use familiar database
capabilities like SQL APIs
for querying the data
Highly scalable
Executes 2–3X as many
transactions than ledgers
in common blockchain
frameworks
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Learn databases with AWS Training and Certification
25+ free digital training courses cover topics and services related
to relational and nonrelational databases
Resources created by the experts at AWS to help you build and validate database skills
Validate expertise with the AWS Certified Database – Specialty exam
The classroom offering, Planning and Designing Databases on
AWS, features AWS expert instructors and hands-on activities
Visit the databases learning path at aws.amazon.com/training/path-databases
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What have we learned?
Choose the right tool for
the job
Start from the application
and work backwards
Modern applications
considerations
Demo Application On
GitHub: /aws-samples/aws-
bookstore-demo-app
Keep on Building !
AWS: Purpose-built databases
Relational Key-value Document In-memory Graph Search
Amazon
DynamoDB
Amazon
Neptune
Amazon RDS
Aurora CommercialCommunity
Amazon
ElastiCache
Amazon
Elasticsearch
Service
Amazon
DocumentDB
Time-series Ledger
Amazon
Timestream
Amazon
Quantum
Ledger
DatabaseMemcachedRedis
Social mediaRide hailing Media streaming Dating
Thank you!
© 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Boaz Ziniman
Principal Developer Advocate, Amazon Web Service
@ziniman
boaz.ziniman.aws
bziniman
boaz.work

Más contenido relacionado

Más de Boaz Ziniman

Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBreaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBoaz Ziniman
 
Serverless Beyond Functions - CTO Club Made in JLM
Serverless Beyond Functions - CTO Club Made in JLMServerless Beyond Functions - CTO Club Made in JLM
Serverless Beyond Functions - CTO Club Made in JLMBoaz Ziniman
 
Websites Go Serverless - ServerlessDays TLV 2019
Websites Go Serverless - ServerlessDays TLV 2019Websites Go Serverless - ServerlessDays TLV 2019
Websites Go Serverless - ServerlessDays TLV 2019Boaz Ziniman
 
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...Boaz Ziniman
 
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019Boaz Ziniman
 
Breaking Language Barriers with AI - AWS Summit
Breaking Language Barriers with AI - AWS SummitBreaking Language Barriers with AI - AWS Summit
Breaking Language Barriers with AI - AWS SummitBoaz Ziniman
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinBoaz Ziniman
 
AWS Lambda updates from re:Invent
AWS Lambda updates from re:InventAWS Lambda updates from re:Invent
AWS Lambda updates from re:InventBoaz Ziniman
 
Artificial Intelligence for Developers - OOP Munich
Artificial Intelligence for Developers - OOP MunichArtificial Intelligence for Developers - OOP Munich
Artificial Intelligence for Developers - OOP MunichBoaz Ziniman
 
Introduction to Serverless Computing - OOP Munich
 Introduction to Serverless Computing - OOP Munich Introduction to Serverless Computing - OOP Munich
Introduction to Serverless Computing - OOP MunichBoaz Ziniman
 
IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018Boaz Ziniman
 
Breaking Language Barriers with AI - Web Summit 2018
Breaking Language Barriers with AI - Web Summit 2018Breaking Language Barriers with AI - Web Summit 2018
Breaking Language Barriers with AI - Web Summit 2018Boaz Ziniman
 
How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018Boaz Ziniman
 
Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Boaz Ziniman
 
AI Services for Developers - Floor28
AI Services for Developers - Floor28AI Services for Developers - Floor28
AI Services for Developers - Floor28Boaz Ziniman
 
Building Alexa Skills - Floor28
Building Alexa Skills - Floor28Building Alexa Skills - Floor28
Building Alexa Skills - Floor28Boaz Ziniman
 
Websites go Serverless - Floor28
Websites go Serverless - Floor28Websites go Serverless - Floor28
Websites go Serverless - Floor28Boaz Ziniman
 
Building Serverless IoT solutions - EPAM SEC 2018 Minsk
Building Serverless IoT solutions - EPAM SEC 2018 MinskBuilding Serverless IoT solutions - EPAM SEC 2018 Minsk
Building Serverless IoT solutions - EPAM SEC 2018 MinskBoaz Ziniman
 
The Future of AI on AWS
The Future of AI on AWSThe Future of AI on AWS
The Future of AI on AWSBoaz Ziniman
 
Websites go Serverless - ILDevCon
Websites go Serverless - ILDevConWebsites go Serverless - ILDevCon
Websites go Serverless - ILDevConBoaz Ziniman
 

Más de Boaz Ziniman (20)

Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel AvivBreaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
Breaking Voice and Language Barriers with AI - Chatbot Summit Tel Aviv
 
Serverless Beyond Functions - CTO Club Made in JLM
Serverless Beyond Functions - CTO Club Made in JLMServerless Beyond Functions - CTO Club Made in JLM
Serverless Beyond Functions - CTO Club Made in JLM
 
Websites Go Serverless - ServerlessDays TLV 2019
Websites Go Serverless - ServerlessDays TLV 2019Websites Go Serverless - ServerlessDays TLV 2019
Websites Go Serverless - ServerlessDays TLV 2019
 
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...
SKL208 - Turbocharge your Business with AI and Machine Learning - Tel Aviv Su...
 
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019
AIM301 - Breaking Language Barriers With AI - Tel Aviv Summit 2019
 
Breaking Language Barriers with AI - AWS Summit
Breaking Language Barriers with AI - AWS SummitBreaking Language Barriers with AI - AWS Summit
Breaking Language Barriers with AI - AWS Summit
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit Berlin
 
AWS Lambda updates from re:Invent
AWS Lambda updates from re:InventAWS Lambda updates from re:Invent
AWS Lambda updates from re:Invent
 
Artificial Intelligence for Developers - OOP Munich
Artificial Intelligence for Developers - OOP MunichArtificial Intelligence for Developers - OOP Munich
Artificial Intelligence for Developers - OOP Munich
 
Introduction to Serverless Computing - OOP Munich
 Introduction to Serverless Computing - OOP Munich Introduction to Serverless Computing - OOP Munich
Introduction to Serverless Computing - OOP Munich
 
IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018IoT from Cloud to Edge & Back Again - WebSummit 2018
IoT from Cloud to Edge & Back Again - WebSummit 2018
 
Breaking Language Barriers with AI - Web Summit 2018
Breaking Language Barriers with AI - Web Summit 2018Breaking Language Barriers with AI - Web Summit 2018
Breaking Language Barriers with AI - Web Summit 2018
 
How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018How Websites go Serverless - WebSummit Lisbon 2018
How Websites go Serverless - WebSummit Lisbon 2018
 
Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28Introduction to Serverless computing and AWS Lambda - Floor28
Introduction to Serverless computing and AWS Lambda - Floor28
 
AI Services for Developers - Floor28
AI Services for Developers - Floor28AI Services for Developers - Floor28
AI Services for Developers - Floor28
 
Building Alexa Skills - Floor28
Building Alexa Skills - Floor28Building Alexa Skills - Floor28
Building Alexa Skills - Floor28
 
Websites go Serverless - Floor28
Websites go Serverless - Floor28Websites go Serverless - Floor28
Websites go Serverless - Floor28
 
Building Serverless IoT solutions - EPAM SEC 2018 Minsk
Building Serverless IoT solutions - EPAM SEC 2018 MinskBuilding Serverless IoT solutions - EPAM SEC 2018 Minsk
Building Serverless IoT solutions - EPAM SEC 2018 Minsk
 
The Future of AI on AWS
The Future of AI on AWSThe Future of AI on AWS
The Future of AI on AWS
 
Websites go Serverless - ILDevCon
Websites go Serverless - ILDevConWebsites go Serverless - ILDevCon
Websites go Serverless - ILDevCon
 

Último

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Último (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

How to choose the right Database for your workload - AWS DevDay Online

  • 1. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. How to choose the right database for your workload Boaz Ziniman Principal Developer Advocate, Amazon Web Service @ziniman boaz.ziniman.aws bziniman boaz.work
  • 2. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why did you choose this database? “Because we heard X is the best new thing.” “Because we have a site license for X.” “Because X is what we know how to use.”
  • 3. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Why should you choose this database? “Because this database is purpose built to support what my application is designed to do.”
  • 4. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Modern apps have modern requirements Users: 1 million+ Data volume: TB–PB–EB Locality: Global Performance: Milliseconds–microseconds Request rate: Millions per second Access: Web, Mobile, IoT, Devices Scale: Up-down, Out-in Economics: Pay for what you use Developer access: No assembly requiredSocial mediaRide hailing Media streaming Dating
  • 5. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Referential integrity, ACID transactions, schema- on-write Low-latency, key lookups with high throughput and fast ingestion of data Indexing and storing documents with support for query on any attribute Microseconds latency, key- based queries, and specialized data structures Creating and navigating data relations easily and quickly Lift and shift, EMR, CRM, finance Real-time bidding, shopping cart, social Content management, personalization, mobile Leaderboards, real-time analytics, caching Fraud detection, social networking, recommendation engine Indexing and searching semistructure d logs and data Product catalog, help and FAQs, full text Collect, store, and process data sequenced by time IoT applications, event tracking Complete, immutable, and verifiable history of all changes Systems of record, supply chain, health care, registrations, financial Common data categories and use cases Relational Key-value Document In-memory Graph Search Time-series Ledger
  • 6. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS: Purpose-built databases Amazon DynamoDB Amazon Neptune Aurora CommercialCommunity Amazon ElastiCache Amazon Elasticsearch Service Amazon DocumentDB Amazon Timestream Amazon Quantum Ledger Database Relational Key-value Document In-memory Graph Search Time-series Ledger Amazon RDS PostgreSQL PostgreSQL
  • 7. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. CHALLENGE Wanted to enable anyone to learn a language for free. SOLUTION Purpose-built databases from AWS: • DynamoDB: 31B items tracking which language exercises completed • Aurora: primary transactional database for user data • ElastiCache: instant access to common words and phrases RESULTS More people learning a language on Duolingo than entire US school system 300M total users 7B exercises per month
  • 8. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relational Key-value Document Graph Let’s take a closer look at…
  • 9. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relational Key-value Document Graph Relational
  • 10. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Patient * Patient ID First Name Last Name Gender DOB * Doctor ID Visit * Visit ID * Patient ID * Hospital ID Date * Treatment ID Medical Treatment * Treatment ID Procedure How Performed Adverse Outcome Contraindication Doctor * Doctor ID First Name Last Name Medical Specialty * Hospital Affiliation Hospital * Hospital ID Name Address Rating Relational Referential integrity, ACID transactions, schema-on-write Lift and shift, ERP, CRM, finance
  • 11. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relational // Doctors affiliated with Mercy hospital SELECT d.first_name, d.last_name FROM doctor as d, hospital as h WHERE d.hospital = h.hospital_id AND h.name = ‘Mercy'; // Number of patient visits each doctor completed last week Patient * Patient ID First Name Last Name Gender DOB * Doctor ID Visit * Visit ID * Patient ID * Hospital ID Date * Treatment ID Medical Treatment * Treatment ID Procedure How Performed Adverse Outcome Contraindication Doctor * Doctor ID First Name Last Name Medical Specialty * Hospital Affiliation Hospital * Hospital ID Name Address Rating SELECT d.first_name, d.last_name, count(*) FROM visit as v, hospital as h, doctor as d WHERE v.hospital_id = h.hospital_id AND h.hospital_id = d.hospital AND v.t_date > date_trunc('week’, CURRENT_TIMESTAMP - interval '1 week') GROUP BY d.first_name, d.last_name;
  • 12. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. You You Fully managed services on AWS Spend time innovating and building new applications, not managing infrastructure AWS Self-managed Fully managed Schema design Query construction Query optimization Automatic failover Backup and recovery Isolation and security Industry compliance Push-button scaling Automated patching Advanced monitoring Routine maintenance Built-in best practices
  • 13. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Move to managed relational databases Reduce database administrative burden No need to re-architect existing applications Get better performance, availability, scalability, and security Migrate on-premises or cloud-hosted relational databases to managed services Amazon Aurora MySQL, PostgreSQL Amazon RDS MySQL, PostgreSQL, MariaDB, Oracle, SQL Server PostgreSQL
  • 14. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Aurora MySQL- and PostgreSQL-compatible relational database built for the cloud Performance and availability of commercial-grade databases at 1/10th the cost Performance and scalability Availability and durability Highly secure Fully managed 5x the throughput of standard MySQL and 3x that of standard PostgreSQL; scale out up to 15 read replicas Fault-tolerant, self-healing storage; six copies of data across three Availability Zones; continuous backup to Amazon S3 Network isolation, encryption at rest/transit, compliance and assurance programs Managed by Amazon RDS: No server provisioning, software patching, setup, configuration, or backups
  • 15. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relational Key-value Document Graph Key-value & Document
  • 16. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon DynamoDB Fast and flexible key value database service for any scale Comprehensive security Encrypts all data by default and fully integrates with AWS Identity and Access Management for robust security Performance at scale Consistent, single-digit millisecond response times at any scale; build applications with virtually unlimited throughput Global database for global users and apps Build global applications with fast access to local data by easily replicating tables across multiple AWS Regions Serverless No server provisioning, software patching, or upgrades; scales up or down automatically; continuously backs up your data
  • 17. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon DynamoDB Data Structure Table Items Attributes Partition Key Sort Key Mandatory Key-value access pattern Determines data distribution Optional Model 1:N relationships Enables rich query capabilities All items for key ==, <, >, >=, <= “begins with” “between” “contains” “in” sorted results counts top/bottom N values
  • 18. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Gamers Primary Key Attributes Gamer Tag Type Hammer57 Rank Level Points Tier 87 4050 Elite Status Health Progress 90 30 Weapon Class Damage Range Taser 87% 50 FluffyDuffy Rank Level Points Tier 5 1072 Trainee Status Health Progress 37 8 Key-value // Status of Hammer57 GET { TableName:"Gamers", Key: { "GamerTag":"Hammer57", "Type":"Status” } } // Return all Hammer57 QUERY { TableName:“Gamers”, KeyConditionExpression:”GamerTag = :a”, ExpressionAttributeValues: { “:a”:”Hammer57” } }
  • 19. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Document (client) (app) (database) JSON !JSON != Indexing and storing documents with support for query on any attribute Content management, personalization, mobile
  • 20. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Document User profiles { id: 181276, username: "sue1942", name: {first: "Susan", last: "Benoit"} } { id: 181276, username: "sue1942", name: {first: "Susan", last: "Benoit"}, ExplodingAcorns: { hi_score: 3185400, global_rank: 5139, bonus_levels: true }, promotions: ["new user","5%",”acorn"] } Indexing and storing documents with support for query on any attribute Content management, personalization, mobile
  • 21. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon DocumentDB (with MongoDB compatibility) Fast Scalable Fully managed MongoDB compatible Millions of requests per second with millisecond latency; twice the throughput of MongoDB Separation of compute and storage enables both layers to scale independently; scale out to 15 read replicas in minutes Managed by AWS: no hardware provisioning; auto patching, quick setup, secure, and automatic backups Compatible with MongoDB 3.6; use the same SDKs, tools, and applications with Amazon DocumentDB Fast, scalable, and fully managed MongoDB-compatible database service
  • 22. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relational Key-value Document Graph Graph
  • 23. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Relationships enable new applications Retail fraud detectionRestaurant recommendationsSocial networks
  • 24. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Graph // Product recommendation to a user gremlin> V().has(‘name’,’sara’).as(‘customer’).out(‘follows’).in(‘follows’).out(‘purchased’) ( (‘customer’)).dedup() (‘name’) ('name') KNO W S PURCHASED PURCHASED FOLLOWS PURCHASED PRODUCT SPORT FOLLOWS FOLLOWS // Identify a friend in common and make a recommendation gremlin> g.V().has('name','mary').as(‘start’). both('knows').both('knows’). where(neq(‘start’)). dedup().by('name').properties('name')
  • 25. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Different approaches for highly connected data Purpose-built for a business process Purpose-built to answer questions about relationships
  • 26. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Neptune Easy Build powerful queries easily with Gremlin and SPARQL Fast Query billions of relationships with millisecond latency Open Supports Apache TinkerPop & W3C RDF graph models Reliable Six replicas of your data across three AZs with full backup and restore Fully managed graph database
  • 27. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. https://github.com/aws-samples/aws-bookstore-demo-app
  • 28. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Bookstore Demo
  • 29. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Bookstore Demo
  • 30. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 31. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Timestream (sign up for the preview) Fast, scalable, fully managed time-series database 1,000x faster and 1/10th the cost of relational databases Collect data at the rate of millions of inserts per second (10M/second) Trillions of daily events Adaptive query processing engine maintains steady, predictable performance Time-series analytics Built-in functions for interpolation, smoothing, and approximation Serverless Automated setup, configuration, server provisioning, software patching
  • 32. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Quantum Ledger Database (QLDB) Fully managed ledger database Track and verify history of all changes made to your application’s data Immutable Maintains a sequenced record of all changes to your data, which cannot be deleted or modified; you have the ability to query and analyze the full history Cryptographically verifiable Uses cryptography to generate a secure output file of your data’s history Easy to use Easy to use, letting you use familiar database capabilities like SQL APIs for querying the data Highly scalable Executes 2–3X as many transactions than ledgers in common blockchain frameworks
  • 33. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Learn databases with AWS Training and Certification 25+ free digital training courses cover topics and services related to relational and nonrelational databases Resources created by the experts at AWS to help you build and validate database skills Validate expertise with the AWS Certified Database – Specialty exam The classroom offering, Planning and Designing Databases on AWS, features AWS expert instructors and hands-on activities Visit the databases learning path at aws.amazon.com/training/path-databases
  • 34. © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. What have we learned? Choose the right tool for the job Start from the application and work backwards Modern applications considerations Demo Application On GitHub: /aws-samples/aws- bookstore-demo-app Keep on Building ! AWS: Purpose-built databases Relational Key-value Document In-memory Graph Search Amazon DynamoDB Amazon Neptune Amazon RDS Aurora CommercialCommunity Amazon ElastiCache Amazon Elasticsearch Service Amazon DocumentDB Time-series Ledger Amazon Timestream Amazon Quantum Ledger DatabaseMemcachedRedis Social mediaRide hailing Media streaming Dating
  • 35. Thank you! © 2020, Amazon Web Services, Inc. or its affiliates. All rights reserved. Boaz Ziniman Principal Developer Advocate, Amazon Web Service @ziniman boaz.ziniman.aws bziniman boaz.work