Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Inventory: Structuring Many to Many Relationships

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Inventory: Structuring Many to Many Relationships

    My title may not be too explanatory, but it should help when searching...

    I have an app for tracking a particular asset - knitting machines. I want to add inventory tracking for needles which can be matched to a particular machine based on its current setup which can change - sometimes frequently. Therefore one needle can fit different machines, which will change when the machine setup is changed. I have a master list of needles from the vendor based on the machine setup options that are according to the available cylinders we have for each machine. Currently we have 65 machines and 200 cylinders, and the cylinders are not necessarily model specific (if that makes sense), while others are (we change the cylinder to change the cut, often on a per order basis). I created a Model table to represent a summary subset of the various models with their available cylinders. And since we do not have every single needle in inventory that might be used, I also need a subset of the actual needle inventory where I can track QOH. Oh and just to add more confusion, some needles can be used on different setups as well.

    Here is some sample data:

    Model Cut Size Setup Needle
    FDR-Q 14 26" Rib 5614DH3
    FDR-Q 18 26" Rib 5918DL

    Now for the fun: another model may have either a 20, 22 or a 24 cut cylinder that will use the same needle, so Model+Cut alone cannot determine which model uses that needle because there is a range involved. I added a field NCUT to my needle and model tables so a 20-24 cut needle can be matched to either a 20, 22 or 24 cut machine. So far so good.

    Now I can link my set like this to see which needles belong to which machines:

    Model
    ==> Needles (the master list)
    ==> Machines

    I can't use these tables for Inventory however because the same needle will be listed several times, and not all of them are in stock anyway. This is where I am getting stumped. The potential user (our Head Mechanic) currently is keeping setup data on a scrap of paper he puts on his bulletin board to notify the other mechanics of machine changes - which also includes any reneedling that must be done. He pulls the required needles from the stock room and puts them in the parts room. This is what I need to track so an accurate QOH can be maintained, but also want to provide a history of these setup changes.

    I already have the machine info ready so setup changes can be made to that table, but that will only show the current setup. I also have a form for moving machines to a different location, which changes the MACHNO. I am not interested in keeping a history of that either. And all needle purchases are tracked adequately in Quickbooks which I can then use to update the needle inventory. So the purpose of this 'sub-app', is strictly for the mechanic to record his machine changes and note when new needles are needed or used and pull a report to show production what machines are available. And perhaps in the future to also relate these changes to a particular order or style change, although that is merely a dream at this point!

    Sound simple? Not to me! Hopefully someone here has already done something similar...
    Last edited by MoGrace; 11-20-2012, 01:44 PM.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    #2
    Re: Inventory: Structuring Many to Many Relationships

    Robin

    Most many to many relationships require an additional table to relate the items in your master tables.

    Sounds like you need that here..

    Something like the assembly items in QuickBooks...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #3
      Re: Inventory: Structuring Many to Many Relationships

      Robin,

      With a many to many relationship between Table A and Table B a set can be defined. As either Table A or Table B could be either a parent or a child, multiple sets depending upon the vantage point would be required.

      Having more than one set deal with the same tables is something I have seen discussed here. With zero experience in this area, what cautions you would need while doing this or if this is the right advice for you is not known.

      All the Best,
      Rich
      Last edited by RRTRACKS; 11-22-2012, 03:02 AM.

      Comment


        #4
        Re: Inventory: Structuring Many to Many Relationships

        Robin,

        As Al has suggested, you will need a third table that simply has every every combination of Machine_Id and Needle_Id. This can result in a table of many thousands of records. As an example, 3 machines can have 10 different needles, this will give you a table of up to 30 records. It will of course depend on how many combinations there are.

        I had to do the same thing for a school application. Students, Subjects and Teachers. Most students took most subjects and some teachers taught several subjects. So the Subjects table ended up with over 11,000 records.

        Hope this give you some extra thoughts to your thinking.
        Regards
        Keith Hubert
        Alpha Guild Member
        London.
        KHDB Management Systems
        Skype = keith.hubert


        For your day-to-day Needs, you Need an Alpha Database!

        Comment


          #5
          Re: Inventory: Structuring Many to Many Relationships

          I read this:
          1) I want to add inventory tracking for needles which can be matched to a particular machine based on its current setup which can change
          2) I have a master list of needles from the vendor based on the machine setup options that are according to the available cylinders we have for each machine.
          3) the cylinders are not necessarily model specific while others are
          4) summary subset of the various models with their available cylinders
          This sounds to me that the cylinders are the "lynch pin". The needles, which is the subject of your tracking, are subject to which cylinders they are/can associate with and the cylinders predicates which machines the needles can be used with. From here, setting up the application is a matter of associating cylinders with needles and cyclinders with machines and then you can get to needle for machines through the cylinders. If this is not correct, then please guide me closer to the facts.
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: Inventory: Structuring Many to Many Relationships

            Thanks to all who have responded.

            My model table does act as the intermediary table I need to match cylinders to needles which can then match machines to cylinders and the needle(s) to select from.

            I guess I am trying more to figure out how to best present this data to the user. My first step is to update the QOH for the actual needles in stock. The master needle list the vendor provided is probably never going to be the same as the needles in stock table. If he must add a new needle to stock then he would look up from the master list and add his QOH - easiest part so far. But if the needle is already in stock then how would I go about showing the history of additions and subtractions to avoid duplicate postings? I kinda need a visual here cause this is where I am stuck. The form would have to provide a search (find) or perhaps a query to locate the correct record. And then there must be some sort of history table to be able to show those postings in a browse. While I am trying to avoid too many steps, I would rather ensure accuracy over speed.

            I haven't tried using Quickbooks inventory items or I would probably have a better handle on this.

            Here's my steps as I see them:

            Show the user the needles in stock and their QOH

            If a needle is not found then select one from the master list and add that needle to stock & use script to check for duplicate ( I don't like using field rules for this...)

            Same process for taking a needle from stock - except no reason to see the master list for that.

            Use a checkbox or radio for determining which action to take and field(s) to show in a conditional object, then let a script append the entry to the stock table with a button that confirms the action.

            In the meantime I am working up a sample database to post here.
            Last edited by MoGrace; 11-23-2012, 07:17 PM. Reason: spelling ;)
            Robin

            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

            Comment


              #7
              Re: Inventory: Structuring Many to Many Relationships

              Originally posted by MoGrace View Post
              I guess I am trying more to figure out how to best present this data to the user.
              So thats where to start
              User : I want to know what choices do I have for a needle for [given]Machinetype/Setup [present to me] optional_master_cylinder_list and [finally] what is my available needle stocking situation out of this array?
              Create your set in this order - sounds to me like machine/setup 1:1 parent 1:M cylinder list and 1:M (grandchildren) needles and 1:M /1:1 (g/grandchildren) needles stock.
              Originally posted by MoGrace View Post
              My first step is to update the QOH for the actual needles in stock.
              Standard Inventory system - master stock item (needle), child issues and receipts trail - provides SOH
              Last edited by Ray in Capetown; 11-25-2012, 08:55 AM.

              Comment

              Working...
              X