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 8141805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:38:06+00:00 2026-06-06T12:38:06+00:00

I’m working on building a database to manage project assignments, and the one part

  • 0

I’m working on building a database to manage project assignments, and the one part that’s giving me particular trouble is the assignment of job titles to employees with for each project they are working on.

Requirements

  1. An Employee can be on multiple Projects at a time
  2. A Project has multiple Employees on it
  3. A Project has multiple Job Titles
  4. An Employee works on a Project under exactly one of the Project’s Job Titles
  5. Multiple Employees can work under the same Job Title in a Project

I’m not sure how to represent this using tables; every layout I come up with either makes it possible for an employee to work on a project under a job title from a different project, or they are able to work on the same project under two different job titles.

Example Diagrams

Image link at end of question

Basically, I have three tables:

Tables

  • Projects
    • Project Name (unique)
    • Project ID
  • Employees
    • Employee Name (unique)
    • Employee ID
  • Job Titles
    • Title
    • Project ID (Title-ProjectID unique)
    • Title ID

And then a cross-reference table, called Assignments. The two ways I have come up with so far for Assignments are as follows:

Example 1

  • Assignments
    • Employee ID
    • Project ID (EmployeeID-ProjectID unique)
    • Title ID (unique)
    • AssignmentID

This way limits employees to one title per project, but allows them to use a title that doesn’t belong to the project in the assignment.

Example 2

  • Assignments
    • Employee ID
    • Title ID (EmployeeID-TitleID unique)
    • AssignmentID

This way assigns employees to the project through the title, so it is impossible to assign someone to a project with an invalid title. However, this allows an employee to be assigned to the same project under multiple titles.

Again, the diagrams are available here: https://i.stack.imgur.com/U8C16.png

I know there must be a way to do this cleanly, but I haven’t had any real formal training in database design and I can’t find anything through my searches except how to make a many-to-many relationship, which isn’t exactly what I need help with.

Thanks!

  • EDIT 1
    • Bolded Primary Key Fields (were underlined in diagram image, but hard to tell since they are the last fields)
    • Added AssignmentID (Primary Key) to Assignments table in the question (was present in designs, forgot to include when creating question & diagram)
  • EDIT 2
    • Added missing requirement (5)
    • Added headers for examples and requirements
  • EDIT 3
    • I have 10 rep now, so I can put up the diagram!
  • EDIT 4
    • Added identifiers for unique keys (individual unique keys identified in diagram, but I don’t know how to do compound keys in DIA)
  • 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-06-06T12:38:07+00:00Added an answer on June 6, 2026 at 12:38 pm

    Add an ID field to you Job Titles table – let’s call it JobTitleID

    Now your Assignments table has Employee ID and JobTitleID.

    This ofcourse means, that to find the Projects for an employee, you need to join through the Assignments table and the Job Titles table

    EDIT

    After discussion in the comments, please disregard the above, I left it only as history.

    Now here is the new version: Your Assignments table needs (as you already considered)

    • Employee ID
    • Project ID
    • Title ID
    • AssignmentID

    But it also needs a UNIQUE INDEX(EmployeeID, ProjectID) – this will make it impossible for one employee to be in the same project under different titles.

    Multiple employees under the same title will still be allowed, as well as multiple titles in different projects for one employee.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
We're building an app, our first using Rails 3, and we're having to build

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.