4 Replies Latest reply on Jul 16, 2017 8:40 AM by bennyruiz



      i need help, Im confused i set up a table for a scale in a grain business, but the same scale is used for sale and purchases, there is also discounts for the grain humidity etc... the problem is that the amount  comes from the scale weight and need to multiply by price, since this net wight is used to adds and subtracts  is repeating records.


      i would appreciate if someone tells me how to set up this data base

      important tables are:

      buy (id, invoice#, date)

      sell (id, invoice#, date)

      scale weight (id, invoice#, date)buyer

      details (id,product,amonuntbuy,price, amountsell,pricesell)

      seller (id, named address, phone)

      buyer( id, named address, phone)


      not sure if humidity and trash discounts should be in buy , sell or details

        • 1. Re: scale

          Step zero: Make sure you can do all the calculations on paper, first, before trying to implement logic in any computer program. Write each type of calculation down. Categorize it. You need to understand the business rules of your own system (as in where discounts should apply). That system documentation (system understanding) should also come before even thinking about doing a database system.

          • 2. Re: scale

            An important question:


            Will any invoices need to list more than one item bought/sold?


            If yes, you need a related line items table to list the items, their qty, unit price, line item cost, etc.

            • 3. Re: scale

              no. always purchases or sales are for 1 product

              because transactions are per truck

              • 4. Re: scale


                i think im clear on the business logic. my problem is I dont know how to apply it on fm

                for starters I have seen many videos but this has more difficulty since the result of weight is on another table and is used on calculations and discounts should be on other table

                when building a report everything gets confusing