0% found this document useful (0 votes)
3 views3 pages

Group Project Queries

The document outlines the structure of a Payroll Management System, detailing the creation of various database tables including CompanySetup, Departments, Designation, EmployeeInfo, and others. Each table includes specific fields and constraints, such as primary and foreign keys, to manage employee and payroll data effectively. This system is designed to handle information related to employee details, academic qualifications, work experience, attendance, leave transactions, deductions, and salary management.

Uploaded by

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

Group Project Queries

The document outlines the structure of a Payroll Management System, detailing the creation of various database tables including CompanySetup, Departments, Designation, EmployeeInfo, and others. Each table includes specific fields and constraints, such as primary and foreign keys, to manage employee and payroll data effectively. This system is designed to handle information related to employee details, academic qualifications, work experience, attendance, leave transactions, deductions, and salary management.

Uploaded by

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

Payroll Management System

---------------------------------------------
Table no 1 (CompanySetup)
-------------------------
create table CompanySetup (
CompanyName varchar2(75),
Address varchar2(50),
City varchar2(25),
Phone varchar2(25),
Fax varchar2(15),
Email varchar2(25)
)
---------------------------------------------
Table no 2 (Departments)
------------------------
create table Departments(
DeptID varchar2(5),
Dname varchar2(35),
Remarks varchar2(50),
constraint deptid_PK PRIMARY KEY (DeptID)
)
----------------------------------------------
Table no 3 (Designation)
------------------------
create table Designation(
DesgID number(3),
Desgname varchar2(35),
Remarks varchar2(50),
constraint desgid_PK primary key (DesgID)
)
--------------------------------------------------
Table no 4 (EmployeeInfo)
-------------------------
create table EmployeeInfo(
EmpCode Number(5),
FirstName Varchar2(30),
LastName Varchar2(30)
NIC Varchar2(15),
TempAddress Varchar2(50),
PerAddress Varchar2(50),
Phone Varchar2(15),
Mobile Varchar2(15),
BirthDate Date,
HireDate Date,
Gender Varchar2(6),
Shift Varchar2(12),
DesgID Number(3),
DeptID Varchar2(5),
BasicPay Number(5),
constraint EmpCode_PK PRIMARY KEY (EmpCode),
constraint DesgID_FK Foreign Key (DesgID) REFERENCES Designation
constraint DeptID_FK Foreign Key (DeptID) REFERENCES Departments
)
--------------------------------------------------------------------------
Table no 5 (Academic)
---------------------
create table Academic(
EmpCode Number(5),
Degree Varchar2(15),
Institue Varchar2(50),
Grade Varchar2(5),
PassingYear Number(4),
constraint EmpCode_FK Foreign Key (EmpCode) REFERENCES EmployeeInfo
)
----------------------------------------------------------------------------
Table no 6 (Experience)
create table Experience(
EmpCode Number(5),
Company Varchar2(50),
Post Varchar2(20),
FromDate Date,
ToDate Date,
LastPay Number(8),
constraint EmpCode_FK_Exp Foreign Key EmpCode REFERENCES employeeinfo
)
------------------------------------------------------------------------------
Table no 7 (PayDescription)
---------------------------
create table PayDescription(
PayID varchar2(3),
Pname varchar2(35),
Type varchar2(50),
constraint PayID_PK Primary Key (PayID)
)
-------------------------------------------------------
Table no 8 (LeaveDesciption)
-----------------------------
create table LeaveDescription(
LeaveID varchar2(3),
Ldesc varchar2(35),
constraint LeaveID_PK Primary Key (LeaveID)
)
-------------------------------------------------------
Table no 9 (Attendance)
------------------------
create table attendance(
EmpCode Number(5),
Cdate Date,
TimeIn Date,
Timout Date,
TotalHours Number(3),
Status Varchar(1),
CurrentStatus Varchar(3),
constraint Empcode_FK_atten Foreign Key (EmpCode) REFERENCES employeeinfo
)
-----------------------------------------------------------------------------------
-
Table no 10 (LeaveTransaction)
create table LeaveTransaction(
EmpCode Number(5),
LeaveID Varchar(3),
LvFromDate Date,
LvToDate Date,
LvDays Number(3),
constraint EmpCode_FK_Lvt Foreign Key (EmpCode) REFERENCES employeeinfo
constraint LeaveID_FK Foreign Key (LeaveID) REFERENCES leavedescription
)
-----------------------------------------------------------------------------------
-
Table no 11 (Deduction)
------------------------
create table Deduction(
EmpCode Number(5),
PayID Varchar(3),
DeductionAmt Number(5),
Reason Varchar(35),
constraint EmpCode_FK_Ded Foreign Key (EmpCode) REFERENCES employeeinfo,
constraint PayID_FK Foreign Key (PayID) REFERENCES PayDescription
)
-----------------------------------------------------------------------------------
---
Table no 12 (SalaryMaster)
--------------------------
create table SalaryMaster(
InvoiceNo Number(5),
InvDate Date,
EmpCode Number(5),
Deduction Number(5),
constraint InvoiceNo_PK Primary Key InvoiceNo,
constraint EmpCode_FK_SM Foreign key EmpCode REFERENCES employeeinfo
)
-----------------------------------------------------------------------------------
---
Table no 13 (SalaryDetail)
--------------------------
create table SalaryDetail(
InvoiceNo Number(5),
PayID Varchar(3),
Payamount Number(5),
constraint InoiceNo_FK foreign key (InoiceNo) REFERENCES SalaryMaster,
constraint PayID_FK_SD foreign key (PayID) REFERENCES PayDescription
)
----------------------------------------------------------------------------------
The End.

You might also like