Skip navigation links

MySQL Forums :: Data Warehouse :: Dimensional model, user ids and number of tables


Advanced Search

Re: Dimensional model, user ids and number of tables
Posted by: Mads Jensen ()
Date: June 30, 2009 12:48PM

Thanks for you suggestions.

I have created my fact table, looking like this:

CREATE TABLE IF NOT EXISTS `fact_table` (
`month_key` int(10) unsigned NOT NULL,
`user_id` int(10) unsigned NOT NULL,
`ressource_key` int(10) unsigned NOT NULL,
`group_key` int(10) unsigned NOT NULL,
measures...
PRIMARY KEY (`user_id`,`month_key`,`ressource_key`),
KEY `month_group_key` (`user_id`,`month_key`,`group_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

Any comments on it?

I will create dimensions for ressource_key and group key. I was thinking about using a unix timestamp for the month_key (ie. 10 digit int) or should i use the SQL timestamp?



Edited 4 time(s). Last edit at 06/30/2009 02:26PM by Mads Jensen.

Options: ReplyQuote


Subject Views Written By Posted
Dimensional model, user ids and number of tables 7955 Mads Jensen 06/24/2009 01:07PM
Re: Dimensional model, user ids and number of tables 3841 Rick James 06/25/2009 09:15PM
Re: Dimensional model, user ids and number of tables 3632 Mads Jensen 06/26/2009 07:17AM
Re: Dimensional model, user ids and number of tables 3685 Rick James 06/27/2009 12:24AM
Re: Dimensional model, user ids and number of tables 3605 Mads Jensen 06/30/2009 12:48PM
Re: Dimensional model, user ids and number of tables 3650 Rick James 06/30/2009 10:00PM
Re: Dimensional model, user ids and number of tables 4266 Mads Jensen 07/03/2009 04:20AM
Re: Dimensional model, user ids and number of tables 3518 Rick James 07/03/2009 02:21PM
Re: Dimensional model, user ids and number of tables 3545 Mads Jensen 07/04/2009 03:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.