A lot of times the rows that make up the body of an "order" are not column compatible. Even in the case of an ordinary grocery tab, you have things sold by weight and things sold by the piece. So you need a column for "weight" and a column for "$/weight" when you ring up a half-pound of hamburger, but you don't when you ring up the package of hamburger buns. And if you start including payments, discounts, and other things, the incompatibility of the columns only grows.
How do you deal with that? Do you follow normalization rules and wind up with separate tables for groceries, meat and produce, payments, discounts, etc? And do you then join them so they can be displayed in a single chronological list?
Or is this a valid case for denormalizing, so you put everything in one table and deal with the column differences programmatically?
Thanks for any input!
How do you deal with that? Do you follow normalization rules and wind up with separate tables for groceries, meat and produce, payments, discounts, etc? And do you then join them so they can be displayed in a single chronological list?
Or is this a valid case for denormalizing, so you put everything in one table and deal with the column differences programmatically?
Thanks for any input!