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

  • SEARCH
  • Home
  • 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 8274355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:42:35+00:00 2026-06-08T07:42:35+00:00

This is mostly a design question: Ok, so I’m trying to create a relationship

  • 0

This is mostly a design question:

Ok, so I’m trying to create a relationship for a ticket type table that contains a type and a subtype. Each subtype is unique to it’s parent type. I’m trying to avoid having both fields in the ticket table. I’m thinking of just creating a link table with a natural key and then just placing that key in the ticket table, and that key will point to the appropriate combination of Type and Subtype.

My concern is keeping those combinations unique. So for instance, if someone jumps into the table (without doing their homework first) and attempts to add a combination like Type 5, subtype 3, and that particular combination already exists, the dbms shouldn’t allow it, similar to a primary key.

So I’m wondering if it would be stupid (because it feels like it is) to create a primary key that uses the natural key, the type id, and the subtype id. It seems like that wouldn’t help anything because the natural key would end up making every entry unique, thus making every entry valid.

Is there a better way to do this? Would it be simpler to just not attempt to constrain those links/combinations? Should I just place both fields in the ticket table and suck it up?

  • 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-08T07:42:36+00:00Added an answer on June 8, 2026 at 7:42 am

    Use a UNIQUE constraint to ensure that the combination of type and subtype is unique, then have a separate primary key for your natural key.

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

Sidebar

Related Questions

This question is about testable software design based on mostly value objects and services.
With this question I am mostly looking for answers from people that have implemented
This is my first entry into backend development, taking mostly a design role in
This is mostly just out of curiosity, and is potentially a silly question. :)
This is mostly a data warehouse philosophy question. My project involves an Oracle forms
This question is mostly academic. I ask out of curiosity, not because this poses
I am mostly following this page: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I used this command to create the
I'm trying to write this code using mostly arrays. I'm trying to get Correct
This is probably mostly a question about how to use the VS 2010 IDE
I believe that this question has been asked in a few different forms, but

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.