relational databases in the cloud - great wide open 2014
DESCRIPTION
In this session we'll go over the two most common open source relational databases. We'll start with a quick introduction to relational theory and an overview of why this technology is still powerful and relevant. We will address the challenges and operational specifics of developing against relational databases on Cloud environments. Note: This talk is aimed to developersTRANSCRIPT
![Page 1: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/1.jpg)
Relational Databases in the Cloud
![Page 2: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/2.jpg)
Inés SombraI N E S @ E N G I N E Y A R D . C O M
@ R A N D O M M O O D
![Page 3: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/3.jpg)
![Page 4: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/4.jpg)
Today’s Agenda
D E V E L O P M E N T I N T H E C L O U D ( A N D A D A S H O F O P S )
M Y S Q L
R E L AT I O N A L D AT A B A S E S
P O S T G R E S Q L
![Page 5: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/5.jpg)
Http://Www.Flickr.Com/Photos/Nathaninsandiego/5819143579/
Let’s Get
Started!
![Page 6: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/6.jpg)
Relational Intro & Tenets
![Page 7: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/7.jpg)
Relational Origin
![Page 8: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/8.jpg)
Relational DatabasesD AT A P E R C E I V E D B Y U S E R S A S T A B L E S & O N LY T A B L E S
O P E R AT O R S G E N E R AT E N E W T A B L E S F R O M O L D
* Trivia Q1: Why ‘Relation’?
![Page 9: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/9.jpg)
E N T I T I E S
R E L AT I O N S H I P S
C O N S T R A I N T S
AT T R I B U T E S
Relational Concepts
![Page 10: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/10.jpg)
E N T I T I E S
R E L AT I O N S H I P S
C O N S T R A I N T S
AT T R I B U T E S
Relational Concepts
![Page 11: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/11.jpg)
E N T I T I E S
R E L AT I O N S H I P S
C O N S T R A I N T S
AT T R I B U T E S
Relational Concepts
![Page 12: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/12.jpg)
E N T I T I E S
R E L AT I O N S H I P S
C O N S T R A I N T S
AT T R I B U T E S
Relational Concepts
![Page 13: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/13.jpg)
Relational Data Model
![Page 14: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/14.jpg)
Relational Data Model
![Page 15: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/15.jpg)
On SQLD M L : D AT A M A N I P U L AT I O N ( S E L E C T , I N S E R T , U P D AT E … )
D D L : D AT A D E F I N I T I O N ( C R E AT E , D R O P , A LT E R )
D C L : D AT A C O N T R O L ( G R A N T , R E V O K E )
![Page 16: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/16.jpg)
Relational Properties AT O M I C I T Y
C O N S I S T E N C Y
I S O L AT I O N
D U R A B I L I T Y
![Page 17: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/17.jpg)
Http://Www.Flickr.Com/Photos/Mukumbura/12828737425/
Our Databases
![Page 18: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/18.jpg)
![Page 19: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/19.jpg)
A Little Context I N T R O D U C E D 1 9 9 4 ( I S H ) V 5 . 6 . 1 7 C U R R E N T S T A B L E
* Trivia Q2: Why ‘My’?
V E R Y P E R V A S I V E D U E T O L A M P S T A C K & D E F A U LT S
![Page 20: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/20.jpg)
Multi Masters 1 0 / 2 0 0 5 O R A C L E B U Y S I N N O B A S E 0 2 / 2 0 0 6 O R A C L E B U Y S S L E E P Y C AT 0 1 / 2 0 0 8 S U N B U Y S M Y S Q L 0 4 - 0 8 / 2 0 0 9 O R A C L E B U Y S S U N
![Page 21: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/21.jpg)
Pro: Storage Engines
* Trivia Q3: Current Default?
I N N O D B
M Y I S A M
M E M O R Y
C S V
A R C H I V E
![Page 22: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/22.jpg)
Pro: Distros & ClusteringX T R A D B
M A R I A D B
W E B S C A L E D B
T O K U D B
G A L E R A
![Page 23: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/23.jpg)
Pro: Extras C R A Z Y M I G R AT I O N S O N R E P L I C A S
C O M M E R C I A L E C O S Y S T E M R E P L I C AT O R S & C O N N E C T O R S
![Page 24: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/24.jpg)
ConsE X P L A I N & Q U E R Y P L A N N E R K I N D A M E H
O R A C L E R E L AT I O N S H I P I S P R O B L E M AT I C F O R I T S C O M M U N I T Y
![Page 25: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/25.jpg)
Common MistakesS I M P L E T U R N S Y O U L A Z Y
N O T U S I N G I N N O D B
W E A K / M I S S I N G V A L I D AT I O N S
![Page 26: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/26.jpg)
Best Use CaseWhen you need a clustered RDBMS
* that works off the shelf and the option of commercial
support
![Page 27: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/27.jpg)
![Page 28: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/28.jpg)
A Little Context D E E P A C A D E M I C R O O T S B E R K E L E Y ’ S P O S T G R E S ( 9 5 )
* Trivia Q: Why An Elephant?
O B J E C T D AT A B A S E C O M M U N I T Y O W N E D
![Page 29: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/29.jpg)
Pro: Versatile M V C C
F T S
F D W S
E X T E N S I O N S
L A N G U A G E S
F L E X I B L E D AT A
![Page 30: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/30.jpg)
Pro: Versatile L I S T E N / N O T I F Y
F L E X I B L E I N D E X E S
P E R T R A N S A C T I O N S Y N C H R O N O U S R E P L I C AT I O N
![Page 31: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/31.jpg)
B - T R E E S D E F A U LT. N U M E R I C , T E X T , N U L L
H A S H E Q U A L I T Y . D O N ’ T U S E G I N A R R AY V A L U E S & F T S G I S T G E O M E T R I C D AT A & F T S
They Can Be Created Concurrently!
Many Indexes
![Page 32: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/32.jpg)
P A R T I A L I N D E X E S I N D E X + W H E R E C L A U S E
E X P R E S S I O N I N D E X E S M AT C H O N F U N C T I O N / M O D I F I C AT I O N U N I Q U E I N D E X E S P R E V E N T S D U P E S S O R T E D I N D E X E S A LT E R B - T R E E F R O M A S C T O D E S C
Many Indexes
![Page 33: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/33.jpg)
ConsC L U S T E R I N G S T O R Y I S N O T Q U I T E T H E R E Y E T
M O R E S T R I C T I N T E R M S O F T Y P E S . N O M O R E S H E N A N I G A N S !
![Page 34: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/34.jpg)
Common MistakesU N N E C E S S A R Y I N D E X E S ( M U LT I - C O L U M N )
O V E R L O O K E X T E N S I O N S
G I V I N G U P O N I N S T A L L
![Page 35: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/35.jpg)
When you need an amazingly versatile & powerful RDBMS
* and replica promotion is enough
Best Use Case
![Page 36: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/36.jpg)
Developing & Running * D B S I N T H E C L O U D
![Page 37: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/37.jpg)
Know Your ReplicationD B R E P L I C AT I O N I S A M U S T H AV E
U S E D I F F E R E N T F A I L U R E D O M A I N S
U N D E R S T A N D D R / H A O P T I O N S
P R A C T I C E R E P L I C A P R O M O T I O N S
![Page 38: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/38.jpg)
B A C K U P S≠D I S A S T E R R E C O V E R Y
H AV E A P L A N & P R A C T I C E I T !
Expect Failures
DB Masterus-east-1a
Replicaus-east-1b
App
App X
![Page 39: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/39.jpg)
Let’s Wrap Up
( + R E S O U R C E S & Q & A )
![Page 40: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/40.jpg)
RDBMSs C O M P L I C AT E D B Y D E S I G N T O
M A K E Y O U R L I F E S I M P L E R
L E V E R A G E T H E M A P P R O P R I AT E LY
![Page 41: Relational Databases in the Cloud - Great Wide Open 2014](https://reader033.vdocuments.site/reader033/viewer/2022052621/557cf528d8b42a89158b485a/html5/thumbnails/41.jpg)
Questions?
T H A N K Y O U !
G I T H U B . C O M / R A N D O M M O O D /G R E AT W I D E O P E N 2 0 1 4