mongodb for oracle experts - ougf harmony 2014
DESCRIPTION
A lightweight MongoDB introduction presented to some of the most senior Oracle experts in the Nordics.TRANSCRIPT
![Page 1: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/1.jpg)
MongoDBThe Database for Modern Applications
Solutions Architect, MongoDB
Henrik Ingo
![Page 2: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/2.jpg)
2
The 70s...
![Page 3: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/3.jpg)
3
1979: Sony Walkman
![Page 4: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/4.jpg)
4
1974: Post-it notes
![Page 5: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/5.jpg)
5
1971: First Man on the Moon
![Page 6: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/6.jpg)
6
1966: Telefax (popularized during the 70s)
![Page 7: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/7.jpg)
7
1977: Apple II, the first PC
![Page 8: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/8.jpg)
8
The Relational Database
![Page 9: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/9.jpg)
Things the RDBMS is optimized for...
![Page 10: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/10.jpg)
10
Disk space
![Page 11: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/11.jpg)
11
Data integrity
![Page 12: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/12.jpg)
12
Waterfall Development Cycle
Business
RequirementssAnalysis
Technical
Requirements
DataBase
Schema
Design
Software
DevelopmentQA
Production
![Page 13: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/13.jpg)
13
Flexibility (seriously)
/* ---------------------------------- *//* ----- Begin the PL/SQL block ----- *//* ---------------------------------- */EXEC SQL EXECUTE
DECLAREinsufficient_funds EXCEPTION;old_bal NUMBER;min_bal CONSTANT NUMBER := 500;
BEGINSELECT bal INTO old_bal FROM accounts
WHERE account_id = :acct;-- If the account doesn't exist, the NO_DATA_FOUND-- exception will be automatically raised.
:new_bal := old_bal - :debit;IF :new_bal >= min_bal THEN
UPDATE accounts SET bal = :new_balWHERE account_id = :acct;
INSERT INTO journalVALUES (:acct, 'Debit', :debit, SYSDATE);
:status := 'Transaction completed.';ELSE
RAISE insufficient_funds;END IF;....
![Page 14: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/14.jpg)
The reality in 2014...
![Page 15: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/15.jpg)
15
Business logic in PL/SQL is not a best practice
?
![Page 16: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/16.jpg)
16
RDBMS is a poor match to OO
Relational
Database
Object Relational
MappingApplication
Code XML Config DB Schema
![Page 17: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/17.jpg)
17
Document Data Model
Relational MongoDB
{
first_name: ‘Paul’,
surname: ‘Miller’,
city: ‘London’,
location:
[45.123,47.232],
cars: [
{ model: ‘Bentley’,
year: 1973,
value: 100000, … },
{ model: ‘Rolls Royce’,
year: 1965,
value: 330000, … }
}
}
![Page 18: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/18.jpg)
18
Developers are more productive
![Page 19: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/19.jpg)
19
Iterative development
Business
Requirementss
Rapid
PrototypingReview
Production
![Page 20: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/20.jpg)
20
Data exists in diverse sources......beyond our control, btw.
social media
sensors
Legacy
RDBMSLegacy
RDBMSLegacy
RDBMS
![Page 21: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/21.jpg)
Big Data?
![Page 22: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/22.jpg)
22
Big Data is all about
Volume
Velocity
Variety
![Page 23: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/23.jpg)
23
You want a DB that has
Volume
Velocity
Variety
Scale-out
Low latency
Flexible schema
![Page 24: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/24.jpg)
Typical MongoDB projects
for Oracle experts
![Page 25: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/25.jpg)
25
Data Hub
CRM CRM CRM
MongoDB
Dashboard
![Page 26: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/26.jpg)
26
Insurance leader generates coveted 360-degree view of customers in 90 days – “The Wall”
Case
Problem Why MongoDB Results
• No single view of customer
• 145 yrs of policy data, 70+ systems, 15+ apps
• 2 years, $25M trying to aggregate in RDBMS –failed
• Agility – prototype in 5 days; production in 90 days
• Dynamic schema & rich querying – combine disparate data into one data store
• Hot tech to attract top talent
• Increased call center productivity
• Better customer experience, reduced churn, more upsell opps
• Dozens more projects in the works to leverage this data platform
![Page 27: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/27.jpg)
27
Staging hub
MongoDB
RDBMSsystems
RDBMS
Staging,Data preparation
DWH
Graphing SW
![Page 28: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/28.jpg)
28
Archive
Archive
App
(MySQL)
![Page 29: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/29.jpg)
29
Stores billions of posts in myriad formats
with MongoDB
Case
Problem Why MongoDB Results
• 1.5M posts per day, different structures
• Inflexible MySQL, lengthy delays for making changes
• Data piling up in production database
• Poor performance
• Flexible document-
based model
• Horizontal scalability
built in
• Easy to use
• Interface in familiar
language
• Initial deployment held
over 5B documents and
10TB of data
• Automated failover
provides high
availability
• Schema changes are
quick and easy
![Page 30: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/30.jpg)
30
Branch out
MongoDB
RDBMS
app
OriginalDB
New functionalityor Big Data
![Page 31: MongoDB for Oracle Experts - OUGF Harmony 2014](https://reader034.vdocuments.us/reader034/viewer/2022052522/554f6c48b4c905c8088b527c/html5/thumbnails/31.jpg)