Employee Design Database

Posted by Sriharim under Sql Server on 5/26/2015 | Points: 10 | Views : 357 | Status : [Member] | Replies : 2
Design Database (Collection of tables) for below scenario

Design a DB for an organization to store information about their employees. The organization has office across world and has various departments like accounts, HR, Business Consulting, Software department… etc. Every emp works for a department. It also requires to capture the details of projects (like project name, project start date, project end date, client ,.. etc.). After design completes, relate the tables. (Tables creation script or DB diagrammatic approach is also appreciated).

---
Srihari



Responses

Posted by: Bandi on: 5/26/2015 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Create Table tblLocations ( LocationID int identity(1,1) primary key, LocationName varchar(100), Address varchar(500))

--1 Bangalore
--2 Hyderabad
--3 Chennai

CREATE TABLE tblDepartment ( DeptID INT Identity(1,1) primary key, DeptName varchar(100) NOT NULL, DeptManagerID int
NULL)
--Accounts
--HR
--Business Consulting
--Software Development

Create Table tblEmployees ( EmpID int identity(1,1) primary key, EmpName Varchar(100), Salary dec(10,2), LocationID int references tblLocations(LocationID), Designation varchar(100), DeptID int references tblDepartment(DeptID))

 Download source file

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Sriharim, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sriharim on: 5/31/2015 [Member] Starter | Points: 25

Up
0
Down
where can we have/ see the employee who left organisation details and employee salary hike details, designations history

---
Srihari

Sriharim, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response