TPH: Map an Entity hierarchy to a single table.
TPH:映射一个实体层次到单表。
TPT: Map an Entity hierarchy to multiple tables.
TPH:映射一个实体层次到多表。
With this approach, you map an entire class hierarchy into one data entity, where all the attributes of all the classes in the hierarchy are stored.
使用这种方法,您可以将一个完整类层次结构映射成一个数据实体,而层次结构中所有类的所有属性都存储在这个实体中。
Figure 6 presents the updated persistence model for mapping the entire class hierarchy into one data entity.
图6显示了一个更新过的持久性模型,用于将整个类层次结构映射成一个数据实体。
Using one data entity for an entire class hierarchy.
整个类层次结构使用一个数据实体。
Furthermore, I'd be tempted to simply consider the entire hierarchy as one entity for now, since the remaining class, Country, only adds one contract, and frankly it's not all that exciting.
而且,现在我会倾向于把整个层次结构简单地看作一个实体,因为剩余的类Country仅仅添加了一个契约,坦白地说它并不是那样令人兴奋。
Also, the user usually knows exactly what entity they are looking for, yet they are forced to navigate the hierarchy to find it.
而且,用户通常精确地知道他们要用到那个应用,然而却不情愿要浏览整个系统来找到他要的应用。
Also, the user usually knows exactly what entity they are looking for, yet they are forced to navigate the hierarchy to find it.
而且,用户通常精确地知道他们要用到那个应用,然而却不情愿要浏览整个系统来找到他要的应用。
应用推荐