2 ms·
That's great. Now I do a query. Maybe I use a join. If a row has the "0" case of that (0..1):1 relationship, what do I get? Or maybe I don't do a join. May
by AnimalMuppet 9y ago
That's great. Now I do a query. Maybe I use a join. If a row has the "0" case of that (0..1):1 relationship, what do I get?
Or maybe I don't do a join. Maybe I do a separate query. If the query comes back with zero rows, then I... what?
- ErwinSmout 9y agoWhat do I get ? You get what you ask for. Then I ... what ? Then you do what needs to be done as specified by the business in the case the queried piece of information is unknown.
- AnimalMuppet 9y ago> What do I get ? You get what you ask for. In the join case, don't I get a NULL in the row that comes back if there isn't an entry in the other table? Or do I just not get a row? > Then you do what needs to be done as specified by the business in the case the queried piece of information is unknown. Sure, but how do I represent that condition in my software? With a different class/structure? With a flag that indicates that the other field isn't valid? Or with a null? From where I sit, normalization doesn't make the problem go away at all.