Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
59 views34 pages

Case Study 3 - Group06

Uploaded by

hieu47471029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views34 pages

Case Study 3 - Group06

Uploaded by

hieu47471029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

DUY TAN UNIVERSITY

SYSTEM INTERGRATION

CASE STUDY 3: DATA INTEGRATION

Topic: Integrate Human Resources System And Payroll System

Lecturer: NGUYEN MINH NHAT

Member:

Phan Thị Phước Hạnh – 27201202230

Ngô Trần Khánh Huyền - 27211252865

Nguyễn Văn Lưu – 27211248321

Nguyễn Hồng Minh – 27211202426

Lê Thị Trinh – 27201202314

Group: 06 – CS445 SA

Da Nang, June 2024

1|Page
TABLE OF CONTENT
PROJECT IMPLEMENTATION.........................................................................................3

1. Determine goals.....................................................................................................3

2. Scope......................................................................................................................3

3. CEO's request........................................................................................................4

3.1. Problem.................................................................................................................4

3.2. CEO’s Request.....................................................................................................5

4. Build databases for HR System applications......................................................6

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

5. Build databases for PR System applications....................................................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

6. Choose database integration architecture........................................................18

6.1. Architecture 1.....................................................................................................18

6.2. Architecture 2.....................................................................................................19

7. Integrated database design................................................................................20

7.1. Design integrated database schema............................................................20

7.2. Standardize the integrated database..........................................................21

7.3. Create table relationships............................................................................24

8. Synchronize databases across the entire system..............................................28

8.1. Learn the technologies.................................................................................28

8.2. Introducing the tools....................................................................................29

8.3. Test results (choose 1 tool to perform)........................................................29

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:

 Extract employee information (e.g., name, department, gender, ethnicity,


employment status) from the HR system.
 Extract payroll data (e.g., total earnings, benefits paid) from the Payroll
system.
 Extract vacation data from the HR system.

- Data Transformation:

 Normalize data formats to ensure consistency across HR and Payroll data.


 Clean data to remove duplicates and correct any inconsistencies.

- Data Loading:

 Store the transformed data in a centralized database.


 Ensure the database is optimized for quick data retrieval and summary
generation.
3. CEO's request
3.1. Problem
- Inefficiency in Information Retrieval
 Time-Consuming Process: Both HR and Payroll departments take
significant time to gather employee information upon request.
 Disruption of Work: Departments have to stop their regular work to
compile information for management and shareholders.
- Limited Information for Decision-Making

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.

3.2. CEO’s Request


- Integration of HR and Payroll Systems

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 shareholder, gender, ethnicity, part-time/full-time status, department.

For the current year and the previous year.

 Total Vacation Days Taken:

By shareholder, gender, ethnicity, part-time/full-time status, department.

For the current year and the previous year.

 Average Benefits Paid:

To shareholders and non-shareholders.

By benefits plan.

- Alerts and Notifications


 Set alerts for specific conditions and special events:
 Employee is within a certain number of days of their hiring anniversary.
 Employee has accumulated more than a certain number of vacation days.
 Employee makes a change to their benefits plan that affects payroll.
 Employees with birthdays within the current month.
- Additional Needs
 The dashboard should be adaptable to future information needs.
6|Page
 The company is considering changing financial or HR systems but
prefers to continue with the existing systems for now.
 Provide drafts of the interface for review to ensure alignment with the
CEO's vision.

4. Build databases for HR System applications


- Database Schema
o Projects(ProjectID, ProjectNAme, StartDate, EndDate, Bugget,
DepartmentID)
o Employees( EmployeelD, FirstName, LastName,Gender, BirthDate,
Ethnicity, EmploymentType, HireDate, DepartmentID,
ShareholderStatus, PositionID, TotalDayoff, TotalEarning,
Contactinfo)
o EmployeeProject( EmployeeID, ProjectID, Role)
o Position(PositionID, PositionName,Description)
o Benefits(BenefitID, BenefitType, BenefitAmount, EffectiveDate)
o ShareHolderID( ShareholderID, SharesOwner)
o Department(DepartmentID, DepartmentName)
o PerformanceReviews( ReviewID, EmployeeID, ReviewDate,
Reviewer, Score, Comments)
o Alerts(AlertID, AlertType, EmployeeID, AlertDate, AlertStatus)
o Payroll( PayrollID , PayDate, SalaryAmount, Tax, Bonuses,
Deductions)
- Relationship

7|Page
- Specific description

Employees Table

Column Name Data Type Constraints Description


Unique identifier for each
EmployeeID INT PRIMARY KEY
employee
FirstName NVARCHAR(20) NOT NULL Employee's first name
LastName NVARCHAR(20) NOT NULL Employee's last name
Gender NVARCHAR(10) Employee's gender
BirthDate DATE Employee's birth date
Ethnicity NVARCHAR(50) Employee's ethnicity
('Full-time',
EmploymentType NVARCHAR(50) Type of employment
'Part-time')

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

Column Name Data Type Constraints Description


PRIMARY Unique identifier for each
DepartmentID INT
KEY department
DepartmentName NVARCHAR(50) NOT NULL Name of the department

Positions Table

Column Name Data Type Constraints Description


Unique identifier for each
PositionID INT PRIMARY KEY
position
NVARCHAR(10
PositionName NOT NULL Name of the position
0)
Description NVARCHAR(25 Description of the position
9|Page
Column Name Data Type Constraints Description
5)

Payroll Table

Column Name Data Type Constraints Description


Unique identifier for each
PayrollID INT PRIMARY KEY
payroll record
EmployeeID INT FOREIGN KEY Identifier of the employee
PayDate DATE Date of the payroll
DECIMAL(15, Salary amount of the
SalaryAmount
2) employee
DECIMAL(15,
Tax Tax deducted from the salary
2)
DECIMAL(15, Bonuses received by the
Bonuses
2) employee
DECIMAL(15,
Deductions Deductions from the salary
2)

LeaveDays Table

Column Name Data Type Constraints Description


Unique identifier for each
LeaveID INT PRIMARY KEY
leave record
EmployeeID INT FOREIGN KEY Identifier of the employee
LeaveDate DATE Date of the leave
LeaveType NVARCHAR(50) Type of the leave
LeaveDuration INT Duration of the leave in days

Benefits Table

Column Name Data Type Constraints Description


BenefitID INT PRIMARY KEY Unique identifier for each

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

Column Name Data Type Constraints Description


Unique identifier for each
ReviewID INT PRIMARY KEY
performance review
EmployeeID INT FOREIGN KEY Identifier of the employee
ReviewDate DATE Date of the performance review
NVARCHAR(10 Reviewer of the performance
Reviewer
0) review
Score given in the performance
Score INT
review
NVARCHAR(25
Comments Comments from the reviewer
5)

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

Column Name Data Type Constraints Description


Unique identifier for each
ProjectID INT PRIMARY KEY
project
ProjectName NVARCHAR(255) NOT NULL Name of the project
StartDate DATE Start date of the project
EndDate DATE End date of the project

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

Column Name Data Type Constraints Description


PRIMARY
EmployeeID INT KEY , Identifier of the employee
FOREIGN KEY
PRIMARY
ProjectID INT KEY , Identifier of the project
FOREIGN KEY
NVARCHAR(25 Role of the employee in the
Role
5) project

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

5. Build databases for PR System applications


- Database Schema

o Employeess(EmployeeID, FirstName, LastName,DateOfBirth,


Gender, Ethinicity, FullTime, TotalEarning, DayOff, AverageBenefit,
Address, Phone, Email, HireDate, BranchID, Department, Position,
SalaryID)

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

Column Name Data Type Constraints Description


EmployeeID INT PRIMARY Unique identifier for each

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

Column Name Data Type Constraints Description


PRIMARY Unique identifier for each
BranchID NVARCHAR(40)
KEY branch
BranchName NVARCHAR(40) Name of the branch
BranchManage
NVARCHAR(40) Manager of the branch
r
Identifier of the location of the
LocationID NVARCHAR(40) FOREIGN KEY
branch

Locations Table

Column Name Data Type Constraints Description


PRIMARY Unique identifier for each
LocationID NVARCHAR(40)
KEY location
StreetAddress NVARCHAR(40) Street address of the location
Postcode NVARCHAR(40) Postcode of the location
City NVARCHAR(40) City of the location

Department Table

Column Name Data Type Constraints Description


PRIMARY Unique identifier for each
DepartmentID INT
KEY department
VARCHAR(50
DepartmentName Name of the department
)

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

Column Name Data Type Constraints Description


PRIMARY Unique identifier for each
AttendanceID INT
KEY attendance record
EmployeeID INT FOREIGN KEY Identifier of the employee
Date DATE Date of the attendance
Status of the attendance (e.g.,
Status VARCHAR(10)
present, absent)

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

6. Choose database integration architecture


6.1. Architecture 1

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.

=> Our Recommendation:

We recommend Solution 2: Creating a Data Integration Model and a New Integrated


Database. While it requires a higher initial investment, this solution offers greater
flexibility, simplified reporting, and potentially better performance in the long run. The
unified database will serve as a central source of truth for all HR and payroll data,

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.

7. Integrated database design


7.1. Design integrated database schema
- Positions( PositionID, PositionName, Description)
- Departments ( DepartmentID, DepartmentName)
- Projects ( ProjectID, ProjectName, StartDate, EndDate, Budget,
DepartmentID)
- Locations( LocationID, StreetAddress, Postcode, City)
- Branch( BranchID, BranchName, BranchManager, LocationID)
- EmploymentType ( EPTypeID, NameType, Shift)
- Employees ( EmployeeID, FirstName, LastName, Gender, BirthDate,
Ethnicity, EPTypeID, HireDate, DepartmentID, PositionID, Address, Phone,
Email, SalaryID, ReviewID, AlertID, BranchID, BenefitID, LeaveID)
- PerformanceReviews ( ReviewID, ReviewDate, Reviewer, Score,
Comments)
- EmployeeProjects (ProjectID, EmployeeID, Role )
- Salary ( SalaryID, BasicSalary, Allowances, Deductions, NetSalary)
- Payroll ( PayrollID, EmployeeID, PayDate, SalaryAmount, Tax, Bonuses,
Deductions)
- Shareholder ( ShareholderID, EmployeeID, SharesOwned,
ShareholderStatus)
- Alerts ( AlertID, AlertType, AlertDate, AlertStatus)
- Benefits ( BenefitID, BenefitType, BenefitAmount, EffectiveDate)
- LeaveDays ( LeaveID, LeaveType, LeaveDuration)
- Attendance ( AttendanceID , EmployeeID , Date , Status)
22 | P a g e
7.2. Standardize the integrated database
1NF 2NF 3NF
PositionID PositionID PositionID
PositionName PositionName PositionName Positions
Description Description Description
DepartmentID DepartmentID DepartmentID
Departments
DepartmentName DepartmentName DepartmentName
EPTypeID EPTypeID EPTypeID
NameType NameType NameType EmploymentType
Shift Shift Shift
LocationID LocationID LocationID
StreetAddress StreetAddress StreetAddress
Locations
Postcode Postcode Postcode
City City City
BranchID BranchID BranchID
BranchName BranchName BranchName
BranchManager BranchManager BranchManager Branch
LocationID(fk)
ProjectID ProjectID ProjectID
EmployeeID EmployeeID EmployeeID EmployeeProjects
ProjectName Role Role
StartDate ProjectID ProjectID
EndDate ProjectName ProjectName
Budget StartDate StartDate
Projects
FirstName EndDate EndDate
LastName Budget Budget
Gender DepartmentID(fk)
BirthDate EmployeeID EmployeeID Employees
Ethnicity FirstName FirstName

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

Field name Data Type Description Note


PositionID int Identifier for the position. Primary key, not
null
PositionName Varchar(100) Name of the position. Not null
Description Nvarchar Description of the Not null
position.

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

Field name Data Type Description Note


ProjectID int Identifier for the project. Primary key, not
null
ProjectName Varchar(100) Name of the project. Not null
StartDate date Project start date. Not null
EndDate date Project end date. Not null
Budget Decimal(18,2) Project budget. Not null
DepartmentID Int Identifier for the Foreign key
responsible department.

Locations Table

Field name Data Type Description Note


LocationID Int Identifier for the location. Primary key
StreetAddress Varchar(255) Street address. Not null
Postcode Varchar(20) Postal code. No null
City Varchar(100) city Not null

Branch Table

Field name Data Type Description Note


BranchID int Identifier for the branch. Primary key
BranchName Varchar(100) Name of the branch. Not null
LocationID Int Identifier for the location. Foreign key

EmploymentType Table

Field name Data Type Description Note


EPTypeID int Identifier for the Primary key
employment type.
NameType Varchar(50) Name of the employment Not null
type.
27 | P a g e
Shift Varchar(50) Work shift.

Employees Table

Field name Data Type Description Note


EmployeeID int Identifier for the Primary key
employee.
FirstName Varchar(100) First name of the Not null
employee.
LastName Varchar(100) Last name of the Not null
employee.
Gender Varchar(10) Gender of the employee. Not null
BirthDate date Birth date of the Not null
employee.
Ethnicity Varchar(50) Ethnicity of the
employee.
EPTypeID int Identifier for the Foreign key
employment type.
HireDate date Hire date.
DepartmentID int Identifier for the Foreign key
department.
PositionID Int Identifier for the position. Foreign key
Address Varchar(255) Address of the employee.
Phone Varchar(20) Phone number of the
employee.
Email Varchar(100) Email of the employee.
SalaryID Int Identifier for the salary. Foreign key
ReviewID int Indentifier for the Foreign key
performance review
AlertID int Identifier for the alert Foreign key
BranchID Int Identifier for the branch. Foreign key
BenefitID int Identifier for the benefit Foreign key
LeaveID int Identifier for the leave Foreign key

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

Field name Data Type Description Note


PayrollID int Identifier for the payroll Primary key
EmployeeID int Identifier for the Foreign key
employee
PayDate date Date of the payment. Not null
SalaryAmount Decimal(18,2) Deductions amount. Not null

Shareholder table

Field name Data Type Description Note


ShareholderID int Identifier for the Primarry key
shareholder.
EmployeeID int Identifier for the Foreign key
employee.
SharesOwned int Number of shares owned. Not null
ShareholderStatus Varchar(50) Status of the shareholder. Not null

Alerts Table

Field name Data Type Description Note


AlertID int Identifier for the alert. Primary key
AlertType Varchar(100) Type of the alert. Not null
AlertDate date Date of the alert. Not null
AlertStatus Varchar(50) Status of the alert.

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

Field name Data Type Description Note


LeaveID Int Identifier for the leave. Primary key
LeaveType Varchar(100) Type of the leave. Not null
LeaveDuration int Duration of the leave in Not null
days.

Attendance Table

Field name Data Type Description Note


AttendanceID int Identifier for the Primary key
attendance record.
EmployeeID int Identifier for the Foreign key
employee.
Date date Date of the attendance. Not null
Status Varchar(50) Status of the attendance

8. Synchronize databases across the entire system


8.1. Learn the technologies
To ensure seamless data synchronization between the HR and Payroll
databases, we propose the following solutions:
● Replication:
Create and maintain copies of the database on multiple servers.
Types of replication include snapshot, transactional, and merge replication.
Snapshot Replication: Takes a snapshot of the data at a specific point in time
and distributes it to subscribers.
Transactional Replication: Distributes data changes incrementally as they
occur.
Merge Replication: Allows changes to be made at both the publisher and
subscriber, then merges the changes.
● ETL (Extract, Transform, Load):

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.

Moreover, Delta Lake offers scalable metadata handling, capable of


managing petabytes of data and billions of files efficiently. Its schema enforcement
and evolution features ensure high data quality by enforcing schema consistency
and allowing for controlled schema changes over time. These features make Delta
Lake an ideal choice for various data-driven applications, including ETL pipelines,
data warehousing, and machine learning. By providing a unified approach to data
processing, Delta Lake simplifies the data architecture, enhances data reliability,
and offers powerful tools for data management and analytics.

8.3. Test results (choose 1 tool to perform)

31 | P a g e
Step 1: Prepare database

HR Department database

Payroll Department database

32 | P a g e
Step 2: Setup HR Department database and data intergration on SQL Delta

Step 3: Compare and Synchronize databases

33 | P a g e
34 | P a g e

You might also like