Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

inventory with product expiration dates

Posted on 2008-10-14
2
Medium Priority
?
333 Views
Last Modified: 2012-06-27
I'd like some suggestions on how to handle an online shopping cart system where the inventory being sold will consist of products with expiration dates.  I could have 10 cases of product X, but 5 cases expire in 09/2009 and the other 5 expire in 04/2010.  I guess this is a variation of FIFO?

We'll need to run reports of expiring items so they could be discounted or whatever to get them off the shelves.

Any table structure (and other) suggestions would be greatly appreciated!
0
Comment
Question by:marcodiana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Daniel Wilson earned 2000 total points
ID: 22714521
Product
* ProductID -- PK
* Description
* Any other things about the product itself

ProductLot
* ProductLotID -- PK
* ProductID  -- FK to Product
* OriginalQtyInLot -- You might omit this ... but it could be useful information
* CurrentQtyInLot -- this must be decremented as you sell stuff off
* ExpirationDate
0
 

Author Closing Comment

by:marcodiana
ID: 31506005
THANK YOU!  I knew I was over-thinking this and needed to have outside eyes point me in the right direction.  Based on this structure, I can accomplish all of the other pieces I'd need, and accomplish them rather easily.  I couldn't see the forest for the trees.  :-)  Thanks again.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question