I was recently put in charge of a new project for storing our analytics data. I want to give ORM a shot; the mapping doesn’t seem difficult but this problem has me vexed.
This database will store data for Google Analytics, Quantcast, and any future analytics provider. I was pretty much given the schema that needs to be used. They want it to be very general which is possible until I store the matrices as we track different ones for each provider.
The table layout is as such:
tblClient – Stores all the client websites.
tblProfile – 1 or more belong to a client. Stores profile data such as what provider this profile is is using and the profile_type.
tblProvider – Stores data as to whether a profile is a GoogleAnalytics, Quantcast, or other analytics profile.
tblProfile_Type – The type of track for the client site. We have client sites broken down into different sections. That is tracked here.
The problem comes when I need to link the profile table to a metrix table. On this diagram I only have the one for Google but there will be others. I need it to link based on the FK column for Provider_Type in the profile table. Is that possible?