Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4580144
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:44:31+00:00 2026-05-21T20:44:31+00:00

I went through many threads and couldn’t figure it out. Sorry if this is

  • 0

I went through many threads and couldn’t figure it out. Sorry if this is a duplicate question. Consider the following setup.

1) Employee => (ID,Name)

2) Department => (ID,Name,location,Clerk,Accountant,Middle-manager,Group-manager,Regional-manager,Active)

Department can have many Clerks, Accountants, Middle-managers and so on. They are just employees from the Employee table. Need a better database schema (flexible like, adding up a new column as Divisional-Manager must be easy) for Department entity with NO data duplication, NO update anomalies and NO / less junction tables.

Thanks in advance! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:44:31+00:00Added an answer on May 21, 2026 at 8:44 pm

    You need something like this;

    department employee ERD

    CREATE TABLE department(
        dept_id      int    NOT NULL,
        dept_name    char(10)    NULL,
        CONSTRAINT PK1 PRIMARY KEY NONCLUSTERED (dept_id)
    )
    go
    
    
    CREATE TABLE department_employee(
        id         int    NOT NULL,
        dept_id    int    NOT NULL,
        emp_id     int    NOT NULL,
        CONSTRAINT PK3 PRIMARY KEY NONCLUSTERED (id)
    )
    go
    
    
    CREATE TABLE employee(
        emp_id      int    NOT NULL,
        emp_name    char(10)    NULL,
        CONSTRAINT PK2 PRIMARY KEY NONCLUSTERED (emp_id)
    )
    go
    
    
    ALTER TABLE department_employee ADD CONSTRAINT Refdepartment1 
        FOREIGN KEY (dept_id)
        REFERENCES department(dept_id)
    go
    
    ALTER TABLE department_employee ADD CONSTRAINT Refemployee2 
        FOREIGN KEY (emp_id)
        REFERENCES employee(emp_id)
    go
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I went through many posts and couldn't find a solution. (I came across with
I have had this problem and i went through so many posts here on
I went through many links like this , this and this , but not
I went through this whole procedure http://www.hanselman.com/blog/WorkingWithSSLAtDevelopmentTimeIsEasierWithIISExpress.aspx a couple weeks ago and got https
As I went through this wonderful blog by Mike McCandless explaining the power of
I'm currently working on a site which went through god knows how many developers'
I went through the Hibernate Tutorial at http://docs.jboss.org/hibernate/core/3.3/reference/en/html/performance.html and got the question which fetch
I been going through this tutorial and it looks really good. So I went
I went through so many topics asking about Why does release build fail and
I have went through google api documentation and so many reference links. but i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.