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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:04:46+00:00 2026-05-13T11:04:46+00:00

I posted this at ServerFault and was told this would be a better spot

  • 0

I posted this at ServerFault and was told this would be a better spot for it.

I have some experience as a developer but am a complete novice when it comes to SQL administration and database design.

I’m converting my company’s ordering and quoting process from a excel spreadsheet to something a little more robust using an ASP.NET application with a SQL backend.

Currently our parts database is just a excel spreadsheet. A lot of our products are just off-the shelf hardware from OEM’s like routers, servers etc. We are primarily a software shop so we install our applications on the equipment, configure the network equipment and ship out a complete solution that is installed by our techs.

In my schema I have 5 tables

  • CompanyProducts
  • OEMProducts
  • SupplierProducts
  • Suppliers
  • OEMs

OEMProdcuts contains information from the equipment manufcaturer like Cisco, for networking equipment or Dell for server equipment.

SupplierProducts contains information about the suppliers we get the OEM stuff from (since a lot of OEM’s use resellers)

companyProducts contains the product ID’s specific to our company.

Here’s a snapshot from SQL Server Management Studio:

alt text http://i102.photobucket.com/albums/m108/ArkhamFreak/schema2.jpg

My question is:

What’s the best way to setup the primary keys for this simple schema? Should I use an auto-increment field as a GUID as shown in the diagram or the OEMProductID for the primary key to reference in all tables?

The Suppliers to SupplierProducts and OEMs to OEMProducts are obvious to me but the rest of the relationships I’m not so sure about. I’m a little worried that if I’ll have to refer to OEMProducts by an obscure auto-generated ID when I add data to a table that references it. Since we have more than one supplier for many of the same equipment, I’m not sure how to model that relationship.

Thanks for your time.

  • 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-13T11:04:47+00:00Added an answer on May 13, 2026 at 11:04 am

    Well, a few thoughts:

    • I would definitely not use the SupplierName as the primary key for your Suppliers table. Use something else – either you have some given item (e.g. a “Supplier Number” from some other system) that you can use, or if not, them just use a simple INT (possibly with an IDENTITY) to uniquely qualify each supplier

    • Same goes for Product (use the ProductID, if that’s unique and stable) and OEM (again: use some kind of a given, unique item of information, but not a name, or create your own “OEM ID” of sorts)

    • Why do you have a SupplierProductID and a OEMProductID on your SupplierProducts table? There might be a good reason for that – just not obvious to me at first sight.

    I personally don’t like to overuse GUID’s – they’re cumbersome, they’re big and fat (when compared to an INT), they have all sorts of nasty consequences in your SQL Server indices (index and table fragmentation) – so unless you have a really good reason for a GUID (like replication amongst several physical locations), I typically prefer to use INT’s – either ID’s that I generate myself, or that I leave up to the database to handle (INT IDENTITY).

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

Sidebar

Related Questions

I have posted this to ServerFault, but the Node.js community seems tiny there, so
I posted this very same item on SERVERFAULT, but got no reply. So here
I've posted this on django-users but haven't received a reply! So I have my
I posted this on serverfault as well, but I probably asked in the wrong
Originally, I posted this on ServerFault ... but perhaps it is more of a
I posted this on programmers first , but was told it belongs here. Funny,
I posted this on the pygame mailing list but maybe someone here will have
I posted this code earlier, but was told to clean it up and repost.
I have posted this question a while ago but got a partial answer to
Note: I originally posted this on ServerFault, but I haven't gotten any responses at

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.