Posts

Showing posts with the label Data

Products and Brands: A Database Question

Image
I’m trying to consider the best way to organize a data store. Maybe some of my IT friends can shed some light on it. I want a collection of standard household food products. The problem is how to handle different brands or sizes of the same product. Consider rice for example. We usually purchase family size bags of Success Boil-in-Bag white rice. When the grocery store doesn’t have the family size bags, we’ll purchase the normal bags. Occasionally, they don’t have any Success brand rice, so we’ll buy store brand or some other brand. With just white rice, that would be at least four unique items that all serve effectively the same purpose. If I’m going to the grocery store to get rice, I don’t truthfully care what brand or size at the end of the day. Once the rice makes it to the place, I couldn’t care less what the box looks like. I need some way to consolidate each of those records into the same group. UPC as Primary Key At first, I considered making the UPC the primary key and having...

Why CCYY-MM-DD is the Best Date Format

Date formats are not something that many people have any sort of opinion on, but it is something that I find very polarizing and I’ll explain why. The two date formats that I probably see most often are MM-DD-(CC)YY and DD-MM-(CC)YY, with the former being more prominent in the United States and the latter seeming to be the preferred format of European countries and elsewhere in the world. Maybe it aligns with use of the Metric system versus Imperial units, I’m not really certain. Either way, I think both options are terrible. First and foremost, they are terribly ambiguous. Without a definite indicator or a value higher than 12, the month and date could be interchangeable. Take today’s date, for example. September 12, 2018 as I will list it formally, could be represented as 09-12-2018 or 12-09-2018. Let’s not even get into the option of excluding the century from the year, as we all know of the headache that caused with Y2K. Without a clear context, those dates could alternatively ...