Case Study 3 - Group06
Case Study 3 - Group06
SYSTEM INTERGRATION
Member:
Group: 06 – CS445 SA
1|Page
TABLE OF CONTENT
PROJECT IMPLEMENTATION.........................................................................................3
1. Determine goals.....................................................................................................3
2. Scope......................................................................................................................3
3. CEO's request........................................................................................................4
3.1. Problem.................................................................................................................4
Employees Table.........................................................................................................8
Departments Table.....................................................................................................8
Positions Table............................................................................................................9
Payroll Table...............................................................................................................9
LeaveDays Table.........................................................................................................9
Benefits Table............................................................................................................10
PerformanceReviews Table......................................................................................11
Alerts Table...............................................................................................................11
Projects Table............................................................................................................11
EmployeeProjects Table...........................................................................................12
Shareholder Table.....................................................................................................12
Employees Table.......................................................................................................13
Dayoff Table..............................................................................................................14
Branch Table.............................................................................................................16
Locations Table.........................................................................................................16
2|Page
Department Table.....................................................................................................16
Position Table............................................................................................................16
Salary Table...............................................................................................................17
Attendance Table......................................................................................................17
Payroll Table.............................................................................................................18
3|Page
PROJECT IMPLEMENTATION
1. Determine goals
The goal is to develop a dashboard that integrates the existing Human
Resources (HR) and Payroll systems to provide summarized and detailed information
about employees. This will improve efficiency, enable timely management decisions,
and set alerts for specific events.
2. Scope
- Data Extraction:
- Data Transformation:
- Data Loading:
4|Page
Restricted Data Requests: The current systems limit the types and
amounts of information the CEO can ask for.
Delayed Decisions: The lack of timely information impacts the CEO's
ability to make prompt management decisions.
- Lack of Proactive Management
Reactive Problem Detection: Issues are often discovered too late, instead of
being addressed proactively.
No Exception Management: The current systems do not allow for
management by exception, such as highlighting specific conditions or
events.
- Growing Information Needs
Rapid Company Growth: The company's quick growth increases the need
for timely information for senior managers.
Critical Information Delivery: The need for accurate and up-to-date
information is becoming more critical for effective management.
- Specific Needs Highlighted
Summary Information: Senior managers need summarized data on earnings,
vacation days, and benefits.
Alerts and Notifications: Management needs alerts for key events such as
hiring anniversaries, vacation day accumulation, benefits changes, and
birthdays.
Drill-Down Capability: The ability to see detailed information behind the
summaries.
Future Adaptability: The system should be flexible to accommodate future
information needs.
5|Page
Combine data from the HR and Payroll systems to streamline information
retrieval.
- Dashboard Development
Develop a dashboard for senior managers to view summarized information
about employees.
Ensure the dashboard allows "drill down" capabilities to see details behind
summary information.
- Summarized Information to be Displayed
Total Earnings:
By benefits plan.
7|Page
- Specific description
Employees Table
8|Page
Column Name Data Type Constraints Description
Date the employee was
HireDate DATE
hired
Identifier of the
DepartmentID INT FOREIGN KEY department the employee
belongs to
('Shareholder',
Shareholder status of the
ShareholderStatus NVARCHAR(50) 'Non-
employee
Shareholder')
Identifier of the employee's
PositionID INT FOREIGN KEY
position
Identifier of the employee's
Supervisor NVARCHAR(50)
supervisor
Total days off taken by the
TotalDayoff INT
employee
Total earnings of the
TotalEarning DECIMAL(15, 2)
employee
Contact information of the
ContactInfo VARCHAR(100)
employee
Departments Table
Positions Table
Payroll Table
LeaveDays Table
Benefits Table
10 | P a g e
Column Name Data Type Constraints Description
benefit record
EmployeeID INT FOREIGN KEY Identifier of the employee
BenefitType NVARCHAR(50) Type of benefit
BenefitAmount DECIMAL(10, 2) Amount of the benefit
Date when the benefit
EffectiveDate DATE
becomes effective
11 | P a g e
PerformanceReviews Table
Alerts Table
Column
Data Type Constraints Description
Name
AlertID INT PRIMARY KEY Unique identifier for each alert
AlertType NVARCHAR(50) Type of alert
Identifier of the employee (if
EmployeeID INT FOREIGN KEY
applicable)
AlertDate DATE Date of the alert
('Active',
AlertStatus NVARCHAR(50) Status of the alert
'Inactive'))
Projects Table
12 | P a g e
Column Name Data Type Constraints Description
Budget allocated for the
Budget DECIMAL(15, 2)
project
Identifier of the department
DepartmentID INT FOREIGN KEY
responsible for the project
EmployeeProjects Table
Shareholder Table
Column Data
Constraints Description
Name Type
Unique identifier for each
ShareholderID INT PRIMARY KEY
shareholder
EmployeeID INT FOREIGN KEY Identifier of the employee
Number of shares owned by the
SharesOwned FLOAT NOT NULL
employee
13 | P a g e
o DayOff(DayOffID, EmployeeID, StartDate, EndDate, Hourss,
Statuss, ApproverID)
o Branch(BranchID, BranchName, BranchManager, LocationID)
o Locations(LocationID, StreetAddress, Postcode, City)
o Department(DepartmentID, DepartmentName)
o Position(PositionID, PositionName, BasicSalary)
o Salary(SalaryID, BasicSalary, Allowances, deduction, NetSalary)
o Attendance(AttendanceID, EmployeeID, Date, Status)
o Payroll(PayrollID, EmployeeID, SalatyID, PayDate)
- Relationship
- Specific Desciption
Employees Table
14 | P a g e
Column Name Data Type Constraints Description
KEY employee
FirstName VARCHAR(50) Employee's first name
LastName VARCHAR(50) Employee's last name
DateOfBirth DATE Employee's date of birth
Employee's gender (single
Gender CHAR(1)
character)
Ethnicity NVARCHAR(40) Employee's ethnicity
Indicates if the employee is full-
FullTime BIT
time
TotalEarning FLOAT Total earning of the employee
DayOffID DATE Date of employee's day off
AverageBenefit Average benefits received by the
FLOAT
s employee
Address VARCHAR(100) Employee's address
Phone VARCHAR(20) Employee's phone number
Email VARCHAR(50) Employee's email address
Date when the employee was
HireDate DATE
hired
Identifier of the branch the
BranchID NVARCHAR(40) FOREIGN KEY
employee belongs to
Identifier of the department the
DepartmentID INT FOREIGN KEY
employee belongs to
Identifier of the position the
PositionID INT FOREIGN KEY
employee holds
Dayoff Table
Column
Data Type Constraints Description
Name
PRIMARY
DayOffID DATE Date of the day off
KEY
Identifier of the employee taking
EmployeeID INT FOREIGN KEY
the day off
StartDate DATE Start date of the day off
15 | P a g e
Column
Data Type Constraints Description
Name
EndDate DATE End date of the day off
Hourss TIME Duration of the day off
Status of the day off (e.g.,
Statuss NVARCHAR(40)
approved, pending)
Identifier of the approver of the
ApproverID NVARCHAR(40)
day off
16 | P a g e
Branch Table
Locations Table
Department Table
Position Table
Column
Data Type Constraints Description
Name
PositionID INT PRIMARY KEY Unique identifier for each position
PositionName VARCHAR(50) Name of the position
BasicSalary DECIMAL(10, 2) Basic salary for the position
17 | P a g e
18 | P a g e
Salary Table
Column
Data Type Constraints Description
Name
PRIMARY Unique identifier for each salary
SalaryID INT
KEY record
EmployeeID INT FOREIGN KEY Identifier of the employee
Month INT Month of the salary
Year INT Year of the salary
DECIMAL(10,
BasicSalary Basic salary amount
2)
DECIMAL(10,
Allowances Allowances received
2)
DECIMAL(10,
Deductions Deductions from the salary
2)
DECIMAL(10,
NetSalary Net salary after deductions
2)
Attendance Table
19 | P a g e
Payroll Table
Column
Data Type Constraints Description
Name
Unique identifier for each payroll
PayrollID INT PRIMARY KEY
record
EmployeeID INT FOREIGN KEY Identifier of the employee
Identifier of the salary associated with
SalaryID INT FOREIGN KEY
the payroll
PayDate DATE Date of the payroll
This model use an application to handle 2 database and provide information for
CEO. Two database is not concentrate. When CEO require an information,
application will get the results from two database and return to CEO dashboard.
Example, when CEO require to see some information about salary of an employee,
application will query to Payroll database and return result to CEO dashboard. And
20 | P a g e
when CEO send another require to see the history job of an employee, application
will query to Human Resource database and return result to dashboard
6.2. Architecture 2
In data integration model 2, two database will integrated to a Main database without lost
any data. We will choose solution that build a new database that base on current 2
database and on requirement from CEO. Application will not need to connect to 2 other
database. Instead, when CEO have require to some information about salary or employee
information, application will query to new database and then return to CEO dashboard the
results.
21 | P a g e
enabling the CEO to easily access comprehensive insights and facilitating data-driven
decision-making.
The data integration model will ensure that data is synchronized between the existing
systems and the new database, minimizing the risk of inconsistencies. The operational
constraints document will provide clear guidelines for maintaining data integrity and
ensuring the smooth operation of the integrated system.
23 | P a g e
HireDate LastName LastName
Address Gender Gender
Phone BirthDate BirthDate
Email Ethnicity Ethnicity
Role HireDate HireDate
ShareholderID Address Address
SharesOwned Phone Phone
ShareholderStatus Email Email
PayrollID ShareholderID EPTypeID(fk)
PayDate SharesOwned DepartmentID(fk)
SalaryAmount ShareholderStatus PositionID(fk)
Tax PayrollID SalaryID(fk)
Bonuses PayDate ReviewID(fk)
Deductions SalaryAmount AlertID(fk)
AttendanceID Tax BenefitID(fk)
Date Bonuses LeaveID(fk)
Status Deductions BranchID(fk)
AttendanceID ShareholderID
Date SharesOwned
Shareholder
Status ShareholderStatus
EmployeeID(fk)
PayrollID
PayDate
SalaryAmount
Tax Payroll
Bonuses
Deductions
EmployeeID(fk)
AttendanceID Attendance
Date
24 | P a g e
Status
EmployeeID(fk)
ReviewID ReviewID ReviewID
ReviewDate ReviewDate ReviewDate
Reviewer Reviewer Reviewer PerformanceReviews
Score Score Score
Comments Comments Comments
SalaryID SalaryID SalaryID
BasicSalary BasicSalary BasicSalary
Allowances Allowances Allowances Salary
Deductions Deductions Deductions
NetSalary NetSalary NetSalary
AlertID AlertID AlertID
AlertType AlertType AlertType
Alerts
AlertDate AlertDate AlertDate
AlertStatus AlertStatus AlertStatus
BenefitID BenefitID BenefitID
BenefitType BenefitType BenefitType
Benefits
BenefitAmount BenefitAmount BenefitAmount
EffectiveDate EffectiveDate EffectiveDate
LeaveID LeaveID LeaveID
LeaveType LeaveType LeaveType LeaveDays
LeaveDuration LeaveDuration LeaveDuration
25 | P a g e
7.3. Create table relationships
Position Table
Departments Table
26 | P a g e
Field name Data Type Description Note
DepartmentID int Identifier for the Primary key, not
department. null
DepartmentName Varchar(100) Name of the position. Not null
Projects Table
Locations Table
Branch Table
EmploymentType Table
Employees Table
Salary Table
28 | P a g e
Field name Data Type Description Note
SalaryID Int Identifier for the salary Primary key
BasicSalary Decimal(18,2) Basic salary amount. Not null
Allowances Decimal(18,2) Allowances amount. Not null
Deductions Decimal(18,2) Deductions amount.
NetSalary Decimal(18,2) Net salary amount.
Payroll Table
Shareholder table
Alerts Table
Benefits Table
29 | P a g e
Field name Data Type Description Note
BenefitID int Identifier for the benefit. Primary key
BenefitType Varchar(100) Type of the benefit. Not null
BenefitAmount Decimal(18,2) Amount of the benefit. Not null
EffectiveDate date Effective date of the
benefit.
LeaveDays Table
Attendance Table
30 | P a g e
Extract data from one or more sources.
Transform the data into the desired format.
Load the data into a destination, typically a data warehouse.
● Change Data Capture (CDC):
Identify and capture changes made to data in the source database.
Apply these changes to the target database.
Ensures that changes are tracked and propagated in real-time or near real-time.
● Two-Way Synchronization:
Allows data updates on both the source and destination databases.
Changes are synchronized between the two databases, ensuring consistency.
● Cloud-Based Solutions:
Utilize managed data synchronization services provided by cloud platforms.
Reduce the burden of infrastructure management.
8.2. Introducing the tools
Delta Lake, often referred to as SQL Delta, is a robust open-source storage
layer designed to enhance the reliability and performance of data lakes. It brings the
power of ACID (Atomicity, Consistency, Isolation, Durability) transactions to big
data environments, ensuring data integrity and consistency even during concurrent
read and write operations. Built on top of Apache Spark, Delta Lake seamlessly
integrates batch and streaming data processing, allowing users to handle real-time
data and perform historical queries through its innovative time travel feature. This
capability to manage and query previous versions of data provides a significant
advantage in data auditing, error recovery, and reproducibility of experiments.
31 | P a g e
Step 1: Prepare database
HR Department database
32 | P a g e
Step 2: Setup HR Department database and data intergration on SQL Delta
33 | P a g e
34 | P a g e