Appreciate advice on Database setup
Posted: Thu Apr 21, 2011 4:04 pm
Hi everyone
I am hoping someone could give me advice on how to best set up my database. I am new to mysql and have a few tutorial books and also have been searching on line however I can't find anything definitive.
The data the db is meant to hold is data from Google Adwords and will consist of the following:
- Date
- Campaign
- Adgroup
- Clicks
- Impressions
- Cost
- Conversions
As far as the datatypes are concerned I am fairly sure I know what to use. Perhaps the only one I'm unsure of is for the cost, whether to use decimal or float? The cost can be in the £thousands.
My more pressing concern is the adgroup. A lot of tutorials I have read talk about setting up a database for customers where there is a first name, last name, address etc and I can follow this no problem. However for the adgroups the structure of them is not quite as straight forward.
They are structured in the following manner: Client-G-S-Campaign-Adgroup Specifics. So for example FER-G-S-GBUK-HIGH. This shows the client name FER, G for Google, S for Search, GBUK as the campaign, and then HIGH for high cost keywords. Now in this campaign there may be a LOW adgroup, (so the same structure but LOW at the end), MID or to complicate things further, MID-P&S (meaning MID cost adgroups, P&S is Peel & Stick where you isolate one well performing keyword).
There are hundreds of these adgroups of varying lengths (and clients etc) and this makes my current database (which houses all the data in one table) inefficient. However I am unsure on the best way to segment the data in order to achieve joins (which I think would be more efficient).
As always, I would be very grateful for someone to point me in the right direction.
Kind regards
Peter
I am hoping someone could give me advice on how to best set up my database. I am new to mysql and have a few tutorial books and also have been searching on line however I can't find anything definitive.
The data the db is meant to hold is data from Google Adwords and will consist of the following:
- Date
- Campaign
- Adgroup
- Clicks
- Impressions
- Cost
- Conversions
As far as the datatypes are concerned I am fairly sure I know what to use. Perhaps the only one I'm unsure of is for the cost, whether to use decimal or float? The cost can be in the £thousands.
My more pressing concern is the adgroup. A lot of tutorials I have read talk about setting up a database for customers where there is a first name, last name, address etc and I can follow this no problem. However for the adgroups the structure of them is not quite as straight forward.
They are structured in the following manner: Client-G-S-Campaign-Adgroup Specifics. So for example FER-G-S-GBUK-HIGH. This shows the client name FER, G for Google, S for Search, GBUK as the campaign, and then HIGH for high cost keywords. Now in this campaign there may be a LOW adgroup, (so the same structure but LOW at the end), MID or to complicate things further, MID-P&S (meaning MID cost adgroups, P&S is Peel & Stick where you isolate one well performing keyword).
There are hundreds of these adgroups of varying lengths (and clients etc) and this makes my current database (which houses all the data in one table) inefficient. However I am unsure on the best way to segment the data in order to achieve joins (which I think would be more efficient).
As always, I would be very grateful for someone to point me in the right direction.
Kind regards
Peter