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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:38:43+00:00 2026-05-13T17:38:43+00:00

I have a doubt regarding a database design, suppose a finance/stock software in the

  • 0

I have a doubt regarding a database design, suppose a finance/stock software

in the software, the user will be able to create orders,
those orders may contain company products or third-party products

typical product table:

PRIMARY KEY INT productId  
KEY INT productcatId
KEY INT supplierId
VARCHAR(20) name
TEXT description
...

but i also need some more details in the company products like:

INT instock  
DATETIME laststockupdate  
...

The question is, how should i store the data?
I’m thinking in 2 options:

1 –
Have both company and third-party, products in a single table,
some columns will not be used by third-party products
identify the company products are identified by a supplier id

2 –
Have the company products and third-party in separated tables

3 – [new, thanks RibaldEddie]
Have a single product table,
company products have additional info in a separated 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-05-13T17:38:44+00:00Added an answer on May 13, 2026 at 5:38 pm

    You didn’t mention anything about needing to store separate bits of Vendor information, just that a type of product has extra information. So, you could have one products table and an InHouseProductDetails table that has a productId foreign key back to the products table that stores the company specific information. Then when you run your queries you can join the products table to the details table.

    The benefit is that you don’t have to have NULLable columns in the products table, so your data is safer from corruption and you don’t have to store the products themselves in two separate tables.

    Oooo go with 3! 3 is the best!

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

Sidebar

Related Questions

I have a doubt regarding the use of servlets. In the application I'm building
I have one doubt regarding casting. public void Test(out T a, out T b)
I have a doubt regarding the backlog value in listen system call. From man
i have small doubt regarding the window functions in c++. what exactly invalidate() function
I have a doubt regarding HttpServlet class is an abstract class even though there
I have been tasked with developing a new retail e-commerce storefront for my current
Basic Question - I have installed SQL Server Express 2008 with integrated SP1 .
I've a problem which is giving me some hard time trying to figure it
I started with Turbo Pascal 3, went to TP5, Bought TP6 called Borland the

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.