Page 1 of 1

A newbie question

Posted: Thu Feb 23, 2006 4:10 pm
by jontas
Although this is a real newbie question, I think a little guidence is all I need to get going on my own..

I'm designing a program to track and analyize budget allocations for multiple projects across multiple categories. For example:
Project 1: New York
Categories: Print, TV, Radio, etc.

Project 2: Los Angeles
Categories: Print, TV, (can be same as project 1)

Within each category is multiple campaigns, for exmaple, in TV for New York:
ABC
NBC
etc.

And within each campaign are multiple data I need to track:
ABC Coupons: ABC1, ABC2
ABC Coupon uses: ABC1 had 10 uses, ABC2 had 20 uses

How do I structure my DB to contain all this data. I'm having some trouble wrapping my head around it.. for example, do I need a DB for each project and a table for each category with a field for each campaign? Or can I use 1 db with a table for each project, a field for each category... and then.. what?

Thanks for your help,

Jon

Posted: Thu Feb 23, 2006 5:32 pm
by feyd
Here's what I can see

Basic Tables
Projects
Categories
Campaigns
Coupons

Basically, you have a table for each "type" of data you have, in a general sense, not necessarily specific.

Then there are linking tables when there is many-to-many relationships between types. For instance, between Projects and Categories, there can be many Projects that are associated with many Categories.

Something to research:
http://en.wikipedia.org/wiki/Database_normalisation

Thanks!

Posted: Thu Feb 23, 2006 7:48 pm
by jontas
I knew there was a word for what I needed to do, but due to my lack of experience I would have never come across normalization. I'll look into it immediately--thanks for your help!

Jon