This is Sample Database for sqlserver
Department Table
create table Dept(Deptno int constraint Deptno_Pk Primary key,Dname varchar(50),Loc varchar(50))
Employee Table
create table Emp(Empno int constraint Empno_Pk Primary key , Ename varchar(100),job varchar(100),Mgr int Constraint Mgr_Ref references Emp(Empno),HireDate datetime,Sal Money Constraint Sal_Chk Check(sal between 1500 and 7500),Comm money,Deptno int Constraint Deptno_Ref Foreign Key(Deptno) References Dept(Deptno))
Department Details Table
Create table DeptDetails(Did int primary key,deptno int references dept(deptno) ,comments varchar(8000))
Salgrade Table
create table Salgrade(Grade int constraint Grade_pk Primary key,LoSal Money,HiSal Money)
Data In Dept Table
Insert into dept values (10,'Marketing','Mumbai')
Insert into dept values (20,'Sales','Chennai')
Insert into dept values (30,'Finance','Dehli')
Insert into dept values (40,'Production','Kolkota')
Data in Emp Table
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1001,'Scott','President',NULL,'01/01/78',5000,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1002,'Clark','Manager',1001,'01/01/78',4000,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1003,'Smith','Manager',1001,'01/01/78',3500,500,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1004,'Vijay','Manager',1001,'01/01/78',4000,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1005,'Ajay','Salsman',1003,'02/04/79',3000,300,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1006,'Satish','Salsman',1003,'02/08/78',4000,600,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1007,'Venkat','Salsman',1003,'04/15/78',3300,0,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1008,'Vinod','Clerk',1003,'01/15/78',2400,NULL,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1009,'Suneel','Clerk',1004,'05/12/83',2000,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1010,'Srinivas','Analyst',1004,'03/01/79',3400,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1011,'Prakash','Analyst',1004,'03/01/79',3600,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1012,'Madan','Analyst',1004,'01/09/81',3100,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1013,'Ravi','Clerk',1002,'01/06/78',1800,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1014,'Raju','Clerk',1005,'06/01/78',2300,NULL,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1015,'Ramesh','Clerk',1011,'08/22/78',2500,NULL,30)
Data in DeptDetails Table
insert into DeptDetails values(1,10,'This department is located in Mumbai and mainly involved in marketing')
insert into DeptDetails values(2,20,'This department is located in Chennai and mainly involved in Sales')
insert into DeptDetails values(3,30,'This department is located in Dehli and mainly involved in Finance')
insert into DeptDetails values(4,40,'This department is located in Kolkota and mainly involved in Production')
Data in Salgrade Table
insert into salgrade values(1,1300,1800)
insert into salgrade values(2,1800,2700)
insert into salgrade values(3,2700,3500)
insert into salgrade values(4,3500,5000)
insert into salgrade values(5,5000,8000)
Department Table
create table Dept(Deptno int constraint Deptno_Pk Primary key,Dname varchar(50),Loc varchar(50))
Employee Table
create table Emp(Empno int constraint Empno_Pk Primary key , Ename varchar(100),job varchar(100),Mgr int Constraint Mgr_Ref references Emp(Empno),HireDate datetime,Sal Money Constraint Sal_Chk Check(sal between 1500 and 7500),Comm money,Deptno int Constraint Deptno_Ref Foreign Key(Deptno) References Dept(Deptno))
Department Details Table
Create table DeptDetails(Did int primary key,deptno int references dept(deptno) ,comments varchar(8000))
Salgrade Table
create table Salgrade(Grade int constraint Grade_pk Primary key,LoSal Money,HiSal Money)
Data In Dept Table
Insert into dept values (10,'Marketing','Mumbai')
Insert into dept values (20,'Sales','Chennai')
Insert into dept values (30,'Finance','Dehli')
Insert into dept values (40,'Production','Kolkota')
Data in Emp Table
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1001,'Scott','President',NULL,'01/01/78',5000,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1002,'Clark','Manager',1001,'01/01/78',4000,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1003,'Smith','Manager',1001,'01/01/78',3500,500,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1004,'Vijay','Manager',1001,'01/01/78',4000,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1005,'Ajay','Salsman',1003,'02/04/79',3000,300,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1006,'Satish','Salsman',1003,'02/08/78',4000,600,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1007,'Venkat','Salsman',1003,'04/15/78',3300,0,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1008,'Vinod','Clerk',1003,'01/15/78',2400,NULL,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1009,'Suneel','Clerk',1004,'05/12/83',2000,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1010,'Srinivas','Analyst',1004,'03/01/79',3400,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1011,'Prakash','Analyst',1004,'03/01/79',3600,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1012,'Madan','Analyst',1004,'01/09/81',3100,NULL,30)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1013,'Ravi','Clerk',1002,'01/06/78',1800,NULL,10)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1014,'Raju','Clerk',1005,'06/01/78',2300,NULL,20)
insert into Emp(Empno,Ename,Job,Mgr,Hiredate,Sal,Comm,Deptno) values(1015,'Ramesh','Clerk',1011,'08/22/78',2500,NULL,30)
Data in DeptDetails Table
insert into DeptDetails values(1,10,'This department is located in Mumbai and mainly involved in marketing')
insert into DeptDetails values(2,20,'This department is located in Chennai and mainly involved in Sales')
insert into DeptDetails values(3,30,'This department is located in Dehli and mainly involved in Finance')
insert into DeptDetails values(4,40,'This department is located in Kolkota and mainly involved in Production')
Data in Salgrade Table
insert into salgrade values(1,1300,1800)
insert into salgrade values(2,1800,2700)
insert into salgrade values(3,2700,3500)
insert into salgrade values(4,3500,5000)
insert into salgrade values(5,5000,8000)