Data Modeling for MongoDB: Building Well-Designed and Supportable MongoDB Databases

Data Modeling for MongoDB: Building Well-Designed and Supportable MongoDB Databases

by Steve Hoberman

Paperback

$38.74 $39.95 Save 3% Current price is $38.74, Original price is $39.95. You Save 3%.
Choose Expedited Shipping at checkout for guaranteed delivery by Friday, January 25

Product Details

ISBN-13: 9781935504702
Publisher: Technics Publications, LLC
Publication date: 06/14/2014
Pages: 226
Product dimensions: 7.50(w) x 9.25(h) x 0.48(d)

Table of Contents

Foreword v

Introduction 1

Conventions Used in This Book 3

Section I Getting Started 5

Chapter 1 The Power of Data Modeling 7

Many Forms to Represent an Information Landscape 8

Confirming and Documenting Different Perspectives 9

Data Modeling Is Not Optional! 11

Embarking on Our Publishing Adventure 13

Exercise 1 Life Without Data Modeling? 16

Chapter 2 The Power of NoSQL and MongoDB 19

NoSQL vs. the Traditional Relational Database 19

Variety 20

Structure 20

Scaling 20

Focus 20

Four Types of NoSQL Databases 22

MongoDB is a Document-Oriented NoSQL Database 25

Installing MongoDB 27

Chapter 3 MongoDB Objects 31

Entities 32

MongoDB Document = RDBMS Record (Entity Instance at Physical Level) 35

MongoDB Collection = RDBMS Table (Entity at Physical Level) 36

Attributes 37

MongoDB Field = RDBMS Field (Attribute at Physical Level) 37

Domains 39

MongoDB Datatype = RDBMS Datatype (Format Domain at Physical Level) 40

Relationships 41

Recursion 43

MongoDB Parent Reference = RDBMS Self Referencing (Recursion at Physical Level) 45

Keys 47

Candidate Key (Primary and Alternate Keys) 47

MongoDB Unique Index = RDBMS Unique Index (Candidate Key at Physical Level) 51

Surrogate Key 51

MongoDB Objectld = RDBMS GUID (Surrogate Key at Physical Level) 53

Foreign Key 53

MongoDB Reference = RDBMS Foreign Key 55

Secondary Key 55

MongoDB Non-Unique Index = RDBMS Secondary Key 56

Subtype 56

MongoDB Identity, Rolldown, Rollup = RDBMS Identity, Rolldown, Rollup 58

Exercise 2 Subtyping in MongoDB 60

Chapter 4 MongoDB Functionality 63

Adding Data in MongoDB 63

Querying Data in MongoDB 67

Exercise 3 Interpreting Queries 70

Updating Data in MongoDB 70

Deleting Data in MongoDB 74

Exercise 4 MongoDB Functionality 75

Section II Levels of Granularity 77

Chapter 5 Conceptual Data Modeling 83

Concept Explanation 84

Conceptual Data Modeling Approach 85

Step 1 Ask the Five Strategic Questions 86

Step 2 Identify and Define the Concepts 89

For Relational 91

For Dimensional 95

Step 3 Capture the Relationships 96

For Relational 96

Table of Contents 111

Step 4 Determine the Most Useful Form 102

For Relational 103

Traditional Conceptual Data Model 103

Business Assertions 104

Business Sketch 105

For Dimensional 106

Traditional Conceptual Data Model 106

Axis Technique 108

Step 5 Review and Confirm 108

Exercise 5 Conceptual Data Modeling Mindset 109

Chapter 6 Logical Data Modeling 111

Logical Data Modeling Approach 113

Step 1 Fill in the CDM 113

For Relational 117

For Dimensional 120

Step 2 Normalize and Abstract (Relational Only) 122

Normalization 122

Initial Chaos 124

First Normal Form (INF) 125

Second Normal Form (2NF) 127

Third Normal Form (3NF) 128

Abstraction (Relational Only) 132

Step 3 Determine the Most Useful Form 134

For Relational 134

For Dimensional 136

Step 4 Review and Confirm 137

Exercise 6 Logical Data Modeling Mindset 137

Chapter 7 Physical Data Modeling 139

Physical Data Modeling Approach 140

Step 1 Embed or Reference 141

Exercise 7 Embed or Reference 145

For Relational 146

For Dimensional 149

Step 2 Accommodate History 150

For Relational 151

For Dimensional 152

Step 3 Index and Shard 153

For Relational 153

For Dimensional 154

Step 4 Review and Confirm 154

Step 5 Implement 155

Section III Case Study 157

Chapter 8 Survey Dam Entry 159

Case Study Background 159

Conceptual Data Modeling 182

Step 1 Ask the Five Strategic Questions 163

Step 2 Identify and Define the Concepts 164

Step 3 Capture the Relationships 166

Step 4 Determine the Most Useful Form 168

Step 5 Review and Confirm 169

Logical Data Modeling 169

Step 1 Fill in the CDM 169

Step 2 Normalize and Abstract (Relational Only) 173

First Normal Form (INF) 173

Second Normal Form (2NF) 178

Third Normal Form (3NF) 180

Abstraction (Relational Only) ISO

Step 3 Determine the Most Useful Form 181

Step 4 Review and Confirm 181

Physical Data Modeling 182

Step 1 Embed or Reference 182

Step 2 Accommodate History 185

Step 3 Index and Shard 186

Step 4 Review and Confirm 187

Step 5 Implement 187

Appendix A Answers to Exercises 189

Appendix B References 197

Appendix C Glossary 199

Appendix A Answers to Exercises 189

Appendix B References 197

Appendix C Glossary 199

Index 209

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews