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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:01:18+00:00 2026-05-26T21:01:18+00:00

In a scenario where we have customers, vendors, & branches which all have common

  • 0

In a scenario where we have customers, vendors, & branches which all have common attributes such as an address, which is a better solution and why?

Solution 1:

  • Customer table

  • Vendor table

  • Branch table

  • Address table with nullable foreign keys for CustomerID, VendorID, BranchID

Solution 2:

  • Entity table

  • Customer table with EntityID

  • Vendor table with EntityID

  • Branch table with EntityID

  • Address table with EntityID and a EntityType flag of ‘C’, ‘V’, or ‘B’

Solution 3 (suggested by AJC):

  • Customer table

  • Vendor table

  • Branch table

  • Address table

  • CustomerAddress xref table between Customer and Address

  • VendorAddress xref table between Vendor and Address

  • BranchAddress xref table between Branch and Address

Solution 4 (suggested by 9000)

  • Customer table

  • Vendor table

  • Branch table

  • CustomerAddress with FK to Customer

  • VendorAddress with FK to Vendor

  • BranchAddress with FK to Branch

  • vwAddress which UNION ALLs each of the above address tables, and includes a type flag (‘B’,’C’,’V’)

Notes:

Each customer, vendor, or branch could have multiple addresses, but should have at least one.

If an “entity” is both a customer and a vendor, it could have separate addresses for each role.

Would like to know if a customer is also a vendor.

  • 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-26T21:01:19+00:00Added an answer on May 26, 2026 at 9:01 pm

    C) None of the above.

    The correct way to do it would be to have an Address Table and a CustomerAddress, VendorAddress and BranchAddress respectively to join each C V B entity with one or many addresses.

    For attributes that are one-to-one, obviously there is no need for the extra tables, you just add the Id to the main table (AddressId)…

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

Sidebar

Related Questions

The customer want to have the following scenario: Customer hands out link (webapp address)
Actually we have developed one mobile solution, which is used by our customers. But
I have simple SL user control. A listbox which shows all customers and on
Here is a scenario. You have an ecommerce website which sells to customers. There
I have a scenario where customers are asking to develop a new project on
Scenario: Say I am on an invoice details page. I have a customer name
I have the following scenario, a Customer who can have bank accounts in several
This is the scenario: I have a list of about 5000 URLs which have
Here is the scenario: I have two radio buttons, 1) for a normal customers
The scenario would be: you have a variable called person which contains a number

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.