MongoDB Applied Design Patterns - Rick Copeland.pdf
(
9382 KB
)
Pobierz
MongoDB Applied
Design Patterns
Rick Copeland
MongoDB Applied Design Patterns
by Rick Copeland
Copyright © 2013 Richard D. Copeland, Jr. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editors:
Mike Loukides and Meghan Blanchette
Production Editor:
Kristen Borg
Copyeditor:
Kiel Van Horn
Proofreader:
Jasmine Kwityn
March 2013:
First Edition
Indexer:
Jill Edwards
Cover Designer:
Karen Montgomery
Interior Designer:
David Futato
Illustrator:
Kara Ebrahim
Revision History for the First Edition:
2013-03-01:
First release
See
http://oreilly.com/catalog/errata.csp?isbn=9781449340049
for release details.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly
Media, Inc.
MongoDB Applied Design Patterns,
the image of a thirteen-lined ground squirrel, and related
trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐
mark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and author assume no
responsibility for errors or omissions, or for damages resulting from the use of the information contained
herein.
ISBN: 978-1-449-34004-9
[LSI]
Table of Contents
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Part I.
Design Patterns
3
4
6
7
8
8
9
9
11
12
13
14
1. To Embed or Reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Relational Data Modeling and Normalization
What Is a Normal Form, Anyway?
So What’s the Problem?
Denormalizing for Performance
MongoDB: Who Needs Normalization, Anyway?
MongoDB Document Format
Embedding for Locality
Embedding for Atomicity and Isolation
Referencing for Flexibility
Referencing for Potentially High-Arity Relationships
Many-to-Many Relationships
Conclusion
2. Polymorphic Schemas. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Polymorphic Schemas to Support Object-Oriented Programming
Polymorphic Schemas Enable Schema Evolution
Storage (In-)Efficiency of BSON
Polymorphic Schemas Support Semi-Structured Domain Data
Conclusion
The Relational Approach to Consistency
Compound Documents
Using Complex Updates
17
20
21
22
23
25
26
28
iii
3. Mimicking Transactional Behavior. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Plik z chomika:
jonedave3
Inne pliki z tego folderu:
M.Wooldridge, L.Wooldridge - Teach Yourself Visually HTML and CSS - 2008.pdf
(92435 KB)
M Hoogendoorn & B Funk - Machine Learning for the Quantified Self.pdf
(11215 KB)
M Is for (Data) Monkey - Ken Puls.epub
(10058 KB)
M Rollins - The UBTECH Jimu Robots Builder's Guide.pdf
(10784 KB)
M. Chirimuuta - Outside Color.pdf
(19180 KB)
Inne foldery tego chomika:
@other-lang
@packed
0
1
2-1
Zgłoś jeśli
naruszono regulamin