码迷,mamicode.com
首页 > 其他好文 > 详细

Neo4j:Data Model Transformation:From Relation To Graph

时间:2015-05-23 12:54:42      阅读:89      评论:0      收藏:0      [点我收藏+]

标签:

Here are some tips that help you with the transformation:

  • Each entity table is represented by a label on nodes
  • Each row in a entity table is a node
  • Columns on those tables become node properties.
  • Remove technical primary keys, keep business primary keys
  • Add unique constraints for business primary keys, add indexes for frequent lookup attributes
  • Replace foreign keys with relationships to the other table, remove them afterwards
  • Remove data with default values, no need to store those
  • Data in tables that is denormalized and duplicated might have to be pulled out into separate nodes to get a cleaner model.
  • Indexed column names, might indicate an array property (like email1, email2, email3)
  • Join tables are transformed into relationships, columns on those tables become relationship properties

Neo4j:Data Model Transformation:From Relation To Graph

标签:

原文地址:http://www.cnblogs.com/happyframework/p/4523944.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!