Individual Vertex per property or Vertex with grouped properties

I'm building an identity graph that also stores User profile data - things like email address, phone number, address, company information, etc. Is there a generally accepted best practice for whether to store those attributes in their own vertex or group them in a vertex? The graph is part of a transactional system that will need to retrieve a complete user profile,
2 Replies
triggan
triggan15mo ago
A lot of this will really depend on the underlying storage implementation for the database that you're using and what is most efficient in terms of optimizing how data is accessed. That being said, a good starting point is to build a "naive" data model based on the data attributes that you have available and then start to ask questions of that model in natural language form. If you can easily grok how you would traverse that data model to retrieve your answers, then writing queries should be fairly simple. If not, then you may need to adjust the data model to make query expression easier. Not until after that point do you start evaluating query performance and potentially modifying your data model to be more efficient for storage access (taking advantage of indexes, or building the data model to eliminate data access when unnecessary).
dmcmanus
dmcmanusOP15mo ago
Thank you for your response, that's very helpful information.
Want results from more Discord servers?
Add your server