Idea stock control for many branch

Posted on 2012-09-16
Last Modified: 2012-09-21
my company have a lot of branch please suggest how to control stock how can i search product what branch have this products

please suggest how to design database
Question by:teera
    LVL 5

    Expert Comment

    do you want to centrally keep the stock data or want it to bind to branches?

    Also, pls let me know a few attributes that you would like to store for product and branch. I can come up with an early design approach

    Author Comment

    all branch have there own server but it must update stock to mainserver to sever every day 2 time

    and in every branch can search with main stock in case the product is not availa ble he will known may be it have a product in another branch
    LVL 5

    Accepted Solution

    so a very simple table design can be as below

    Product_Inventory table

    InventoryId (Primary Key)
    ProductId (ForiegnKey To Products table)
    BranchId  (ForiegnKey to branch master)

    and so on

    You can store inventory per branch for each product in the above table.

    A simple query like the below will give you the total number of units present for a product at each branch

    SELECT branchId, SUM(NoofUnitsInStock)
    FROM Product_Inventory
    WHERE productid = someProdId
    Group By branchId

    Hope it helps

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi ( had suggested a “sed” way, I actually shell …
    Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (, A SQLite Tidbit: Quick Numbers Table Generation (…
    Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now