Click here to Skip to main content
14,302,838 members
   

Database

 
QuestionMongoDB document or model planning, best Pin
jkirkerx23-Aug-18 13:38
professionaljkirkerx23-Aug-18 13:38 
AnswerRe: MongoDB document or model planning, best Pin
jschell23-Aug-18 14:35
memberjschell23-Aug-18 14:35 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:49
professionaljkirkerx24-Aug-18 6:49 
GeneralRe: MongoDB document or model planning, best Pin
jschell25-Aug-18 3:57
memberjschell25-Aug-18 3:57 
AnswerRe: MongoDB document or model planning, best Pin
lw@zi 23-Aug-18 20:45
professional lw@zi 23-Aug-18 20:45 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:50
professionaljkirkerx24-Aug-18 6:50 
GeneralRe: MongoDB document or model planning, best Pin
jschell25-Aug-18 4:00
memberjschell25-Aug-18 4:00 
AnswerRe: MongoDB document or model planning, best Pin
Nathan Minier24-Aug-18 1:31
professionalNathan Minier24-Aug-18 1:31 
Disclaimer: this approach is rooted in Domain Driven Design, which is a common approach to NoSQL structuring. This is a super-rough look at entities vs value types in DDD.

I'm generally in agreement with @lw@zi, but it depends on your use case of states. If a data structure needs to be a domain-level entity, or is going to be directly referenced by multiple domain models, then it should have it's own store; otherwise it should be nested in a parent; it really has nothing to do with how much data is being tracked by an individual data structure.

If you will only ever present states in conjunction with countries, such as form fields and address resolution, without additional selection vectors then there is no reason to make it a reference and give it its own table.

If states are important on their own in the domain model or if multiple vectors might be used to access the data, such as if you have references to specific state agencies (NY DMV vs NC DMV, etc.), then you should make it a reference.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor

GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 6:58
professionaljkirkerx24-Aug-18 6:58 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 9:16
professionaljkirkerx24-Aug-18 9:16 
GeneralRe: MongoDB document or model planning, best Pin
Nathan Minier24-Aug-18 9:28
professionalNathan Minier24-Aug-18 9:28 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx24-Aug-18 10:07
professionaljkirkerx24-Aug-18 10:07 
GeneralRe: MongoDB document or model planning, best Pin
jschell25-Aug-18 4:03
memberjschell25-Aug-18 4:03 
GeneralRe: MongoDB document or model planning, best Pin
jkirkerx25-Aug-18 8:12
professionaljkirkerx25-Aug-18 8:12 
GeneralRe: MongoDB document or model planning, best Pin
jschell16-Sep-18 11:00
memberjschell16-Sep-18 11:00 
QuestionOrders and Supply Pin
Member 1098931222-Aug-18 19:41
memberMember 1098931222-Aug-18 19:41 
QuestionWhat do you think of MongoDB? Pin
jkirkerx13-Aug-18 13:14
professionaljkirkerx13-Aug-18 13:14 
AnswerRe: What do you think of MongoDB? Pin
Eddy Vluggen14-Aug-18 0:46
mveEddy Vluggen14-Aug-18 0:46 
GeneralRe: What do you think of MongoDB? Pin
jkirkerx14-Aug-18 7:00
professionaljkirkerx14-Aug-18 7:00 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen14-Aug-18 7:10
mveEddy Vluggen14-Aug-18 7:10 
GeneralRe: What do you think of MongoDB? Pin
jkirkerx14-Aug-18 8:44
professionaljkirkerx14-Aug-18 8:44 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen14-Aug-18 8:58
mveEddy Vluggen14-Aug-18 8:58 
GeneralRe: What do you think of MongoDB? Pin
jkirkerx14-Aug-18 13:41
professionaljkirkerx14-Aug-18 13:41 
GeneralRe: What do you think of MongoDB? Pin
Eddy Vluggen14-Aug-18 23:08
mveEddy Vluggen14-Aug-18 23:08 
GeneralRe: What do you think of MongoDB? Pin
jkirkerx15-Aug-18 7:30
professionaljkirkerx15-Aug-18 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.