Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4617544
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:08:20+00:00 2026-05-22T02:08:20+00:00

I have a table that stores customer items. The table needs to reflect the

  • 0

I have a table that stores customer items. The table needs to reflect the following activities:

  1. When a customer adds an item to his/her queue.
  2. When the item is marked for shipping to the customer.
  3. When the item actually ships.
  4. When the item is marked for return by the customer.
  5. When a return shipping label is created for the item.
  6. When the item is received back from the customer.

The work flow will be as follows:

  1. User(s) add item(s) to list.
  2. Scheduled event marks items for shipping (corresponds to info point 2).
  3. Employee creates shipping labels, then marks items as shipped (to info point 3)
    — Customer receives item, customer is happy.
  4. Customer marks item for return.
  5. Employee creates a shipping label the item.
  6. Item gets picked up and returned.

A customer’s account should show the following:

  1. Items in queue.
  2. Items shipped.
  3. Items marked for return (to allow customer to cancel if customer wants to keep the item for longer).

There is no value (in my scenario) for alerting the customer when an item has been marked for shipping on our end.

I initially thought of inheritance, but things have started to get out of handle quickly. I don’t know if I should have a subclass for each info point. Also, some things seem like they should not be in their own subclass (items marked for shipment, and for return, seem to be “in between” classes)

Should I be using inheritance and create a class for each information point? Or am I over complicating this?

Current schema

items
   - id
   - typeid (in queue, shipped, etc....)
   - userid
   - itemid
   - shippedat
   - returnedat

I’m using mySql, and anticipate the table to be large!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:08:21+00:00Added an answer on May 22, 2026 at 2:08 am

    It sounds like you need a good way to separate the items themselves from the workflow which applies to them. One approach could be as follows:

    • Define a table of items, minimally containing the userid and itemid
    • Define a table of workflow states, minimally containing an id and a name (e.g. ‘processing’, ‘shipped’)
    • Define a table linking items to workflow states, containing a foreign key to the item’s id and a foreign key to the state’s id, plus metadata applicable to the given item in the given state, such as when the state was entered or started/finished, who handled or checked-off the item in that state, etc.

    Now, instead of having state-specific fields such as shippeddate and returneddate on the items table, you can find that data by joining a given item to its workflow (warning: pseudocode ahead!):

    SELECT item.id, item.userid, item_workflow.completed_date AS returned_date
    FROM item
    JOIN item_workflow
    JOIN workflow
    WHERE workflow.state = 'Returned'
    

    By joining items to their workflow and filtering for specific states, you can find items that are or are not in given states, and count items per state. So to address an example from your question:

    There is no value (in my scenario) for
    alerting the customer when an item has
    been marked for shipping on our end.

    In this schema, you search for a given item for a given user, and see if an item_workflow record exists for that item and the workflow state “Shipped”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table customer that stores a customer_id, email and reference. There is
I need a table that stores items and tracks when an item is... queued
We currently have one table that stores information about what the customer owes us.
I have a customer table in the db that stores the name, address etc,
I have a table that stores all the volunteers, and each volunteer will be
I have a table that stores user information. The table has a userid (identity)
I have a table that stores various clients I have done work for, separated
I have mysql table that has a column that stores xml as a string.
I have a table (venues) that stores all the possible venues a volunteer can
I have a Pages table that stores all my view urls and this table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.