Hacker News new | past | comments | ask | show | jobs | submit login

The problem is that you will want to query all persons with (say) a particular name regardless of the zing, and maybe join it with some related table (say, Address), but still want (as the client application) to receive the zing values. To represent the result with a single relation, you need (in the result) nullable fields for left zing and right zing, and then it makes more sense to have those in Person in the first place (plus a constraint that they are exclusive). The only alternative would be that the client receives several on-the-fly created relations as the result (i.e. LeftPersonsWithAddress and RightPersonsWithAddress), but then what about a sorted result? E.g. the client may want all resulting PersonsWithAddress sorted by ZIP code.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: