2) In data warehousing (DW), "dimensions" are ways the data is spliced and diced, and "facts" are the data of interest. So for a typical commercial sales DW database there may be dimensions such as "country", "state", "department", "financial year", "quarter", and facts such as "number_of_sales", "sales_value", "profit_amount", "percentage_profit" or whatever. There will typically be a value of each fact for each valid combination of dimensions - e.g. (country:US, state:Texas, department:Books, year:2007, quarter:2, number_of_sales:247).
Are you dealing with a particular database system? From my understanding of "Data Warehousing" it's all about utilising data effectively to give the right reports/output (i.e. with meaning), however I think we need to help determine what you actually mean by dimensions and facts.
(imagine that you're talking abuot a big grid of data)
From your descriptions you are implying that your facts are columns, three of which are aaaemployee, abcemployee, and defemployee, however I suspect these are rows (actual data line by line). As for dimensions, i'm not quite sure what you mean.
I picture it a little like this (grid):
TABLE (GRID) NAME : employeedimension
COLUMN NAMES => | employeeskey | sex | salary
ROW DATA | aaaemployee | MALE | 23000
ROW DATA | abcemployee | FEMALE | 34231
ROW DATA | defemployee | MALE | 23423
AAAAAH, just seen Pat's post. I think I understand what is meant by dimensions now, you mean "meaningful" groupings. Like salary information about the male and female group divisions, or by department.
Exactly! The example that I posted is grossly simplified, but it gets the important ideas across... While the individual items might still exist in the fact tables, they are lost in the "dimensional perspective".
I like to think of the fact tables as irregular three dimensional shapes, kind of like a cloud in the sky. The database dimensions are like the X, Y, and Z dimensions in space. You can logically "slice" the cloud in my example above by sex or department.
In "real world" conditions, even the fact tables are usually agregates to some extent (the data from the OLTP system gets aggregated into the fact tables), then the dimensions within the datawarehouse (DW) are used to further aggregate the data in the fact tables. This basically allows the DW to aggregate the data and store those aggregates on disk to allow dramatically faster high level queries because the data gets pre-aggregated once instead of being aggregated every time a user requests it.