x

Stock management - needs suggestions

I need to create a database which will have below modules:

1- Items [Food items, stationary]

2- Items Stock Management [stock in out]

3- Customers

4- Items Sale Management

Issue:

The system will have different types of items & so can have different 'Unit of Measurement'. Possible Units of Measurement can be bags, peaces,Kilograms. Another things is that certain items can be sold as a whole 'unit of measurement' OR 'part of unit of measurement', for example tomato can be sold 2 kilograms or 450grams.

Questions:

1- How should i handle the 'Unit of measurement'?

2- What is the best way to keep the stock in out?

Please forgive me if my question is not clear.

Thanks for your valuable time & help.
more ▼

asked Dec 06 '11 at 01:13 AM in Default

yaqubonnet gravatar image

yaqubonnet
247 16 17 20

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

The the Item can have one or more units of measure? If it's only one, I'd say make it a lookup table linked directly to Items. If more than one, you'll want to set up a lookup table and then an interim table (a table that joins two other tables, classic many-to-many solution).

For second question, just go with a seperate stock transaction table that shows everything moving in AND moving out (pluses and minuses) and then you can aggregate to an answer.

Is this homework?
more ▼

answered Dec 06 '11 at 05:15 AM

Grant Fritchey gravatar image

Grant Fritchey ♦♦
91k 19 21 74

No, its not the homework.
Dec 06 '11 at 06:46 PM yaqubonnet
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x673
x107

asked: Dec 06 '11 at 01:13 AM

Seen: 672 times

Last Updated: Dec 06 '11 at 02:33 AM