Your SlideShare is downloading. ×
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
PostgreSQLからMongoDBへ
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

PostgreSQLからMongoDBへ

4,630

Published on

原宿のセレクトショップアシストオンの通販サイトを、インフラの交換を含めてMongoDBかする際のあれこれ。

原宿のセレクトショップアシストオンの通販サイトを、インフラの交換を含めてMongoDBかする際のあれこれ。

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,630
On Slideshare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
31
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \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
  • Transcript

    • 1. PostgreSQLMongoDB CTO @basuke
    • 2. not onlybut also
    • 3. http://www.assiston.co.jp/•• ~1000• 30~80 PV
    • 4. •••• Google
    • 5. ••••
    • 6. MongoDB ( )
    • 7. • PostgreSQL 7.4 => 8.1• PHP 4.3 => 4.4 => 5.1•
    • 8. • MongoDB 1.6.3• PHP 5.3• Lithium••
    • 9. Lithium• http://lithify.me/• 5.3• CakePHP• MongoDB / CouchDB• ↑ RDB w
    • 10. PHP MongoDB • Lithium • pecl mongo •
    • 11. Item::find(all, array( conditions => array( category => $tag, visible => true, ), order => array( position=>DESC, id => DESC), ));
    • 12. $item_collection->find(array( category => $tag, visible => true, )).sort(array( position=>-1, id => -1), ));
    • 13. • mongoimport / mongoexport • JSON • JSON• PHP••
    • 14. • mongoimport -d assiston -c items --drop --file items.dump {"no" : 123456, "items" : [{"at" : 1285679232000}}
    • 15. Mongo Extended JSON• http://www.mongodb.org/display/DOCS/Mongo +Extended+JSON• $binary, $date, $oid• $date milliseconds • PHP 32bit int
    • 16. • • PHP JSON• TIMESTAMP json_encode • 2010-12-10 17:20:21 => 1291969221 • 1291969221 sec => "||date:1291969221000||" • JSON • "||date:1291969221000||" => Date(1291969221000)
    • 17. • PHP w • Python OK • pgmongo
    • 18. 1: atomic•• ••
    • 19. 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, ...);
    • 20. 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)")
    • 21. 3: mongo on github• https://github.com/mongodb/mongo/tree/ master/jstests• MongoDB JavaScript
    • 22. Thank you.http://basuke.com/

    ×