SlideShare a Scribd company logo
Submit Search
Upload
Login
Signup
PostgreSQLからMongoDBへ
Report
Basuke Suzuki
Follow
Software Engineer, Programmer at Kinoma
Dec. 12, 2010
•
0 likes
•
2,726 views
1
of
25
PostgreSQLからMongoDBへ
Dec. 12, 2010
•
0 likes
•
2,726 views
Download Now
Download to read offline
Report
Technology
原宿のセレクトショップアシストオンの通販サイトを、インフラの交換を含めてMongoDBかする際のあれこれ。
Basuke Suzuki
Follow
Software Engineer, Programmer at Kinoma
Recommended
MongoDBで作るソーシャルデータ新解析基盤
Takahiro Inoue
29K views
•
76 slides
MongoDB Oplog入門
Takahiro Inoue
7.2K views
•
24 slides
MongoDB全機能解説2
Takahiro Inoue
2.8K views
•
85 slides
20110514 mongo dbチューニング
Yuichi Matsuo
26.9K views
•
34 slides
MongoDB dla administratora
3camp
688 views
•
24 slides
Mongo db dla administratora
Łukasz Jagiełło
551 views
•
24 slides
More Related Content
What's hot
Couchdb
Саги Усаги
334 views
•
37 slides
20151224-games
Noritada Shimizu
1K views
•
64 slides
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
OlinData
1.3K views
•
30 slides
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
Walter Heck
2.6K views
•
30 slides
MongoDB Aggregation
Amit Ghosh
229 views
•
18 slides
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
MongoSF
2.9K views
•
133 slides
What's hot
(20)
Couchdb
Саги Усаги
•
334 views
20151224-games
Noritada Shimizu
•
1K views
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
OlinData
•
1.3K views
PuppetCamp SEA @ Blk 71 - Nagios in under 10 mins with Puppet
Walter Heck
•
2.6K views
MongoDB Aggregation
Amit Ghosh
•
229 views
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)
MongoSF
•
2.9K views
高性能かつスケールアウト可能なHPCクラウド AIST Super Green Cloud
Ryousei Takano
•
2.7K views
MongoDB
Steve Klabnik
•
528 views
Mongodb workshop
Harun Yardımcı
•
1K views
CGI.pm - 3ло?!
Anatoly Sharifulin
•
626 views
Inside MongoDB: the Internals of an Open-Source Database
Mike Dirolf
•
52.3K views
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
•
2K views
Getting Started with MongoDB
Michael Redlich
•
2.1K views
Litebox
meli media
•
34 views
Paris js extensions
erwanl
•
1.6K views
Google App Engine Developer - Day3
Simon Su
•
1.6K views
JavaSE7 Launch Event: Java7xGroovy
Yasuharu Nakano
•
1.4K views
Full-Stack JavaScript with Node.js
Michael Lehmann
•
2.5K views
Brief intro to clojure
Roy Rutto
•
424 views
Mongodb Aggregation Pipeline
zahid-mian
•
14.4K views
Viewers also liked
NoSQL を Ruby で実践するための n 個の方法
Tomohiro Nishimura
2.5K views
•
79 slides
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB
10.9K views
•
15 slides
イマドキのフロントエンドエンジニアの道具箱
Fumio SAGAWA
45.7K views
•
73 slides
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
Takahiro Inoue
43.2K views
•
89 slides
MongoDBを使用したモバイルゲーム開発
Genki Yamada
18.6K views
•
18 slides
MongoDB全機能解説1
Takahiro Inoue
54.5K views
•
74 slides
Viewers also liked
(6)
NoSQL を Ruby で実践するための n 個の方法
Tomohiro Nishimura
•
2.5K views
MongoDB Schema Design (Richard Kreuter's Mongo Berlin preso)
MongoDB
•
10.9K views
イマドキのフロントエンドエンジニアの道具箱
Fumio SAGAWA
•
45.7K views
MongoDBを用いたソーシャルアプリのログ解析 〜解析基盤構築からフロントUIまで、MongoDBを最大限に活用する〜
Takahiro Inoue
•
43.2K views
MongoDBを使用したモバイルゲーム開発
Genki Yamada
•
18.6K views
MongoDB全機能解説1
Takahiro Inoue
•
54.5K views
Similar to PostgreSQLからMongoDBへ
MongoDB, PHP and the cloud - php cloud summit 2011
Steven Francia
15.2K views
•
75 slides
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
Daniel Cousineau
2.1K views
•
78 slides
Latinoware
kchodorow
558 views
•
47 slides
MongoDB at ZPUGDC
Mike Dirolf
1.7K views
•
46 slides
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
Henrik Ingo
1.1K views
•
45 slides
Building Apps with MongoDB
Nate Abele
9.3K views
•
53 slides
Similar to PostgreSQLからMongoDBへ
(20)
MongoDB, PHP and the cloud - php cloud summit 2011
Steven Francia
•
15.2K views
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!
Daniel Cousineau
•
2.1K views
Latinoware
kchodorow
•
558 views
MongoDB at ZPUGDC
Mike Dirolf
•
1.7K views
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
Henrik Ingo
•
1.1K views
Building Apps with MongoDB
Nate Abele
•
9.3K views
Webinar: General Technical Overview of MongoDB for Dev Teams
MongoDB
•
4.8K views
Social Data and Log Analysis Using MongoDB
Takahiro Inoue
•
8.3K views
Mongodb intro
christkv
•
4.1K views
MongoDB at RuPy
Mike Dirolf
•
1.1K views
Webinarserie: Einführung in MongoDB: “Back to Basics” - Teil 3 - Interaktion ...
MongoDB
•
1.7K views
Marc s01 e02-crud-database
MongoDB
•
603 views
How to use MongoDB with CakePHP
ichikaway
•
16.5K views
Building Your First MongoDB Application
Tugdual Grall
•
2.6K views
San Francisco Java User Group
kchodorow
•
1.5K views
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Alex Nguyen
•
6.8K views
Dev Jumpstart: Build Your First App with MongoDB
MongoDB
•
1.5K views
Back to Basics, webinar 2: La tua prima applicazione MongoDB
MongoDB
•
1.2K views
Webscale PostgreSQL - JSONB and Horizontal Scaling Strategies
Jonathan Katz
•
18K views
Conceptos básicos. Seminario web 4: Indexación avanzada, índices de texto y g...
MongoDB
•
2.4K views
More from Basuke Suzuki
CoAP Talk
Basuke Suzuki
4.7K views
•
49 slides
初めての単体テスト
Basuke Suzuki
18.3K views
•
40 slides
Introducing CakeEntity
Basuke Suzuki
1.9K views
•
33 slides
Introducing CakeEntity
Basuke Suzuki
2K views
•
36 slides
Kiosk / PHP
Basuke Suzuki
1.4K views
•
30 slides
iOS4時代の位置情報サービスの使い方
Basuke Suzuki
3.1K views
•
75 slides
More from Basuke Suzuki
(7)
CoAP Talk
Basuke Suzuki
•
4.7K views
初めての単体テスト
Basuke Suzuki
•
18.3K views
Introducing CakeEntity
Basuke Suzuki
•
1.9K views
Introducing CakeEntity
Basuke Suzuki
•
2K views
Kiosk / PHP
Basuke Suzuki
•
1.4K views
iOS4時代の位置情報サービスの使い方
Basuke Suzuki
•
3.1K views
iPhoneのオモチャ箱 - 刊行記念イベント@ジュンク堂新宿 - バスケ
Basuke Suzuki
•
1.1K views
Recently uploaded
Unleashing Innovation: IoT Project with MicroPython
Vubon Roy
38 views
•
10 slides
Empowering City Clerks
OnBoard
82 views
•
12 slides
Framing Few Shot Knowledge Graph Completion with Large Language Models
MODUL Technology GmbH
44 views
•
11 slides
Future of Skills
Alison B. Lowndes
73 views
•
50 slides
Privacy in the era of quantum computers
Speck&Tech
95 views
•
37 slides
GIT AND GITHUB (1).pptx
GDSCCVRGUPoweredbyGo
36 views
•
20 slides
Recently uploaded
(20)
Unleashing Innovation: IoT Project with MicroPython
Vubon Roy
•
38 views
Empowering City Clerks
OnBoard
•
82 views
Framing Few Shot Knowledge Graph Completion with Large Language Models
MODUL Technology GmbH
•
44 views
Future of Skills
Alison B. Lowndes
•
73 views
Privacy in the era of quantum computers
Speck&Tech
•
95 views
GIT AND GITHUB (1).pptx
GDSCCVRGUPoweredbyGo
•
36 views
Meetup_adessoCamunda_2023-09-13_Part1&2_en.pdf
MariaAlcantara50
•
40 views
Chandrayaan 3.pptx
PrasunJha12
•
31 views
9C Monthly Newsletter - SEPT 2023
PublishingTeam
•
234 views
10 reasons to choose Galaxy Tab S9 for work on the go
Samsung Business USA
•
54 views
Common WordPress APIs - Options API
Jonathan Bossenger
•
33 views
How resolve Gem dependencies in your code?
Hiroshi SHIBATA
•
154 views
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
Bernd Ruecker
•
40 views
EuroBSDCon 2023 - (auto)Installing BSD Systems - Cases using pfSense, TrueNAS...
Vinícius Zavam
•
67 views
Take Control of Podcasting thanks to Open Source and Podcasting 2.0
🎙 Benjamin Bellamy
•
74 views
Navigating the Future
OnBoard
•
35 views
"Building Asynchronous SOA for Modern Applications", Sai Pragna Etikyala
Fwdays
•
26 views
Common WordPress APIs_ Settings API
Jonathan Bossenger
•
29 views
GDSC ZHCET Google Study Jams 23.pdf
AbhishekSingh313342
•
19 views
Knowledge Graphs and Generative AI_GraphSummit Minneapolis Sept 20.pptx
Neo4j
•
33 views
PostgreSQLからMongoDBへ
1.
PostgreSQL MongoDB
CTO @basuke
2.
not only but also
4.
http://www.assiston.co.jp/ • •
~1000 • 30~80 PV
5.
• • • • Google
6.
• • • •
7.
MongoDB (
)
9.
•
PostgreSQL 7.4 => 8.1 • PHP 4.3 => 4.4 => 5.1 •
10.
•
MongoDB 1.6.3 • PHP 5.3 • Lithium • •
12.
Lithium •
http://lithify.me/ • 5.3 • CakePHP • MongoDB / CouchDB • ↑ RDB w
13.
PHP
MongoDB • Lithium • pecl mongo •
14.
Item::find('all', array(
'conditions' => array( 'category' => $tag, 'visible' => true, ), 'order' => array( 'position'=>'DESC', 'id' => 'DESC'), ));
15.
$item_collection->find(array(
'category' => $tag, 'visible' => true, )).sort(array( 'position'=>-1, 'id' => -1), ));
16.
•
mongoimport / mongoexport • JSON • JSON • PHP • •
17.
•
mongoimport -d assiston -c items --drop --file items.dump {"no" : 123456, "items" : [{"at" : 1285679232000}}
18.
Mongo Extended JSON •
http://www.mongodb.org/display/DOCS/Mongo +Extended+JSON • $binary, $date, $oid • $date milliseconds • PHP 32bit int
19.
•
• PHP JSON • TIMESTAMP json_encode • '2010-12-10 17:20:21' => 1291969221 • 1291969221 sec => "||date:1291969221000||" • JSON • "||date:1291969221000||" => Date(1291969221000)
20.
•
PHP w • Python OK • pgmongo
21.
1: atomic • •
• •
22.
CREATE TABLE ORDERS
( id SERIAL PRIMARY KEY, total INTEGER NOT NULL, { ... no: integer, ); total: integer, items: [ CREATE TABLE ORDER_ITEMS ( { price: integer, ...}, id SERIAL PRIMARY KEY, ] order_id INTEGER ... REFERS TO ORDERS, } price INTEGER NOT NULL, ... );
23.
2: •
ObjectID • • function(seqname) { return db.sequences.findAndModify({ query:{_id:seqname}, update: {$inc: {val:1}}, upsert: true, 'new': true}).val; } • db.system.js • db.eval("return sequence('abc')")
24.
3: mongo on
github • https://github.com/mongodb/mongo/tree/ master/jstests • MongoDB JavaScript
25.
Thank you. http://basuke.com/
Editor's Notes
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n