Complete Employee Management System Database with source code.

Complete Employee Management System Database with source code.

Source Code

create table public.tbl_employee(e_id serial primary key,

e_name varchar(30),

e_father_name varchar(30),

e_DOB date,

e_phone_no integer,

e_join_date date,

e_status varchar(40),

e_mail_address varchar(30),

e_address varchar(60),         /*how to add FK constriant in another table */

d_id integer, /*FK*/

des_id integer,/*FK*/

c_id integer /*FK*/          /*synthx for fK constraint in another table*/

constraint foreign key(d_id) references public.tbl_department(d_id);

constraint foreign key(des_id) references public.tbl_designation(des_id);

constraint foreign key(c_id) references public.tbl_category(c_id );

)

create table public.tbl_department(d_id serial primary key,

d_name varchar(30))

create table public.tbl_designation(des_id serial primary key,

dse_name varchar(30))

create table public.tbl_category(c_id serial primary key,

c_name varchar(20))

create table public.tbl_exoerience(ex_id serial primary key,

   ex_title varchar(30),

   ex_date date,

   e_id integer  /*FK*/

constraint employee_id foreign key (e_id)references public.tbl_enployee(e_id)

)

create table public.tbl_salary(sal_id serial primary key,

  sal_date date,

  sal_amount decimal(18,3),

  sal_status varchar(12)

  e_id integer     /*FK*/

constraint employee_id foreign key (e_id)references public.tbl_enployee(e_id)

)

create table public.tbl_attendance(at_id serial primary key,

   at_sataus varchar(12),

    at_date date,

     at_intime time , /* time or date you can use */

at_outtime time,

    e_id integer  /*FK*/

constraint employee_id foreign key (e_id)references public.tbl_enployee(e_id)

)

create table public.tbl_user(u_id serial primary key,

u_name varchar(20),

u_paasword varchar(39)

r_id integer /*FK*/

constraint rol_id foreign key (r_id) references public.tbl_role(r_id)

)

create table public.tbl_role(r_id serial primary key,

r_name varchar(40))


Download Source Code


Click here


Click here