Tables

Oct 26, 2011 23:52


A coding project I’ve been working on involves some database work. I can’t exactly tell you what I’m coding, but I need some advice from anyone who has any to give ;)

I have two tables, table A and table B. Let’s say table A contains the categories of canned foods (fruit, beans, etc) and table B are the transactions (ie: purchase info). Of course when you insert into table B, you rely on table A’s data.

Initially, I wanted to insert the data of A into B as fixed, one time strings (ie: insert the word fruit into the field canned_food_category). The next day or so, i decided that it was better to put in the category id instead of the category string name. Today, I feel that the initial idea was better because the data in table A can change…what do you think?

LiveJournal Tags: current trail of thought
Previous post Next post
Up