Which of the following two models makes more sense? I'm leaning towards the first one because there can only be one default child.The examples are in C# but I think it can apply to other languages too.Here DefaultChild holds one of the items in Children.class Parent{    int ID { get; set; }    Child DefaultChild { get; set; }    IEnumerable<Child> Children { get; set; }}class Child{    int ID { get; set; }}Here one of the items in Children has Default set to true while the others have it set to false.class Parent{    int ID { get; set; }    IEnumerable<Child> Children { get; set; }}class Child{    int ID { get; set; }    bool Default { get; set; }}A concrete situation: a User in our system has one or more Customers attached. When logging in, if said User has a default Customer, they are immediately working under this Customer. If they don't, they have to select a Customer to work under. While logged in, they can switch between Customers.
Should a Parent with Children have a DefaultChild, or should a Child have a Default property?
c#;modeling
In your specific scenario, a Parent should have a DefaultChild. The problem with giving a child an IsDefault property is that it A) allows for Parents with multiple default children and B) disallows Parents of the same child to have different settings for their child. The fact that neither of these scenarios can actually happen is irrelevant; both scenarios logically make sense, despite not at all matching your intentions.From a high level perspective, it makes more sense to talk about the Default child of a parent than to say a particular child is inherently a default. 