2. MongoDB from Mongoid
MongoDB: (from "humongous") is a scalable,
high-performance, open source, document-
oriented database.
Mongoid: Mongoid (pronounced mann-goyd) is
an Object-Document-Mapper (ODM) for
MongoDB written in Ruby.
3. The philosophy of Mongoid is to provide a
familiar API to Ruby developers who have been
using Active Record or Data Mapper
4. class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
#...
5. class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
field :phone, :type => String
#...
6. class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
field :phone, :type => String
field :tags, :type => Array
field :info, :type => Hash
#...
7. class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
field :auto_approved, :type => Boolean
field :message, :type => String
field :phone, :type => String
embeds_many :devices
8. class User
include Mongoid::Document
field :name, :type => String
field :email, :type => String
field :auto_approved, :type => Boolean
field :message, :type => String
field :phone, :type => String
embeds_many :devices
has_many :cars