1. 首页
  2. 数据库
  3. 其它
  4. GraphDatabases

GraphDatabases

上传者: 2019-05-13 16:20:12上传 PDF文件 9.17MB 热度 10次
graph-databases-connected-data.pdf ,图数据库Graph Databasesby Ian Robinson, Jim Webber, and Emil EifremCopyright O 2015 Neo Technology, Inc. All rights reservedPrinted in the United states of americaPublished by O reilly Media, Inc, 1005 Gravenstein Highway North, Sebastopol, CA95472OReilly books may be purchased for educational, business, or sales promotional use. Online editions arealsoavailableformosttitles(http://safaribooksonline.com).Formoreinformationcontactourcorporateinstitutionalsalesdepartment800-998-9938orcorporate@oreilly.comEditor: Marie BeaugureauInterior Designer: David FutatoProduction editor: Kristen brownCover Designer: Ellie VolckhausenProofreader: Christina edwardsIllustrator: rebecca demarestIndexer: Word Co Indexing ServicesJune 2013First editionJune 2015:Second editionRevision History for the Second Edition2015-05-04: First ReleaseSeehttp://oreilly.com/catalog/errata.csp?isbn=9781491930892forreleasedetailsThe o reilly logo is a registered trademark of o reilly media, Inc. graph databases, the cover image of anEuropean octopus, and related trade dress are trademarks of O Reilly Media, IncWhile the publisher and the authors have used good faith efforts to ensure that the information andinstructions contained in this work are accurate, the publisher and the authors disclaim all responsibilityfor errors or omissions, including without limitation responsibility for damages resulting from the use ofor reliance on this work. Use of the information and instructions contained in this work is at your ownrisk. If any code samples or other technology this work contains or describes is subject to open sourcelicenses or the intellectual property rights of others, it is your responsibility to ensure that your usethereof complies with such licenses and/ or rights978-1-491-93200-1ILSITable of contentsForewordPreface1. ntroduction鲁鲁What Is a graph?A High-Level View of the Graph SpaceGraph databasesGraph Compute EnginesThe Power of Graph DatabasesPeerformanceFlexibility14578899gilitySummar2. Options for Storing Connected Data...................... 11Relational Databases Lack relationshipsNOSQL Databases Also Lack Relationships15Graph databases Embrace relationships18Summary243. Data Modeling with Graphs. ................................................25Models and goals25The Labeled Property Graph ModelQuerying Graphs: An Introduction to Cypher27Cypher Philosophy28MATCHRETURN30Other Cypher clauses31A Comparison of Relational and graph Modeling32Relational Modeling in a Systems Management Domain33Graph modeling in a systems management domain38Testiing the model39Cross-Domain models41Creating the Shakespeare GraphBeginning a Query46Declaring Information Patterns to Find48Constraining MatchesProcessing results50Query Chaining51Common Modeling pitfalls52Email provenance problem domain52A Sensible first iteration52Second Times the Charm5Evolving the domain58Identifying Nodes and RelationshipsAvoiding Anti-Patterns63Summary4. Building a Graph Database ApplicationData modeling65Describe the Model in Terms of the applications Needs66Nodes for Things, Relationships for StructureFine-Grained versus Generic Relationships67Model facts as nodes68Represent Complex Value Types as Nodes71TimeIterative and Incremental Development74Application ArchitectureEmbedded versus server76Clustering81Load Balancing82Testing85Test-Driven Data Model development85Performance Testing91CapacityPlanning5Optimization criteria5PerformanceRedundancy9898iv Table of ContentsImporting and bulk loading data9Initial Import99Batch Import100Summary1045. Graphs in the Real World,105Why Organizations Choose Graph Databases105Common use cases106106Recommendations107108Master Data management109Network and Data Center Management109Authorization and Access Control communications110Real-World Examples111Social Recommendations(Professional Social NetworkAuthorization and access control123Geospatial and logistics132Summary1476. Graph Database Internals.149Native Graph Processing149Native graph storage152Programmatic APIs158Kernel api158Core apI159Traversal framework160Nonfunctional characteristics162Transactions162Recoverability163Availabilit164166ummary1707. Predictive Analysis with Graph TheoryDepth- and Breadth-First Search171Path-Finding with Dijkstra's Algorithm173The a* Algorithm181Graph Theory and Predictive Modeling182Triadic closures182Structural balance184Local bridges188Table of contentsSummary190A. NOSQL Overview.93Index,,211Table of contentsForewordGraphs are Everywhere or the Birth of Graph Databasesas We know themIt was 1999 and everyone worked 23-hour days. At least it felt that way. It seemed likeeach day brought another story about a crazy idea that just got millions of dollars infunding. All our competitors had hundreds of engineers, and we were a 20-ish persondevelopment team as if that was not enough, 10 of our engineers spent the majorityof their time just fighting the relational databaseIt took us a while to figure out why. As we drilled deeper into the persistence layer ofour enterprise content management application, we realized that our software wasmanaging not just a lot of individual, isolated, and discrete data items, but also theconnections between them. And while we could easily fit the discrete data in relationaltables, the connected data was more challenging to store and tremendously slow toquery.Out of pure desperation, my two Neo cofounders, Johan and Peter, and I startedexperimenting with other models for working with data, particularly those that werecentered around graphs. We were blown away by the idea that it might be possible toreplace the tabular SQL semantic with a graph-centric model that would be mucheasier for developers to work with when navigating connected data. We sensed thatarmed with a graph data model, our development team might not waste half its timefighting the databaseSurely, we said to ourselves, we can't be unique here. Graph theory has been aroundfor nearly 300 years and is well known for its wide applicability across a number ofdiverse mathematical problems. Surely, there must be databases out there thatembrace graphs!Well, we Alta Vistad' around the young Web and couldnt find any. After a fewmonths of surveying, we (naively) set out to build, from scratch, a database thatworked natively with graphs. Our vision was to keep all the proven features from therelational database(transactions, ACID, triggers, etc. )but use a data model for the21st century. Project Neo was born, and with it graph databases as we know themThe first decade of the new millennium has seen several world-changing new businesses spring to life, including Google, Facebook, and Twitter. And there is a common thread among them: they put connected data-graphs-at the center of theirbusiness. It's 15 years later and graphs are everywhereFacebook, for example, was founded on the idea that while there's value in discreteinformation about people-their names, what they do, etc -there's even more valuein the relationships between them. Facebook founder Mark Zuckerberg built anempire on the insight to capture these relationships in the social graphSimilarly, Google's Larry Page and Sergey Brin figured out how to store and processnot just discrete web documents but how those web documents are connected. Google captured the web graph, and it made them arguably the most impactful companyof the previous decadeToday, graphs have been successfully adopted outside the web giants. One of the biggest logistics companies in the world uses a graph database in real time to route phys-ical parcels; a major airline is leveraging graphs for its media content metadata; and atop-tier financial services firm has rewritten its entire entitlements infrastructure onNeo4j. Virtually unknown a few years ago, graph databases are now used in industriesas diverse as healthcare, retail, oil and gas, media, gaming, and beyond, with everyindication of accelerating their already explosive paceThese ideas deserve a new breed of tools: general-purpose database managementtechnologies that embrace connected data and enable graph thinking,which are thekind of tools I wish had been available off the shelf when we were fighting the relational database back in 19991 For the younger readers, it may come as a shock that there was a time in the history of mankind when googledidn't exist. Back then, dinosaurs ruled the earth and search engines with names like Alta Vista, Lycos, andExcite were used, primarily to find ecommerce portals for pet food on the InternetI ForewordI hope this book will serve as a great introduction to this wonderful emerging worldof graph technologies, and I hope it will inspire you to start using a graph database inyour next project so that you too can unlock the extraordinary power of graphsGood luck!Emil eifrerCofounder of Neo4j and CeO of Neo TechnologyMenlo park, californiaMay 2013
下载地址
用户评论
码姐姐匿名网友 2019-05-13 16:20:12

这个挺好,zhengzai研究neo4j,谢谢