- Learning Neo4j 3.x(Second Edition)
- Jér?me Baton Rik Van Bruggen
- 214字
- 2021-07-08 09:37:46
Aligning relationships with use cases
One of the ways that you can model for query-ability and let your queries drive your model is by using the different relationship types that you can have between nodes for different use cases. Many great graph database models use multiple relationships between two of the same nodes for different use case scenarios.
One of the reasons why this a recommended best practice is actually applicable and of real use in practical development efforts is that the specialization tax, which is the price that you--as a developer--pay (mostly in terms of added model complexity) to introduce a specific relationship between two nodes for a specific use case, is in fact so low. There are no additional tables or schemas to be created, and to be even more specific, there are no additional joins to be computed. All that happens is that the graph traversals will use different paths to establish their course across the network stored in the database.
A key concept to be kept in mind when aligning relationships with use cases is the naming strategy for your relationship types. The general recommendation is to use as few generic names such as HAS_A or IS_PART_OF as possible, but to be more specific in these naming efforts.
- Web程序設計及應用
- SPSS數據挖掘與案例分析應用實踐
- C# 7 and .NET Core Cookbook
- Python進階編程:編寫更高效、優雅的Python代碼
- Access 2010數據庫基礎與應用項目式教程(第3版)
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- Rust Essentials(Second Edition)
- C語言程序設計
- Java系統化項目開發教程
- Express Web Application Development
- 打開Go語言之門:入門、實戰與進階
- Kubernetes源碼剖析
- Photoshop智能手機APP界面設計
- 從零學Java設計模式
- Python Penetration Testing Essentials