These are some of my notes of my beginning, while learning Redis and Mongodb for a pet project. I made them for a tech talk at Maresme Developers Meetup #maresmedev.
Please email email me for notifying mistakes or suggestions.
2. SQL: THE BEGINNING
• Data structured on tables
using columns
• Data on one column is the
key for making relationships
with other tables
• Normalization
• RDBMS
6. RDBMS PROBLEMS
• Highcost on performing
complex operations over a
big database
• High
system load: scalability
needs
• Difficult failover recovery
• Difficult denormalization
8. NOSQL IS...
•A storage system for format
free data
• Web scale
• Software darwinism
• Different
types of solutions
depending on the needs:
Key-value, Documents,
Graphs, Objects...
9. REDIS
• http://redis.io Redis is SEXY
• Key-value store
• In memory
• Persistent
(periodical
asynchronous writes to disk)
• All operations are atomic
10. REDIS
Types of data Cool operations
• Hashes
• RPOPLPUSH
• Sets (arrays)
• Pub/Sub
• Lists
22. MONGOID
class User
include Mongoid::Document
field :name
field :birthday, :type => date
field :money, :type => float, :default => 0.0
embedded_in :company
end
class Company
field :name
embeds_one :user
end