Handling blobs (4 min)
GRIDFS
documents limited to 16MB in mongodb
breaks up large files into chunks and store them into a collection and meta data into another
By default GridFS limits chunk size to 256k
GridFS uses two collections to store files. One collection stores the file chunks, and the other stores file metadata.
collection
videos.chunks
videos.files
videos_meta?
When to denormalize (2 min)
Trees (2.5 min)
Benefits of embedding (2 min)
PERFORMANCE!
Multikeys (4 min)
Many to many relations (5 min)
One to many relations (5 min)
One to one relations (4 min)
Living without transactions (4 min)
Living without constraints (3 min)
Alternative schema for Blog (3 min)
Mongo design for Blog (4.5 min)
Relational normalization (5 min)
relational strives for 3rd normal form
denormalized
Goals of Normalization:
- frees database of modification anomalies (recall Andrews email example)
- minimize redesign when extending
- avoid any bias toward a particular access pattern (NOT A MONGO CONCERN)
"When you are not biased toward a particular access pattern you are equally bad at all of them"...Andrew Erlichson
Mongodb schema design (3 min)
mongo does not join in journal
joins are hard to scale
think about what data you want to use together
mongo has no constraints
atomic operations on documents
0 komentar:
Posting Komentar