Search the Community
Showing results for tags 'normalization'.
-
I am still trying to fully comprehend table normalization and I'm not asking anyone to explain it bc it's not a simple thing to explain. But I'm working on a football website that tracks players stats each week (catches, yards and touchdowns) and it seems like setting it up this way would make it the easiest (maybe laziest?) to retrieve data to display wherever I want... tablecalled players with these fields: playerid playerfirstname playerlastname week1catches week1yards week1touchdowns week2catches week2yards week2touchdowns ... and so on 17 times till... ... week17catches week17yards week17touchdowns I know that is likely making most of you want to puke but if doing it this way makes it extremely easy to pull this info for display on the site, why is it so wrong? Is the problem that it's much slower than what I THINK is the proper way, ie... table called players with these fields: playerid playerfirstname playerlastname AND table called stats with these fields: playerid week catches yards touchdowns Again, not asking for an explanation of normalization, just if anyone has any quick reasons why the first way is as god awful as I fear it is, I'd appreciate the knowledge. Thanks!
-
I realized that it's much more easier and protocol to have multiples tables rather than one table. I'm guessing it's much more easier to have a column for different values than combining it in one column. My question is what if I am designing a page that has a fixed info and I will always need to pull those info together. For example I have a column called T-Shirt Colors under the table CLOTHES. I would then store the value "Red - Blue - Green - Yellow - Orange - Pink - Dark Red " etc. and let's say that column value will have a very long string since it will contain over 1,000 colors. I know for SURE that these are the only colors my store will sell so I don't have to worry about adding or deleting the colors... Would it be more efficient on the overhead and server speed to do it this way and then explode the colors into a list...Or is it better to create 1000 columns for each color... Also if it is more efficient to explode the values (even though it's harder to maintain) on the overhead and server speed, approximately how many more times is it it more efficient.. 1X faster, 2X faster, 3X faster, etc. or maybe too little to be even notice? Thanks in advance (keep in mind that these 1,000 colors are always going to be used together... Since they will always be pulled and used together to give the customer the color options to select from...)