UROOJ
B
275
DATA WAREHOUSING AND MINING
DWM-Lab-Sem-5
Name: Urooj Shaikh
Division: B
Roll No.: 275
Experiment:2
AIM: Implementation of all dimension table and fact table based on experiment 1
case study.
1
UROOJ
B
275
THEORY:
Fact tables and dimension tables hold the columns that store the data for the model:
Fact tables contain measures, which are columns that have aggregations built into their definitions.
For example, Revenue and Units are measure columns.
Dimension tables contain attributes that describe business entities. For example, Customer Name,
Region, and Address are attribute columns.
Fact tables and dimension tables represent the aspects of your business that you want to understand
better. See Components of Data Models.
Before you begin modeling fact tables and dimension tables, make sure that the data that you need to
model is available in the source tables list. Also ensure that you have created any source views upon
which to base model objects.
If you think the list of source objects in the database has changed since you opened Data Modeler,
then you can click Refresh from the Database Actions menu. If the data that you need has not yet been
loaded into the database, then you can load it.
Database Tables:
User Table Database Structure:
user_id(int) – Primary Key Id for the user.
user_name(varchar) Enter the name of the user.
password(varchar) Enter the password of the user.
email_id(varchar) Enter the email_id of the user.
usertype(varchar) Enter the type of user.
2
UROOJ
B
275
Department Table Database Structure:
dept_id(int) – Primary key Id of the Department.
dept_name(varchar) Name of the Department.
3
UROOJ
B
275
Grade Table Database Structure:
grade_id(int) – Primary Key Id of the pay grade.
grade_name(varchar) Name of the pay grade.
grade_short_name(varchar) Short name of the pay grade.
grade_basic(int) Enter the basic amount.
grade_ta(int) The amount of the Travel Allowance.
grade_da(int) The amount of the Dearness Allowance.
grade_hra(int) The amount of the House Rent Allowance.
grade_ma(int) The amount of Medical Allowance.
grade_bonus(int) The amount of bonus received.
grade_pf(int) Amount of Provident Fund to be deducted.
grade_pt(int) Amount of Professional Tax to be deducted.
4
UROOJ
B
275
Employee Table Database Structure:
emp_id(int) – Primary Key Id of the employee.
emp_title(varchar) Enter the title of employee.
emp_name(varchar) Enter the name of employee.
emp_dob(date) Enter the date of birth of employee.
emp_doj(date) Enter the date of join of employee.
emp_address(varchar) Enter the address of the employee.
emp_city(varchar) Enter the city of the employee.
emp_pincode(int) Enter the pincode of the employee.
emp_mobile_no(int) Enter the mobile number of the employee.
emp_state(varchar) Enter the state of the employee.
emp_mail_id(varchar) Enter the mail id of the employee.
emp_pan_no(varchar) Enter the Pan number of the employee.
emp_upload_pan() Enter the pan card image of the employee.
5
UROOJ
B
275
Employee Grade Details Table Database Structure:
transaction_id(int)- Primary Key Unique transaction id.
emp_id(int) Employee id of employee.
emp_dept_id(int) Department Id of employee.
emp_grade_id(int) Grade Id of employee.
emp_from_date(date) Date of join of employee in a department.
emp_to_date(varchar) Last date of an employee in a department.
Employee Salary Details Table Database Structure:
transaction_id(int) -Primary Key Unique primary key.
emp_id(int) Employee Id of employee.
emp_salary_month(varchar) Employee Salary month.
emp_salary_year(varchar) Employee salary year.
emp_salary_eimbursment_date(datetime) The date and time when employee salary was
generated.
emp_dept_id(int) department Id of the employee.
emp_grade_id(int) grade id of the employee
6
UROOJ
B
275
emp_basic(int) Enter the amount of the basic.
emp_da(int) The amount of dearness Allowance.
emp_ta(int) The amount of travel allowance.
emp_hra(int) The amount of House Rent Allowance.
emp_ma(int) The amount of Medical Allowance.
emp_bonus(int) The amount of Bonus.
emp_pf(int) The amount of Provident Fund to be
deducted.
emp_pt(int) The amount of Professional Tax to be
deducted.
emp_gross(int) The gross total received by employee.
emp_total_salary(int) The total salary received after deduction.
Conclusion: Thus all the dimension and fact tables are implemented successfully.