Results 1 to 8 of 8
  1. #1
    angloman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    May 2015
    Location
    Quebec, Canada
    Posts
    16

    Question need help conceptualizing manufacturing LOT tracking database design

    Hi everyone,

    I am having trouble figuring out how to design a database which will allow me to track a raw material lot number through a number of productions until it reaches the final product. I then need to be able to look at a final product and identify the original LOT of the raw materials, and to look at the original raw material LOT to identify all finished products produced with that particular raw material.

    We have production software right now that doesn't do this very well. It uses an access database but a closed source front-end and the designer isn't into working on it anymore. I have no trouble making a connection from access to our production software's DB and import data into my own database. I designed a database that works really well to track the first and second level. The way we work right now is that the production number generated by our production software is used as the tracking number. My database will import the production order, and then a user fills in the raw material quantities used and the LOT number. This works well when I go from raw material to recipe, but I can't figure out how to keep tracking that recipe into another recipe or a finished product. What I have created right now is driven by the production order.

    Here's an example of a raw material and some of the different permutations:

    • Raw almonds LOT #12345
      • ALMONDS - Dry roasted almonds with sea salt (recipe component) production #5000
        • TRAILMIX1 - Trail mix (recipe component) production #5001


          • 06811292021 - Packaged trail mix 300g x 12 (finished product) production #5003

        • 06811292022 - Packaged dry roasted almonds with sea salt (finished product) 800g x 12 production # 5002

      • 06811292023 - Raw almonds packaged 500g x 8 (finished product) production #5004



    So the LOT number on the final product 06811292021 would be 5003. From that, I should be able to work backwards and see that in 5003, I used the recipe TRAILMIX1 from production 5001, which had dry roasted almonds from production 5000 which used almonds from LOT #12345.

    Here's a sample of my DB.
    Last edited by angloman; 05-25-2015 at 08:12 PM. Reason: added an example db

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I did not look at your DB and I do not know much about your business. But, it may be as easy as having a few tables...

    tblLots (Record New LOT#s here)

    tblProductions (Record New Productions Here)

    tblHasLots (Add a tblProductions PK and the associated tblLots PK) many to many

    tblHasProductions (Add a tblProductions and the associated tblProductions PK) many to many

  3. #3
    angloman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    May 2015
    Location
    Quebec, Canada
    Posts
    16
    You might be onto something, but before I try to reinvent my DB, I tried to use the data in my DB to explain where I'm at right now.

    Here's a pdf with the table view from my current DB and some notes.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by angloman View Post
    ...I tried to use the data in my DB to explain where I'm at right now.
    ...
    I took a look at the screenshot. It may be easier for members here if you use this forum to communicate images and samples of your DB. You can use the "Go Advanced" option when replying to take advantage of the upload features.

    The screenshot does not say much. However, it does seem to indicate you are doing something that is commonly referred to as "committing to spreadsheet". Where you are now does not seem to be a very good place. You will not be able to query your data where there is a many to many relationship.

    In order to manage these, "many to many relationships", you will need to create tables that can store, "duplicate PK values", for each of two tables. It would not be a large exercise to attempt to do this in a new sample database. You could use your business model and my explanation in post #2 to get started.

    Perhaps, you can post your Entity Relationship Diagram here if you get stuck. Your ERD does not have to be complex and include symbols that represent one to one or one to many relationships. A simple line should suffice.
    https://www.youtube.com/watch?v=-fQ-bRllhXc

  5. #5
    angloman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    May 2015
    Location
    Quebec, Canada
    Posts
    16
    Quote Originally Posted by ItsMe View Post

    In order to manage these, "many to many relationships", you will need to create tables that can store, "duplicate PK values", for each of two tables. It would not be a large exercise to attempt to do this in a new sample database. You could use your business model and my explanation in post #2 to get started.

    Perhaps, you can post your Entity Relationship Diagram here if you get stuck. Your ERD does not have to be complex and include symbols that represent one to one or one to many relationships. A simple line should suffice.
    https://www.youtube.com/watch?v=-fQ-bRllhXc
    Thanks for the tips about uploading attachments. I was trying to reduce my footprint on this site by hosting the attachments myself.

    I think I'm a little bit out of my league here. I tried building an ERD and ran into the exact same confusion I have with my current database. I think that you are right about my tendency to spreadsheet. I was looking at how some BOM systems work, and I guess I was trying to avoid actually "assembling" products and keeping inventory. I just wanted a simple system to track lot numbers and quantities used of those lots from raw materials to finished products.

    I don't entirely understand how to work with your suggestion. How would this work with my business model of raw materials, sub-products and finished products? Sorry for asking you to spoon feed me but the few Access courses I took in university weren't enough and this is the only place I can turn to for help.

    tblLots (Record New LOT#s here)

    tblProductions (Record New Productions Here)

    tblHasLots (Add a tblProductions PK and the associated tblLots PK) many to many

    tblHasProductions (Add a tblProductions and the associated tblProductions PK) many to many

  6. #6
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I just wanted a simple system to track lot numbers and quantities used of those lots from raw materials to finished products.
    The first step is to identify your Business Rules. I think I understand the need is to track your supply chain for audit purposes. Because of all the different possible recipes, several many to many relationships exist. What I suggested may not manage all of the possible combinations. But, this ERD (there are a couple things not perfect about it) will get you started with a couple many to many relationships I recognized.

    As a side note, some people may argue you do not need a Primary Key field in the table that acts as a Lookup Table (Conjunction Table, Junction Table, or whatever you want to name it). I like to include a unique PK in these tables because if you need it later it will be difficult to add.

    The idea with this ERD is you have your basic tables to store info regarding entities. Here we have two tables for that, tblLots and tblProductions. Then, when a production has many lots, you will create many records in tblHasLots. Similarly, when a single production has many productions, you create many records in tblHasProductions. In the example of tblHasProductions, the ProductionsPK_Parent value will be duplicated for a few to several records, depending on how many other Productions are contained within. Each of these records mentioned will have a distinct ProductionsPK_Child to represent the Parent's composition.

    .
    Click image for larger version. 

Name:	ERD_Many_To_Many_Example.jpg 
Views:	32 
Size:	47.8 KB 
ID:	20829
    Attached Files Attached Files

  7. #7
    angloman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    May 2015
    Location
    Quebec, Canada
    Posts
    16
    Okay I got it. Thanks so much for your help!

  8. #8
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,409

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Database Design Help: Lien Waiver Tracking
    By twarner3 in forum Database Design
    Replies: 8
    Last Post: 12-03-2023, 04:23 PM
  2. Replies: 9
    Last Post: 04-05-2018, 02:20 AM
  3. Replies: 3
    Last Post: 03-13-2014, 11:21 PM
  4. A Challenging Database Design for Manufacturing Process.
    By cap.zadi in forum Database Design
    Replies: 6
    Last Post: 11-10-2012, 11:31 AM
  5. Help With Patient Tracking Database Design
    By wkenddad in forum Programming
    Replies: 2
    Last Post: 04-25-2012, 09:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums