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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:13:05+00:00 2026-06-17T20:13:05+00:00

I am creating a relationship between 2 tables: The relationship I like to form

  • 0

I am creating a relationship between 2 tables:

The relationship I like to form is between the Inventory an InventoryExtended tables.

The primary key for the Inventory table is InvID (Inventory ID).

The reason why I created the InventoryExtended is becauses only 1% of the inventory items in the Inventory table will need additional or extended fields, the rest will not.
Instead of adding these additional fields in the Inventory table where 99% will be blank for 50 additional fields that I need I decided to create an InventoryExtended table and store the 50 fields there.

The relationship between the Inventory an InventoryExtended table will be 1 to 1.

Meaning, for the 1% of the records in the Inventory table , the InvId will be the same as the InvId in the InventoryExtended table.

My question is that should the InvID in the InventoryExtended table be a FK (Foreign Key) or should it be a PK and a FK?

I am thinking it should be a PK and a FK as there the InvID will be unique in the InventoryExtended table.

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-06-17T20:13:07+00:00Added an answer on June 17, 2026 at 8:13 pm

    You are correct.

    The InvID should be a PRIMARY KEY and a FOREIGN KEY as it will be unique in the InventoryExtended table.

    This type of relationship is indeed 1:1 or (more accurately) 1::0..1, as only some of the rows in the Inventory table will have a related row in InventoryExtended.

    Also note that the InventoryExtended (InvID) should not have the IDENTITY property, even if the Inventory (InvID) has it.

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

Sidebar

Related Questions

I'm having trouble in creating a one-to-one relationship between two tables in MS Access
I have set up a HABTM relationship between two table creating a many to
I have two tables that I'm trying to create a relationship between so I
I have a domain object which represents a 1:n relationship between database tables. public
I have a many-to-many relationship between 2 tables that I define with a join
I have a typed dataset with two tables like this: Table A (Parent Table)
I have two models with a foreign key relationship between them. In the admin,
I currently have a one to one relationship between two tables in MS Access
Visual Studio 2005 doesn't provide an interface for creating relationships between tables in a
I'm trying to map a ManyToMany relationships between 2 tables, both having composite primary

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.