Best way to model Client to ClientAddress list with external ClientAddress references
13 views
Skip to first unread message
billba...@hotmail.com
unread,
Mar 2, 2012, 7:41:19 PM3/2/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ravendb
I have the following scenario.
I have a Client entity associated to a list of ClientAddresses.
From an aggregate modeling perspective, it would be preferable to have
the list of ClientAddresses contained within the Client document.
There are also various other entities that will require a reference to
a specific ClientAddress. For example, storing the ClientAddress as a
user selection for the address where a Client received a service.
Denormalization really isn't an option as the ClientAddresses will
change often.
Questions:
Can I/should I store the ClientAddress list inside of the Client and
somehow generate unique ids for the collection items and so also
across all ClientAddress lists that can be persisted in the various
other entities?
Or should the ClientAddresses stored as a separate document that
references its Client document? The document keys can be persisted to
the external entities. In general this approach is more difficult to
access the ClientAddress list for query etc.
Concerning the external references to ClientAddress in various other
entities. If the ClientAddress lists can be effectively stored in each
Client can the be efficiently queried for across multiple Clients?
Is there a better approach than the 2 outlined? Meaning, Internal
ClientAddress list or External ClientAddress list?
billba...@hotmail.com
unread,
Mar 3, 2012, 11:55:44 AM3/3/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ravendb
Adding with respect to the requirement to look up a specific address
were each Client contains its own list of ClientAddresses, that there
will be approx. 5000 Clients each with 2 to 3 ClientAddresses.