SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
The RDBMS You Should
Be Using
Barney Boisvert - dev.Objective() 2016
About Me
Software Craftsman
Soccer
Scotch
Woodworking
Tooling
What is a Database?
What is a Database?
a place to store things "permanently"
a place applications collaborate
a place to cache complex results
a place to write audit logs
What is a Database?
durable storage (not Redis!)
structured data (not MongoDB!)
concurrent interaction (not SQLite!)
query language (not Couchbase!)
What is a Database?
query language
durable storage
Lingua Franca
success OR error
Relational database
SQL as query language
durable storage
relational model
ACID transactions
CAP Theorem
Consistency: one single data state
Availability: all requests get responses
Partition Tolerance: network partitioning
ACID
Atomic: all or nothing
Consistent: all constraints are met before commit
Isolated: serialized behaviour under concurrency
Durable: once committed, always committed
DDL & DML
Data Definition Language: the portion of SQL used to manipulate the structure of
your database
Data Manipulation Language: the portion of SQL used to manipulate the data in
your database
why not both?!
DDL & DML
ACID applies to both. Except in MariaDB (née MySQL):
ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME ALTER EVENT
ALTER FUNCTION ALTER PROCEDURE ALTER SERVER
ALTER TABLE ALTER VIEW ANALYZE TABLE
BEGIN CACHE INDEX CHANGE MASTER TO
CHECK TABLE CREATE DATABASE CREATE EVENT
CREATE FUNCTION CREATE INDEX CREATE PROCEDURE
CREATE ROLE CREATE SERVER CREATE TABLE
CREATE TRIGGER CREATE USER CREATE VIEW
DROP DATABASE DROP EVENT DROP FUNCTION
DROP INDEX DROP PROCEDURE DROP TABLE
DROP TRIGGER DROP ROLE DROP SERVER
DROP USER DROP VIEW FLUSH
GRANT LOAD INDEX INTO CACHE LOCK TABLES
OPTIMIZE TABLE RENAME TABLE RENAME USER
REPAIR TABLE RESET REVOKE
SET PASSWORD SHUTDOWN START SLAVE
START TRANSACTION STOP SLAVE TRUNCATE TABLE
https://mariadb.com/kb/en/mariadb/sql-statements-that-cause-an-implicit-commit/
Programmability
in application or in database?
surrogate key generation
constraints
cascade deletes
calculated fields
"hot" materialized views
Databases as Artifacts
test queries
query tuning
mid-transaction inspection via debugger
ad hoc reports
troubleshooting production
Concurrency Control
pray (MS Access)
table locking (MyISAM)
row locking (InnoDB)
MVCC (PostgreSQL, Oracle, SQL Server)
this is changing!
Administration Overhead
shared environments
local environment
MariaDB is super simple
PostgreSQL is pretty easy
Oracle, SQL Server licensing
SQL Server is Windows-Only
Monetary Cost
Oracle will cost you your firstborn
SQL Server is expensive, but has free Express Edition
small (<10gb) databases only
MariaDB and PostgreSQL are free
the last nail for MariaDB
because Node doesn't help in-DB
Elephants Are Cool?
Same roots as SQL Server (and Sybase)
Heroku keeps adding features
clustering/replication
upsert
JSON (and hstore) for "loose" models
plv8
inheritance
Elephants Aren't Cool?
Existing knowledge/experience
Cost isn't a differentiator
Downtime for upgrades is fine
"NoSQL" use cases
Facebook
key-value caching
unstructured data
why not both?
* I'm going to read this one verbatim. Sorry.
Elephants Are Cool!
ACID DDL
concurrency control
query tuning
price
ancestry
open source contributions
flexibility
Soapbox *
If you're not using version control, start. Before you write another line of
code.
If you write everything yourself, stop. Leverage libraries available to you.
Learn about your tools. They're all far more powerful than you believe.
Barney Boisvert
@barneyb
http://programmerluddite.com
me@barneyb.com

Mais conteúdo relacionado

Mais procurados

Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
mmoline
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server side
Howard Marks
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Redis Labs
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Cal Henderson
 

Mais procurados (20)

Cool MariaDB Plugins
Cool MariaDB Plugins Cool MariaDB Plugins
Cool MariaDB Plugins
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!
 
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 DatabaseeProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
eProseed Oracle Open World 2016 debrief - Oracle 12.2.0.1 Database
 
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
ECS19 - Ingo Gegenwarth -  Running Exchangein large environmentECS19 - Ingo Gegenwarth -  Running Exchangein large environment
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
 
Moving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScaleMoving to the Cloud: AWS, Zend, RightScale
Moving to the Cloud: AWS, Zend, RightScale
 
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
Webinar: Adobe Experience Manager Clustering Made Easy on MongoDB
 
Setting up a free open source java e-commerce website
Setting up a free open source java e-commerce websiteSetting up a free open source java e-commerce website
Setting up a free open source java e-commerce website
 
Document Databases & RavenDB
Document Databases & RavenDBDocument Databases & RavenDB
Document Databases & RavenDB
 
Javascript on Server-Side
Javascript on Server-SideJavascript on Server-Side
Javascript on Server-Side
 
Building Advanced RESTFul services
Building Advanced RESTFul servicesBuilding Advanced RESTFul services
Building Advanced RESTFul services
 
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
MariaDB - the "new" MySQL is 5 years old and everywhere (LinuxCon Europe 2015)
 
Using flash on the server side
Using flash on the server sideUsing flash on the server side
Using flash on the server side
 
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
Anatomy of a Redis Command by Madelyn Olson of Amazon Web Services - Redis Da...
 
Store
StoreStore
Store
 
Moving to the APEX Listener
Moving to the APEX ListenerMoving to the APEX Listener
Moving to the APEX Listener
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYCScalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
Scalable Web Architectures: Common Patterns and Approaches - Web 2.0 Expo NYC
 
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
EECI 2013 - ExpressionEngine Performance & Optimization - Laying a Solid Foun...
 
Event sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event StoreEvent sourcing Live 2021: Streaming App Changes to Event Store
Event sourcing Live 2021: Streaming App Changes to Event Store
 
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and RedundancyEnterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
 

Destaque

Getting started with responsive web design by matt busche
Getting started with responsive web design by matt buscheGetting started with responsive web design by matt busche
Getting started with responsive web design by matt busche
ColdFusionConference
 

Destaque (20)

Naked and afraid Offline Mobile
Naked and afraid Offline MobileNaked and afraid Offline Mobile
Naked and afraid Offline Mobile
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Refactoring your legacy app to a MVC framework
Refactoring your legacy app to a MVC frameworkRefactoring your legacy app to a MVC framework
Refactoring your legacy app to a MVC framework
 
Cfml features modern_coding
Cfml features modern_codingCfml features modern_coding
Cfml features modern_coding
 
Keep Applications Online
Keep Applications OnlineKeep Applications Online
Keep Applications Online
 
Paying off-emotional-debt-2
Paying off-emotional-debt-2Paying off-emotional-debt-2
Paying off-emotional-debt-2
 
Delivering Responsibly
Delivering ResponsiblyDelivering Responsibly
Delivering Responsibly
 
Working Remotely and Doing It Right
Working Remotely and Doing It RightWorking Remotely and Doing It Right
Working Remotely and Doing It Right
 
My Database Skills Killed the Server
My Database Skills Killed the ServerMy Database Skills Killed the Server
My Database Skills Killed the Server
 
Getting started with responsive web design by matt busche
Getting started with responsive web design by matt buscheGetting started with responsive web design by matt busche
Getting started with responsive web design by matt busche
 
Chef and vagrant
Chef and vagrantChef and vagrant
Chef and vagrant
 
Securing Legacy CFML Code
Securing Legacy CFML CodeSecuring Legacy CFML Code
Securing Legacy CFML Code
 
Jvm is-your-friend
Jvm is-your-friendJvm is-your-friend
Jvm is-your-friend
 
I'm a Team Lead, Now What?
I'm a Team Lead, Now What?I'm a Team Lead, Now What?
I'm a Team Lead, Now What?
 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
 
10 common cf server challenges
10 common cf server challenges10 common cf server challenges
10 common cf server challenges
 

Semelhante a The RDBMS You Should Be Using

Deploying MediaWiki On IBM DB2 in The Cloud Presentation
Deploying MediaWiki On IBM DB2 in The Cloud PresentationDeploying MediaWiki On IBM DB2 in The Cloud Presentation
Deploying MediaWiki On IBM DB2 in The Cloud Presentation
Leons Petražickis
 
DynamoDB Gluecon 2012
DynamoDB Gluecon 2012DynamoDB Gluecon 2012
DynamoDB Gluecon 2012
Appirio
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
dilip nayak
 
High Performance Jdbc
High Performance JdbcHigh Performance Jdbc
High Performance Jdbc
Sam Pattsin
 
xTech2006_DB2onRails
xTech2006_DB2onRailsxTech2006_DB2onRails
xTech2006_DB2onRails
webuploader
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
Jakir Hossain
 
Trouble with nosql_dbs
Trouble with nosql_dbsTrouble with nosql_dbs
Trouble with nosql_dbs
Murat Çakal
 

Semelhante a The RDBMS You Should Be Using (20)

Nosql seminar
Nosql seminarNosql seminar
Nosql seminar
 
Deploying MediaWiki On IBM DB2 in The Cloud Presentation
Deploying MediaWiki On IBM DB2 in The Cloud PresentationDeploying MediaWiki On IBM DB2 in The Cloud Presentation
Deploying MediaWiki On IBM DB2 in The Cloud Presentation
 
DynamoDB Gluecon 2012
DynamoDB Gluecon 2012DynamoDB Gluecon 2012
DynamoDB Gluecon 2012
 
Gluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDBGluecon 2012 - DynamoDB
Gluecon 2012 - DynamoDB
 
Jdbc introduction
Jdbc introductionJdbc introduction
Jdbc introduction
 
Sql 2012 always on
Sql 2012 always onSql 2012 always on
Sql 2012 always on
 
NoSQL
NoSQLNoSQL
NoSQL
 
Minnebar 2013 - Scaling with Cassandra
Minnebar 2013 - Scaling with CassandraMinnebar 2013 - Scaling with Cassandra
Minnebar 2013 - Scaling with Cassandra
 
Ajp notes-chapter-05
Ajp notes-chapter-05Ajp notes-chapter-05
Ajp notes-chapter-05
 
Ajp notes-chapter-05
Ajp notes-chapter-05Ajp notes-chapter-05
Ajp notes-chapter-05
 
Cloudcon East Presentation
Cloudcon East PresentationCloudcon East Presentation
Cloudcon East Presentation
 
Cloudcon East Presentation
Cloudcon East PresentationCloudcon East Presentation
Cloudcon East Presentation
 
SQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC InterfaceSQL Pass Through and the ODBC Interface
SQL Pass Through and the ODBC Interface
 
High Performance Jdbc
High Performance JdbcHigh Performance Jdbc
High Performance Jdbc
 
Database-as-a-Service with Oracle Enterprise Manager Cloud Control 12c and Or...
Database-as-a-Service with Oracle Enterprise Manager Cloud Control 12c and Or...Database-as-a-Service with Oracle Enterprise Manager Cloud Control 12c and Or...
Database-as-a-Service with Oracle Enterprise Manager Cloud Control 12c and Or...
 
xTech2006_DB2onRails
xTech2006_DB2onRailsxTech2006_DB2onRails
xTech2006_DB2onRails
 
ASP.NET MVC Performance
ASP.NET MVC PerformanceASP.NET MVC Performance
ASP.NET MVC Performance
 
Data Handning with Sqlite for Android
Data Handning with Sqlite for AndroidData Handning with Sqlite for Android
Data Handning with Sqlite for Android
 
Squeak DBX
Squeak DBXSqueak DBX
Squeak DBX
 
Trouble with nosql_dbs
Trouble with nosql_dbsTrouble with nosql_dbs
Trouble with nosql_dbs
 

Mais de ColdFusionConference

Mais de ColdFusionConference (20)

API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Rest ful tools for lazy experts
Rest ful tools for lazy expertsRest ful tools for lazy experts
Rest ful tools for lazy experts
 
Herding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandboxHerding cats managing ColdFusion servers with commandbox
Herding cats managing ColdFusion servers with commandbox
 
Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
 
Everyones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusionEveryones invited! Meet accesibility requirements with ColdFusion
Everyones invited! Meet accesibility requirements with ColdFusion
 

Último

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
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
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
Safe Software
 

Último (20)

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...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
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
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 
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...
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

The RDBMS You Should Be Using

  • 1. The RDBMS You Should Be Using Barney Boisvert - dev.Objective() 2016 About Me Software Craftsman Soccer Scotch Woodworking Tooling
  • 2. What is a Database? What is a Database? a place to store things "permanently" a place applications collaborate a place to cache complex results a place to write audit logs
  • 3. What is a Database? durable storage (not Redis!) structured data (not MongoDB!) concurrent interaction (not SQLite!) query language (not Couchbase!) What is a Database? query language durable storage
  • 4. Lingua Franca success OR error Relational database SQL as query language durable storage relational model ACID transactions CAP Theorem Consistency: one single data state Availability: all requests get responses Partition Tolerance: network partitioning
  • 5. ACID Atomic: all or nothing Consistent: all constraints are met before commit Isolated: serialized behaviour under concurrency Durable: once committed, always committed DDL & DML Data Definition Language: the portion of SQL used to manipulate the structure of your database Data Manipulation Language: the portion of SQL used to manipulate the data in your database
  • 6. why not both?! DDL & DML ACID applies to both. Except in MariaDB (née MySQL): ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME ALTER EVENT ALTER FUNCTION ALTER PROCEDURE ALTER SERVER ALTER TABLE ALTER VIEW ANALYZE TABLE BEGIN CACHE INDEX CHANGE MASTER TO CHECK TABLE CREATE DATABASE CREATE EVENT CREATE FUNCTION CREATE INDEX CREATE PROCEDURE CREATE ROLE CREATE SERVER CREATE TABLE CREATE TRIGGER CREATE USER CREATE VIEW DROP DATABASE DROP EVENT DROP FUNCTION DROP INDEX DROP PROCEDURE DROP TABLE DROP TRIGGER DROP ROLE DROP SERVER DROP USER DROP VIEW FLUSH GRANT LOAD INDEX INTO CACHE LOCK TABLES OPTIMIZE TABLE RENAME TABLE RENAME USER REPAIR TABLE RESET REVOKE SET PASSWORD SHUTDOWN START SLAVE START TRANSACTION STOP SLAVE TRUNCATE TABLE https://mariadb.com/kb/en/mariadb/sql-statements-that-cause-an-implicit-commit/ Programmability in application or in database? surrogate key generation constraints cascade deletes calculated fields "hot" materialized views
  • 7. Databases as Artifacts test queries query tuning mid-transaction inspection via debugger ad hoc reports troubleshooting production Concurrency Control pray (MS Access) table locking (MyISAM) row locking (InnoDB) MVCC (PostgreSQL, Oracle, SQL Server)
  • 8. this is changing! Administration Overhead shared environments local environment MariaDB is super simple PostgreSQL is pretty easy Oracle, SQL Server licensing SQL Server is Windows-Only Monetary Cost Oracle will cost you your firstborn SQL Server is expensive, but has free Express Edition small (<10gb) databases only MariaDB and PostgreSQL are free
  • 9. the last nail for MariaDB because Node doesn't help in-DB Elephants Are Cool? Same roots as SQL Server (and Sybase) Heroku keeps adding features clustering/replication upsert JSON (and hstore) for "loose" models plv8 inheritance Elephants Aren't Cool? Existing knowledge/experience Cost isn't a differentiator Downtime for upgrades is fine "NoSQL" use cases Facebook key-value caching unstructured data why not both?
  • 10. * I'm going to read this one verbatim. Sorry. Elephants Are Cool! ACID DDL concurrency control query tuning price ancestry open source contributions flexibility Soapbox * If you're not using version control, start. Before you write another line of code. If you write everything yourself, stop. Leverage libraries available to you. Learn about your tools. They're all far more powerful than you believe.