Results 1 to 10 of 10
  1. #1
    bigoby is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    5

    Database design for container tracking system

    Hi,

    I am designing a shipping container tracking system for my work and would like to know what the best design is for this.

    There are many excel sheets that provide data on the status of containers along the supply chain i.e. shipping schedule, data from the logistics supplier showing status at the wharf, data for movements on our site etc.

    Each container has a unique identifier according to what stock it carries and also a container no. designated by the shipping line. I was planning on use the first one as a primary key.

    My first instinct was to have a main table that contained all of the information, with queries that updated the fields from the other data sheets.



    Could you please advice if this is an appropriate design?

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616

  3. #3
    bigoby is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    5
    Thanks for getting back to me. That does seem to be useful, however my problem is less complicated than that.

    There are no customers, products or orders. There is only containers and dates on when they were at various points in the supply chain.

    We want to be able to track how long each container was at a certain point e.g. at the wharf, on our site, in transit etc.

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    To start with, create three tables -
    tblContainers : ContainerID as PK, ContainerNAme as identifier for a container
    tblLocations : LocationID as PK, LocationNAme
    tblContainerMovement which will have Container(foreign key tblContainers) ,Location(foreign key tblLocations) and EntryDate ( date the container entered a location) and ExitDate ( date the container exited a location).

    The field exitdate may not be required as a query may be able to pull the duration a container was at particular location( by subtracting this entryDate from the next immediate EntryDate for that particular container). Post your questions and experts in the forum will guide you.

  5. #5
    bigoby is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    5
    That sounds like the right way to go. I will try this and post again if any problems. Cheers!

  6. #6
    bigoby is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    5
    I have made the tables you suggested and it seems that this solution will work.

    However, I need to determine the status of each container according where it is. I can't seem to figure out a way of doing this from the tblContainerMovements because there will be duplicate entries. E.g. the same container will be listed with its date at the Wharf, on site etc. How can I determine the status from duplicate entries?

  7. #7
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    E.g. the same container will be listed with its date at the Wharf, on site etc.
    You need to create a business (rule if it suits ) that a container can be at only one location on a particular date at a particular time say 8:00AM and the container's entry date to a new place will be the next day. If this doesn't fit in your business rule, then you have to save the time along with the date. I have never dealt with data involving time.
    One more option is to save the date & time in numerical form, though displaying in date form. Try this ?CDbl(Now) in immediate window to see date & time in numerical form
    Maybe someone else on forum has a better idea .

  8. #8
    bigoby is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2014
    Posts
    5
    I'm not sure if I explained my problem properly, sorry. So say I have these movements:

    Container Location EntryDate
    A0001 Warf 20/04/2014
    A0001 Yard 22/04/2014
    A0001 Shop 26/04/2014
    A0002 Warf 25/04/2014
    A0002 Yard 26/04/2014

    I want a query to produce this summary:

    Container Location Status
    A0001 Shop Unpacked
    A0002 Yard Sealed

  9. #9
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    India
    Posts
    616
    Do you need their last location as per records? Use a "group by" in your query with max of entry date.

  10. #10
    Join Date
    Apr 2017
    Posts
    1,769
    Create a saved query, p.e.
    Code:
    qLastDate = SELECT Container, MAX(EntryDate) AS LastDate From tblMovements
    Now you can have the query
    Code:
    SELECT mov.Container, mov.Location, mov.EntryDate From qLastDate ld INNER JOIN tblMovements mov ON mov.Container = ld.Container AND mov.EntryDate = ld.LastEntry

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: 3
    Last Post: 03-13-2014, 11:21 PM
  3. Replies: 1
    Last Post: 06-28-2012, 01:46 AM
  4. Help With Patient Tracking Database Design
    By wkenddad in forum Programming
    Replies: 2
    Last Post: 04-25-2012, 09:15 PM
  5. Cafeteria tracking system design
    By tsr_83 in forum Programming
    Replies: 2
    Last Post: 07-28-2010, 09:45 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