NoSQL for Mere Mortals (For Mere Mortals)

NoSQL for Mere Mortals (For Mere Mortals)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 510 p.
  • 言語 ENG
  • 商品コード 9780134023212
  • DDC分類 005.75

Full Description


The Easy, Common-Sense Guide to Solving Real Problems with NoSQLThe Mere Mortals (R) tutorials have earned worldwide praise as the clearest, simplest way to master essential database technologies. Now, there's one for today's exciting new NoSQL databases. NoSQL for Mere Mortals guides you through solving real problems with NoSQL and achieving unprecedented scalability, cost efficiency, flexibility, and availability.Drawing on 20+ years of cutting-edge database experience, Dan Sullivan explains the advantages, use cases, and terminology associated with all four main categories of NoSQL databases: key-value, document, column family, and graph databases. For each, he introduces pragmatic best practices for building high-value applications. Through step-by-step examples, you'll discover how to choose the right database for each task, and use it the right way.Coverage includes--Getting started: What NoSQL databases are, how they differ from relational databases, when to use them, and when not to Data management principles and design criteria: Essential knowledge for creating any database solution, NoSQL or relational--Key-value databases: Gaining more utility from data structures--Document databases: Schemaless databases, normalization and denormalization, mutable documents, indexing, and design patterns--Column family databases: Google's BigTable design, table design, indexing, partitioning, and Big DataGraph databases: Graph/network modeling, design tips, query methods, and traps to avoidWhether you're a database developer, data modeler, database user, or student, learning NoSQL can open up immense new opportunities. As thousands of database professionals already know, For Mere Mortals is the fastest, easiest route to mastery.

Contents

Preface xxiIntroduction xxvPART I: INTRODUCTION 1Chapter 1 Different Databases for Different Requirements 3Relational Database Design 4E-commerce Application 5Early Database Management Systems 6Flat File Data Management Systems 7Organization of Flat File Data Management Systems 7Random Access of Data 9Limitations of Flat File Data Management Systems 9Hierarchical Data Model Systems 12Organization of Hierarchical Data Management Systems 12Limitations of Hierarchical Data Management Systems 14Network Data Management Systems 14Organization of Network Data Management Systems 15Limitations of Network Data Management Systems 17Summary of Early Database Management Systems 17The Relational Database Revolution 19Relational Database Management Systems 19Organization of Relational Database Management Systems 20Organization of Applications Using Relational Database Management Systems 26Limitations of Relational Databases 27Motivations for Not Just/No SQL (NoSQL) Databases 29Scalability 29Cost 31Flexibility 31Availability 32Summary 34Case Study 35Review Questions 36References 37Bibliography 37Chapter 2 Variety of NoSQL Databases 39Data Management with Distributed Databases 41Store Data Persistently 41Maintain Data Consistency 42Ensure Data Availability 44Consistency of Database Transactions 47Availability and Consistency in Distributed Databases 48Balancing Response Times, Consistency, and Durability 49Consistency, Availability, and Partitioning: The CAP Theorem 51ACID and BASE 54ACID: Atomicity, Consistency, Isolation, and Durability 54BASE: Basically Available, Soft State, Eventually Consistent 56Types of Eventual Consistency 57Casual Consistency 57Read-Your-Writes Consistency 57Session Consistency 58Monotonic Read Consistency 58Monotonic Write Consistency 58Four Types of NoSQL Databases 59Key-Value Pair Databases 60Keys 60Values 64Differences Between Key-Value and Relational Databases 65Document Databases 66Documents 66Querying Documents 67Differences Between Document and Relational Databases 68Column Family Databases 69Columns and Column Families 69Differences Between Column Family and Relational Databases 70Graph Databases 71Nodes and Relationships 72Differences Between Graph and Relational Databases 73Summary 75Review Questions 76References 77Bibliography 77PART II: KEY-VALUE DATABASES 79Chapter 3 Introduction to Key-Value Databases 81From Arrays to Key-Value Databases 82Arrays: Key Value Stores with Training Wheels 82Associative Arrays: Taking Off the Training Wheels 84Caches: Adding Gears to the Bike 85In-Memory and On-Disk Key-Value Database: From Bikes to Motorized Vehicles 89Essential Features of Key-Value Databases 91Simplicity: Who Needs Complicated Data Models Anyway? 91Speed: There Is No Such Thing as Too Fast 93Scalability: Keeping Up with the Rush 95Scaling with Master-Slave Replication 95Scaling with Masterless Replication 98Keys: More Than Meaningless Identifiers 103How to Construct a Key 103Using Keys to Locate Values 105Hash Functions: From Keys to Locations 106Keys Help Avoid Write Problems 107Values: Storing Just About Any Data You Want 110Values Do Not Require Strong Typing 110Limitations on Searching for Values 112Summary 114Review Questions 115References 116Bibliography 116Chapter 4 Key-Value Database Terminology 117Key-Value Database Data Modeling Terms 118Key 121Value 123Namespace 124Partition 126Partition Key 129Schemaless 129Key-Value Architecture Terms 131Cluster 131Ring 133Replication 135Key-Value Implementation Terms 137Hash Function 137Collision 138Compression 139Summary 141Review Questions 141References 142Chapter 5 Designing for Key-Value Databases 143Key Design and Partitioning 144Keys Should Follow a Naming Convention 145Well-Designed Keys Save Code 145Dealing with Ranges of Values 147Keys Must Take into Account Implementation Limitations 149How Keys Are Used in Partitioning 150Designing Structured Values 151Structured Data Types Help Reduce Latency 152Large Values Can Lead to Inefficient Read and Write Operations 155Limitations of Key-Value Databases 159Look Up Values by Key Only 160Key-Value Databases Do Not Support Range Queries 161No Standard Query Language Comparable to SQL for Relational Databases 161Design Patterns for Key-Value Databases 162Time to Live (TTL) Keys 163Emulating Tables 165Aggregates 166Atomic Aggregates 169Enumerable Keys 170Indexes 171Summary 173Case Study: Key-Value Databases for Mobile Application Configuration 174Review Questions 177References 178PART III: DOCUMENT DATABASES 179Chapter 6 Introduction to Document Databases 181What Is a Document? 182Documents Are Not So Simple After All 182Documents and Key-Value Pairs 187Managing Multiple Documents in Collections 188Getting Started with Collections 188Tips on Designing Collections 191Avoid Explicit Schema Definitions 199Basic Operations on Document Databases 201Inserting Documents into a Collection 202Deleting Documents from a Collection 204Updating Documents in a Collection 206Retrieving Documents from a Collection 208Summary 210Review Questions 210References 211Chapter 7 Document Database Terminology 213Document and Collection Terms 214Document 215Documents: Ordered Sets of Key-Value Pairs 215 Key and Value Data Types 216Collection 217Embedded Document 218Schemaless 220Schemaless Means More Flexibility 221Schemaless Means More Responsibility 222Polymorphic Schema 223Types of Partitions 224Vertical Partitioning 225Horizontal Partitioning or Sharding 227Separating Data with Shard Keys 229Distributing Data with a Partitioning Algorithm 230Data Modeling and Query Processing 232Normalization 233Denormalization 235Query Processor 235Summary 237Review Questions 237References 238Chapter 8 Designing for Document Databases 239Normalization, Denormalization, and the Search for Proper Balance 241One-to-Many Relations 242Many-to-Many Relations 243The Need for Joins 243Executing Joins: The Heavy Lifting of Relational Databases 245Executing Joins Example 247What Would a Document Database Modeler Do? 248The Joy of Denormalization 249Avoid Overusing Denormalization 251Just Say No to Joins, Sometimes 253Planning for Mutable Documents 255Avoid Moving Oversized Documents 258The Goldilocks Zone of Indexes 258Read-Heavy Applications 259Write-Heavy Applications 260Modeling Common Relations 261One-to-Many Relations in Document Databases 262Many-to-Many Relations in Document Databases 263Modeling Hierarchies in Document Databases 265Parent or Child References 265Listing All Ancestors 266Summary 267Case Study: Customer Manifests 269Embed or Not Embed? 271Choosing Indexes 271Separate Collections by Type? 272Review Questions 273References 273PART IV: COLUMN FAMILY DATABASES 275Chapter 9 Introduction to Column Family Databases 277In the Beginning, There Was Google BigTable 279Utilizing Dynamic Control over Columns 280Indexing by Row, Column Name, and Time Stamp 281Controlling Location of Data 282Reading and Writing Atomic Rows 283Maintaining Rows in Sorted Order 284Differences and Similarities to Key-Value and Document Databases 286Column Family Database Features 286Column Family Database Similarities to and Differences from Document Databases 287Column Family Database Versus Relational Databases 289Avoiding Multirow Transactions 290Avoiding Subqueries 291Architectures Used in Column Family Databases 293HBase Architecture: Variety of Nodes 293Cassandra Architecture: Peer-to-Peer 295Getting the Word Around: Gossip Protocol 296Thermodynamics and Distributed Database: Why We Need Anti-Entropy 299Hold This for Me: Hinted Handoff 300When to Use Column Family Databases 303Summary 304Review Questions 304References 305Chapter 10 Column Family Database Terminology 307Basic Components of Column Family Databases 308Keyspace 309Row Key 309Column 310Column Families 312Structures and Processes: Implementing Column Family Databases 313Internal Structures and Configuration Parameters of Column Family Databases 313Old Friends: Clusters and Partitions 314Cluster 314Partition 316Taking a Look Under the Hood: More Column Family Database Components 317Commit Log 317Bloom Filter 319Consistency Level 321Processes and Protocols 322Replication 322Anti-Entropy 323Gossip Protocol 324Hinted Handoff 325Summary 326Review Questions 327References 327Chapter 11 Designing for Column Family Databases 329Guidelines for Designing Tables 332Denormalize Instead of Join 333Make Use of Valueless Columns 334Use Both Column Names and Column Values to Store Data 334Model an Entity with a Single Row 335Avoid Hotspotting in Row Keys 337Keep an Appropriate Number of Column Value Versions 338Avoid Complex Data Structures in Column Values 339Guidelines for Indexing 340When to Use Secondary Indexes Managed by the Column Family Database System 341When to Create and Manage Secondary Indexes Using Tables 345Tools for Working with Big Data 348Extracting, Transforming, and Loading Big Data 350Analyzing Big Data 351Describing and Predicting with Statistics 351Finding Patterns with Machine Learning 353Tools for Analyzing Big Data 354Tools for Monitoring Big Data 355Summary 356Case Study: Customer Data Analysis 357Understanding User Needs 357Review Questions 359References 360PART V: GRAPH DATABASES 361Chapter 12 Introduction to Graph Databases 363What Is a Graph? 363Graphs and Network Modeling 365Modeling Geographic Locations 365Modeling Infectious Diseases 366Modeling Abstract and Concrete Entities 369Modeling Social Media 370Advantages of Graph Databases 372Query Faster by Avoiding Joins 372Simplified Modeling 375Multiple Relations Between Entities 375Summary 376Review Questions 376References 377Chapter 13 Graph Database Terminology 379Elements of Graphs 380Vertex 380Edge 381Path 383Loop 384Operations on Graphs 385Union of Graphs 385Intersection of Graphs 386Graph Traversal 387Properties of Graphs and Nodes 388Isomorphism 388Order and Size 389Degree 390Closeness 390Betweenness 391Types of Graphs 392Undirected and Directed Graphs 392Flow Network 393Bipartite Graph 394Multigraph 395Weighted Graph 395Summary 396Review Questions 397References 397Chapter 14 Designing for Graph Databases 399Getting Started with Graph Design 400Designing a Social Network Graph Database 401Queries Drive Design (Again) 405Querying a Graph 408Cypher: Declarative Querying 408Gremlin: Query by Graph Traversal 410Basic Graph Traversal 410Traversing a Graph with Depth-First and Breadth-First Searches 412Tips and Traps of Graph Database Design 415Use Indexes to Improve Retrieval Time 415Use Appropriate Types of Edges 416Watch for Cycles When Traversing Graphs 417Consider the Scalability of Your Graph Database 418Summary 420Case Study: Optimizing Transportation Routes 420Understanding User Needs 420Designing a Graph Analysis Solution 421Review Questions 423References 423PART VI: CHOOSING A DATABASE FOR YOUR APPLICATION 425Chapter 15 Guidelines for Selecting a Database 427Choosing a NoSQL Database 428Criteria for Selecting Key-Value Databases 429Use Cases and Criteria for Selecting Document Databases 430Use Cases and Criteria for Selecting Column Family Databases 431Use Cases and Criteria for Selecting Graph Databases 433Using NoSQL and Relational Databases Together 434Summary 436Review Questions 436References 437PART VII: APPENDICES 441Appendix A Answers to Chapter Review Questions 443Appendix B List of NoSQL Databases 477Glossary 4819780134023212 TOC 3/27/2015

最近チェックした商品