Database Basics for
New-ish Developers
HELLO!
I am Dave Stokes
I am a MySQL Community Manager
David.Stokes@Oracle.com @stokes
2
Database
A database is an organized collection of data stored and accessed
electronically from a computer system
3
Why Databases Are Hard
Different Mindset Than Programming 1 4
“
The relational model for database
management is an approach to managing
data using a structure and language
consistent with logic -- Wikipedia
5
Think of Data Being In Sets
◉ Data segmented by logical group
◉ Sales data
◉ Customer information
◉ Shipping
◉ Production
◉ Join various logical groups together when needed
◉ Eliminate redundancy
6
Works With Data Sets
Describe what you want the data
returned to you looks like.
Structured Query Language
1970s Design (but still relevant)
Designed to minimize data duplication.
Retrieve multiple records with one
command.
7
Procedural Programs
Data
Work with one record at a
time, looping to get others
Record
One row of data
Columns
Items of data
8
Database
Data
Table with sets of data,
multiple tables linked
together
Records
Sets of data filtered as
needed
Columns
Items of data
9
Your Database Server is like a library
Think of a table like a
book with all the
information on one
subject between the
covers.
Try to avoid tearing out
one page, reading that
page, and the going to
tear out the next page.
10
Getting Started With Databases
Open Source Database 2 11
Free Open Source Database
Many choices for software
Lots of documentation, examples, guides, videos on line
Reddit, forums, Slack, ...
Cloud options
12
How to learn
1. Try examples, make subtle changes
2. Break things, learn how to fix them
3. Create your own database from scratch
4. Work with your favorite programming language
13
Directed advice for programmers
1. Think in SETS!!!!
2. Check return codes for errors and warnings
3. Reinventing the wheel is a waste of time
a. Normalize data -- third normal form or better!
b. Think about how you are using the data, build architecture
around that use.
4. Object Relational Mappers are extra complexity
a. LEARN SQL
14
15
Structured Query Language
SQL 316
17
Declarative Language
Tell the server what you want
18
Dave’s Pizza Analogy
SQL
Specify crust
Specify sauce
Specify toppings
Your Programming Language
Grow wheat for crust
Harvest wheat for crust
Turn wheat into flour
Obtain water to mix with flour
Find Stirring tool
Mix water and flour in bowl
Check dough consistency
Let dough rise
Shape dough
19
Declarative Language
In a similar sense to object–relational impedance mismatch, a
mismatch occurs between the declarative SQL language and the
procedural languages in which SQL is typically embedded.
Example: Your Own Shipping Department
Orders Table
List of items ordered by
customers
20
Customers Table
Get customer payment and
shipping information
Shipping Table
Pack/ship orders
Example: Your Own Shipping Department
Orders Table
List of items ordered by
customers
21
Customers Table
Get customer payment and
shipping information
Shipping Table
Pack/ship orders
Example: Your Own Shipping Department
Orders Table
List of items ordered by
customers
22
Customers Table
Get customer payment and
shipping information
Shipping Table
Pack/ship orders
23
Sold but not shipped
Shipping issues?
Free stuff?
Orders processed
What information is available?
24
SELECT customer.name,
order.number,
customer.shiping_address
FROM customer
JOIN order on (order.customer_id = customer.customer_id)
WHERE order.shipped = 0
AND order.packed = 1
AND order.paid_ok = 1;
Example query to determine orders that are ready to ship.
Test Drive MySQL
Database Service For
Free Today
Get $300 in credits
and try MySQL Database Service
free for 30 days.
https://www.oracle.com/cloud/free/
Copyright © 2021, Oracle and/or its affiliates
25
26
Please Buy My Book
If you are interested in the JSON data type in
MySQL or the NoSQL JSON Document Store
then you need this book!
Available on Amazon.com!
THANKS!
Any questions?
You can find me at
@stoker / david.stokes@oracle.com
&
MySQL Booth on Virtual Expo Hall
27
Slides at slideshare.net/davestokes

More Related Content

PPTX
A Step by Step Introduction to the MySQL Document Store
PPTX
cPanel now supports MySQL 8.0 - My Top Seven Features
PPTX
Develop PHP Applications with MySQL X DevAPI
PDF
MySQL 8 Tips and Tricks from Symfony USA 2018, San Francisco
PDF
MySQL 8 Server Optimization Swanseacon 2018
PPTX
How to Design a Good Database
PPTX
Introduction to NoSQL Databases
PDF
SQL Server 2012 - Semantic Search
A Step by Step Introduction to the MySQL Document Store
cPanel now supports MySQL 8.0 - My Top Seven Features
Develop PHP Applications with MySQL X DevAPI
MySQL 8 Tips and Tricks from Symfony USA 2018, San Francisco
MySQL 8 Server Optimization Swanseacon 2018
How to Design a Good Database
Introduction to NoSQL Databases
SQL Server 2012 - Semantic Search

What's hot (20)

PDF
MySQL Indexes and Histograms - RMOUG Training Days 2022
PPTX
Ordina Oracle Open World
PDF
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
PDF
Graph db as metastore
PDF
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
PPTX
Miracle Open World 2011 - XML Index Strategies
PDF
Persitance Data with sqlite
PDF
Apache Calcite (a tutorial given at BOSS '21)
PPT
5 Data Modeling for NoSQL 1/2
PDF
Do It With SQL - Journey to the Center of Database Worlds
PDF
Introduction to NoSQL
PDF
Fast federated SQL with Apache Calcite
PPTX
Non relational databases-no sql
PPS
PPTX
SQL Server Extended Events
PPTX
Apache hive
PPTX
Data virtualization using polybase
PPTX
Azure DocumentDB 101
PPTX
SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...
PPTX
U-SQL Federated Distributed Queries (SQLBits 2016)
MySQL Indexes and Histograms - RMOUG Training Days 2022
Ordina Oracle Open World
OSB 12c - Database Polling using DB adapter - Oracle Fusion Middleware Blog
Graph db as metastore
Oracle 11G Database Adapter as Poller with BPEL process _ My Tech Blog
Miracle Open World 2011 - XML Index Strategies
Persitance Data with sqlite
Apache Calcite (a tutorial given at BOSS '21)
5 Data Modeling for NoSQL 1/2
Do It With SQL - Journey to the Center of Database Worlds
Introduction to NoSQL
Fast federated SQL with Apache Calcite
Non relational databases-no sql
SQL Server Extended Events
Apache hive
Data virtualization using polybase
Azure DocumentDB 101
SQL Server Extended Events presentation from SQL Midlands User Group 14th Mar...
U-SQL Federated Distributed Queries (SQLBits 2016)
Ad

Similar to Database basics for new-ish developers -- All Things Open October 18th 2021 (20)

PDF
SQL For PHP Programmers
PDF
SQL For Programmers -- Boston Big Data Techcon April 27th
PDF
SkiPHP -- Database Basics for PHP
PDF
Oracle Sql Developer 21 Database Design And Development Using This Featureric...
PPTX
Introduction to Oracle Database
PPT
OODB
PPTX
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
PDF
SQL for PHP Programmers -- Dallas PHP Users Group Jan 2015
PPT
PPT
PPTX
7. SQL.pptx
PPTX
CSE311_IAH_Slide06_SQL _Retrival_Queries.pptx
PPT
DBMS - Introduction
PPTX
Structured Query Language (SQL) _ Edu4Sure Training.pptx
PPTX
12363 database certification
PPTX
Database Management System, Lecture-1
PPTX
Introduction to SQL, SQL*Plus
PPTX
SQL-Demystified-A-Beginners-Guide-to-Database-Mastery.pptx
PPT
Database Systems Concepts, 5th Ed
PPTX
data base programming chapter1 26 slides
SQL For PHP Programmers
SQL For Programmers -- Boston Big Data Techcon April 27th
SkiPHP -- Database Basics for PHP
Oracle Sql Developer 21 Database Design And Development Using This Featureric...
Introduction to Oracle Database
OODB
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
SQL for PHP Programmers -- Dallas PHP Users Group Jan 2015
7. SQL.pptx
CSE311_IAH_Slide06_SQL _Retrival_Queries.pptx
DBMS - Introduction
Structured Query Language (SQL) _ Edu4Sure Training.pptx
12363 database certification
Database Management System, Lecture-1
Introduction to SQL, SQL*Plus
SQL-Demystified-A-Beginners-Guide-to-Database-Mastery.pptx
Database Systems Concepts, 5th Ed
data base programming chapter1 26 slides
Ad

More from Dave Stokes (20)

PDF
Json within a relational database
PDF
Php & my sql - how do pdo, mysq-li, and x devapi do what they do
PDF
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...
PDF
MySQL 8.0 New Features -- September 27th presentation for Open Source Summit
PDF
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
PDF
Open Source World June '21 -- JSON Within a Relational Database
PDF
Dutch PHP Conference 2021 - MySQL Indexes and Histograms
PPTX
Validating JSON -- Percona Live 2021 presentation
PDF
Midwest PHP Presentation - New MSQL Features
PDF
Data Love Conference - Window Functions for Database Analytics
PPTX
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
PPTX
Confoo 2021 -- MySQL New Features
PPTX
Confoo 2021 - MySQL Indexes & Histograms
PDF
Datacon LA - MySQL without the SQL - Oh my!
PDF
MySQL Replication Update - DEbconf 2020 presentation
PDF
MySQL 8.0 Operational Changes
PPTX
Discover The Power of NoSQL + MySQL with MySQL
PPTX
Discover the Power of the NoSQL + SQL with MySQL
PDF
Confoo 202 - MySQL Group Replication and ReplicaSet
PPTX
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...
Json within a relational database
Php & my sql - how do pdo, mysq-li, and x devapi do what they do
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...
MySQL 8.0 New Features -- September 27th presentation for Open Source Summit
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScript
Open Source World June '21 -- JSON Within a Relational Database
Dutch PHP Conference 2021 - MySQL Indexes and Histograms
Validating JSON -- Percona Live 2021 presentation
Midwest PHP Presentation - New MSQL Features
Data Love Conference - Window Functions for Database Analytics
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...
Confoo 2021 -- MySQL New Features
Confoo 2021 - MySQL Indexes & Histograms
Datacon LA - MySQL without the SQL - Oh my!
MySQL Replication Update - DEbconf 2020 presentation
MySQL 8.0 Operational Changes
Discover The Power of NoSQL + MySQL with MySQL
Discover the Power of the NoSQL + SQL with MySQL
Confoo 202 - MySQL Group Replication and ReplicaSet
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...

Recently uploaded (20)

PPTX
9 Bioterrorism.pptxnsbhsjdgdhdvkdbebrkndbd
PPTX
langchainpptforbeginners_easy_explanation.pptx
PPTX
cyber row.pptx for cyber proffesionals and hackers
PPTX
PPT for Diseases.pptx, there are 3 types of diseases
PPTX
Statisticsccdxghbbnhhbvvvvvvvvvv. Dxcvvvhhbdzvbsdvvbbvv ccc
PDF
General category merit rank list for neet pg
PDF
Teal Blue Futuristic Metaverse Presentation.pdf
PPT
Classification methods in data analytics.ppt
PPTX
AI AND ML PROPOSAL PRESENTATION MUST.pptx
PPTX
ifsm.pptx, institutional food service management
PPTX
DIGITAL DESIGN AND.pptx hhhhhhhhhhhhhhhhh
PPTX
ch20 Database System Architecture by Rizvee
PPTX
Stats annual compiled ipd opd ot br 2024
PDF
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
PDF
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
PPTX
865628565-Pertemuan-2-chapter-03-NUMERICAL-MEASURES.pptx
PPTX
DATA ANALYTICS COURSE IN PITAMPURA.pptx
PPTX
Chapter security of computer_8_v8.1.pptx
PPTX
research framework and review of related literature chapter 2
PPTX
Sheep Seg. Marketing Plan_C2 2025 (1).pptx
9 Bioterrorism.pptxnsbhsjdgdhdvkdbebrkndbd
langchainpptforbeginners_easy_explanation.pptx
cyber row.pptx for cyber proffesionals and hackers
PPT for Diseases.pptx, there are 3 types of diseases
Statisticsccdxghbbnhhbvvvvvvvvvv. Dxcvvvhhbdzvbsdvvbbvv ccc
General category merit rank list for neet pg
Teal Blue Futuristic Metaverse Presentation.pdf
Classification methods in data analytics.ppt
AI AND ML PROPOSAL PRESENTATION MUST.pptx
ifsm.pptx, institutional food service management
DIGITAL DESIGN AND.pptx hhhhhhhhhhhhhhhhh
ch20 Database System Architecture by Rizvee
Stats annual compiled ipd opd ot br 2024
Hikvision-IR-PPT---EN.pdfSADASDASSAAAAAAAAAAAAAAA
Book Trusted Companions in Delhi – 24/7 Available Delhi Personal Meeting Ser...
865628565-Pertemuan-2-chapter-03-NUMERICAL-MEASURES.pptx
DATA ANALYTICS COURSE IN PITAMPURA.pptx
Chapter security of computer_8_v8.1.pptx
research framework and review of related literature chapter 2
Sheep Seg. Marketing Plan_C2 2025 (1).pptx

Database basics for new-ish developers -- All Things Open October 18th 2021

  • 2. HELLO! I am Dave Stokes I am a MySQL Community Manager [email protected] @stokes 2
  • 3. Database A database is an organized collection of data stored and accessed electronically from a computer system 3
  • 4. Why Databases Are Hard Different Mindset Than Programming 1 4
  • 5. “ The relational model for database management is an approach to managing data using a structure and language consistent with logic -- Wikipedia 5
  • 6. Think of Data Being In Sets ◉ Data segmented by logical group ◉ Sales data ◉ Customer information ◉ Shipping ◉ Production ◉ Join various logical groups together when needed ◉ Eliminate redundancy 6
  • 7. Works With Data Sets Describe what you want the data returned to you looks like. Structured Query Language 1970s Design (but still relevant) Designed to minimize data duplication. Retrieve multiple records with one command. 7
  • 8. Procedural Programs Data Work with one record at a time, looping to get others Record One row of data Columns Items of data 8
  • 9. Database Data Table with sets of data, multiple tables linked together Records Sets of data filtered as needed Columns Items of data 9
  • 10. Your Database Server is like a library Think of a table like a book with all the information on one subject between the covers. Try to avoid tearing out one page, reading that page, and the going to tear out the next page. 10
  • 11. Getting Started With Databases Open Source Database 2 11
  • 12. Free Open Source Database Many choices for software Lots of documentation, examples, guides, videos on line Reddit, forums, Slack, ... Cloud options 12
  • 13. How to learn 1. Try examples, make subtle changes 2. Break things, learn how to fix them 3. Create your own database from scratch 4. Work with your favorite programming language 13
  • 14. Directed advice for programmers 1. Think in SETS!!!! 2. Check return codes for errors and warnings 3. Reinventing the wheel is a waste of time a. Normalize data -- third normal form or better! b. Think about how you are using the data, build architecture around that use. 4. Object Relational Mappers are extra complexity a. LEARN SQL 14
  • 15. 15
  • 17. 17 Declarative Language Tell the server what you want
  • 18. 18 Dave’s Pizza Analogy SQL Specify crust Specify sauce Specify toppings Your Programming Language Grow wheat for crust Harvest wheat for crust Turn wheat into flour Obtain water to mix with flour Find Stirring tool Mix water and flour in bowl Check dough consistency Let dough rise Shape dough
  • 19. 19 Declarative Language In a similar sense to object–relational impedance mismatch, a mismatch occurs between the declarative SQL language and the procedural languages in which SQL is typically embedded.
  • 20. Example: Your Own Shipping Department Orders Table List of items ordered by customers 20 Customers Table Get customer payment and shipping information Shipping Table Pack/ship orders
  • 21. Example: Your Own Shipping Department Orders Table List of items ordered by customers 21 Customers Table Get customer payment and shipping information Shipping Table Pack/ship orders
  • 22. Example: Your Own Shipping Department Orders Table List of items ordered by customers 22 Customers Table Get customer payment and shipping information Shipping Table Pack/ship orders
  • 23. 23 Sold but not shipped Shipping issues? Free stuff? Orders processed What information is available?
  • 24. 24 SELECT customer.name, order.number, customer.shiping_address FROM customer JOIN order on (order.customer_id = customer.customer_id) WHERE order.shipped = 0 AND order.packed = 1 AND order.paid_ok = 1; Example query to determine orders that are ready to ship.
  • 25. Test Drive MySQL Database Service For Free Today Get $300 in credits and try MySQL Database Service free for 30 days. https://www.oracle.com/cloud/free/ Copyright © 2021, Oracle and/or its affiliates 25
  • 26. 26 Please Buy My Book If you are interested in the JSON data type in MySQL or the NoSQL JSON Document Store then you need this book! Available on Amazon.com!
  • 27. THANKS! Any questions? You can find me at @stoker / [email protected] & MySQL Booth on Virtual Expo Hall 27 Slides at slideshare.net/davestokes