title: how to create a data-mart
body: <p>This is my first attempts at creating a data-mart/warehouse and I am a little confused on how to best design the schema.  A background on the project:  I originally created a relational database that captures information about our clients.  A simplified schema is as such:</p>
  
  <pre><code> ClientTbl:
   ID:PK;
   FName:String;
   LName:String;
  
   ClientEDU(one to many)
   ID:PK;
   ClientID:FK;
   SchoolName:String;
   Degree:String;
   GPA:String;
  
   ClientJobs(One to many)
   ID:PK;
   ClientID:FK;
   OrganizationName:string;
   Industry:String;
   StartDate:Date;
   EndDate:Date;
   Salary:double;
   CityLocation: String;
  </code></pre>
  
  <p>This is a simplified example.  In reality I have several more tables holding thousands of records.  When ever I want to run queries on these tables, it can be very time consuming.  I seems like creating a data-mart would help.  This way, we could run an update to the data mart, which would be time consuming, nightly.  Then have the queried data in our DM that would be fast to query.  I'm just having a hard time on how to best design the schema.  Example question I would like to have answered in the data mart, based on the example tables above, is this:</p>
  
  <pre><code> % of clients that attend each school in our db
   % that have each degree in our db
   Avg salary of client
   Avg length of stay at a job
   % of clients that worked in each city, that is found in the db
  </code></pre>
  
  <p>From my reading, I know that the fact table would contain all the calculated values (avg salary, length, etc) and each dimension would contain data (jobs or education) but i dont understand how they are tied together.  Would my fact table have a row for each client? Just one row?  </p>
  
  <p>Any help would be great</p>
  
  <p>thanks</p>