If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Help with employee having multiple roles

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-11, 15:15
ALEX23 ALEX23 is offline
Registered User
 
Join Date: Mar 2011
Posts: 1
Help with employee having multiple roles

Well an employee has multiple roles on a work request, for instance an employee can be a analyst and lead on a project. How can I make an employee table to show the multiple positions of a employee on a project. This what i have thus far. ANY HELP PLEASE!!!!!

CREATE TABLE SUB_ORDER (
SUB_ORDER INTEGER NOT NULL,
STATUS VARCHAR(20),
ACT_START DATE,
ACT_FINISH DATE,
ORDER_TYPE CHAR(5),
WORKCTR_ID CHAR(10),
MAND_COMP_DATE DATE,
WORK_REQUEST CHAR(10) NOT NULL
)

(1 to many)

CREATE TABLE SUB_ORDER_ROLE (
WORK_REQUEST CHAR(10) NOT NULL,
SUB_ORDER INTEGER NOT NULL,
EMPLOYEE_ID INTEGER NOT NULL,
ROLE_ID CHAR(5) NOT NULL
)
(MANY TO ONE)

CREATE TABLE EMPLOYEE (
EMPLOYEE_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 NO CYCLE CACHE 20 NO ORDER ),
NAME VARCHAR(40),
USERNAME VARCHAR(15),
PASSWORD CHAR(8),
ADMIN CHAR(3)
)
(LINKED FROM SUB_ORER_ROLE MANY SUBORDERS TO one ROLE)

CREATE TABLE ROLE (
ROLE_ID CHAR(5) NOT NULL GENERATED BY DEFAULT AS IDENTITY ( START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 NO CYCLE CACHE 20 NO ORDER ),
ROLE_TITLE CHAR(5)
)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On