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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:36:30+00:00 2026-05-23T10:36:30+00:00

Lets say I have only 2 tables in my DB. The two tables are:

  • 0

Lets say I have only 2 tables in my DB. The two tables are: InputType and HardwareType. Each table uses GUIDs as their primary key. There is a foreign key from InputType to HardwareType.

The problem I am having is that there will be multiple rows of InputType that refer to the same row in HardwareType (ie. there are several inputs per type of hardware). The issue with this is that the column I have in InputType that refers to the GUID in HardwareType will not allow duplicates — therefore, not allowing multiple inputs per hardware type.

I could probably get around this by setting the datatype of the column in InputType to a “varchar” or something instead of “uniqueidentifier”, but do I have to do it this way? Is there someway to allow duplicate entries of GUIDs when it isn’t the primary key, but instead a foreign key to another table?

Help is appreciated! Thanks.

  • 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-23T10:36:31+00:00Added an answer on May 23, 2026 at 10:36 am

    Just because the datatype is UNIQUEIDENTIFIER doesn’t imply you cannot have the same value in that column multiple times!

    You CAN in fact – unless of course, you’ve explicitly added a UNIQUE CONSTRAINT or UNIQUE INDEX on that column – this is your choice, but there’s nothing applied by default, unless you do something about it yourself.

    So you should be able to reference HardwareType from InputType using the UNIQUEIDENTIFIER – even if multiple rows in InputType will reference the same row in HardwareType – no problems at all.

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

Sidebar

Related Questions

Lets say I have two tables, one for transactions, and another table who's primary
Lets say I have a simple table that only contains two columns: MailingListUser -
Lets say that I have only DHT (distributed hash table) implemented (in Python), and
lets say i have two pages links.html & contents.php ... first page contains only
Lets Say i have a table like this WEB_LIST_TABLE KEY Value ---------------------------------------- 134 google.com
Let's say you have the following two tables: X Table X_ID Y_ID_F X_Value 1
Lets say I have a table with just two columns: name and mood .
To keep this simple, lets say I have two tables. The first is called
Let's say we have two tables, ORDERS and OFFERS Order POJO @Entity @Table(name =
Lets say I have two tables - Person and Clothes and both of these

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.