Posts Tagged ‘mongodb’

RailsConf – Day 3 – Persistence Smoothie

June 9th, 2010 by Brian | No Comments | Filed in work

Persistence Smoothie – Blending SQL & NoSQLFlip Sasser (Intridea, Inc.)
@flipsasser

http://github.com/flipsasser/Persistence-Smoothie

NoSQL means no ACID
Keep what you know – don’t throw out your MySQL

DataMapper is the swiss army knife of ORM
- can point different models to different datastores
- Have a lot of refactoring to do

Sample Store App
- Authentication – keep in Reational DB
- Products – store metadata
- Purchases – keep it in RDB
- Activity Stream – denormalize with key/value store

mongofy – gem for moving data from mysql to mongo

Drawbacks
- DataPortability is lowered
- Lot more moving parts
- Say goodbye to all your fun AR mixins

Tags: , , ,

RailsConf – Day 2 – MongoDB Metamorphosis

June 8th, 2010 by Brian | No Comments | Filed in work

The MongoDB Metamorphosis: Data as DocumentsKyle Banker (10gen)

http://try.mongodb.com – mini tutorial

MongoDB tries to fit between key-value stores & relational databases

Data as Documents – documents are in BSON (binary json)

mongoDB operates on documents using special syntax

update() takes a query and an update (what to do) .. the update is applied to the results of the query

Embedded documents – i.e. Comments become embedded within Posts
Or you can normalize – Post id within each comment
Decisions to be made on what makes most sense for how you need to access the data

Embedded – fast queries, document always appears with parent

Hash is the object used to represent MongoDB objects

MongoMapper

Very informational, I want to try using this!

Tags: ,