Share you idea to maintain stock warehouse [message #528048] |
Fri, 21 October 2011 05:56 |
irsathahamed
Messages: 12 Registered: April 2008 Location: UAE
|
Junior Member |
|
|
Dear All,
Please share your idea which is the best way in maintaining stock in warehouse wise. I would be very thankful if you can advice me how will I design my tables to store and maintaining stocks.
Thanks in advance.
|
|
|
|
|
Re: Share you idea to maintain stock warehouse [message #528068 is a reply to message #528064] |
Fri, 21 October 2011 06:44 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
Ahh, I was in too much of a hurry there. You posted in an ok forum, I thought that you had pm'd me, but rather, you reported the post. do not do that the report post function is not to be used for you to try to get your question posted faster, it is there to report innappropriate or abusive posts.
|
|
|
|
|
|
Re: Share you idea to maintain stock warehouse [message #528075 is a reply to message #528072] |
Fri, 21 October 2011 07:03 |
irsathahamed
Messages: 12 Registered: April 2008 Location: UAE
|
Junior Member |
|
|
Fine here is my idea, Tell me if I need to imporve or change..
There are 2 table im going to use for that
1. warehouse_master(warehouse_id, warehouse_name)
2. current_stock(item_code, item_descripton, quantity, warehouse_id).
What my worry is if my product master has more item like 1000 items then i need to repeat all item for each warehouse in order to maintain warehouse wise.
Does this will affect the perfomence when I fetch the details on forms?
Is there anyother way to achive this?
Now please share your idea..
Thanks.
|
|
|
Re: Share you idea to maintain stock warehouse [message #528077 is a reply to message #528075] |
Fri, 21 October 2011 07:06 |
pablolee
Messages: 2882 Registered: May 2007 Location: Scotland
|
Senior Member |
|
|
I would suggest a table in between your two tables.
1 table for the warehouse, 1 table for the stock items, 1 table that lists each stock item and in which warehouse(s) it sits.
Now, since this is clearly an extremely simplified set of data, I'm assuming that this is school work, is that correct?
[Updated on: Fri, 21 October 2011 07:06] Report message to a moderator
|
|
|
Re: Share you idea to maintain stock warehouse [message #528093 is a reply to message #528077] |
Fri, 21 October 2011 09:25 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Let's assume this is homework. You probably need to think about Third Normal Form. To formalize Pablo's analysis:
One warehouse may contain many items; one item may be present in many warehouses. This a many-to-many relationship, and as good relational engineers, we do do not permit such a thing. You resolve the many-to-many relationship by putting a third entity between the two, which will state how many of the item are in a particular warehouse.
(edit: corrected "any" to "many" in the sentence above. JW.)
[Updated on: Fri, 21 October 2011 09:43] Report message to a moderator
|
|
|
|
|
Re: Share you idea to maintain stock warehouse [message #528097 is a reply to message #528075] |
Fri, 21 October 2011 09:40 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
irsathahamed wrote on Fri, 21 October 2011 05:03Fine here is my idea, Tell me if I need to imporve or change..
There are 2 table im going to use for that
1. warehouse_master(warehouse_id, warehouse_name)
2. current_stock(item_code, item_descripton, quantity, warehouse_id).
What my worry is if my product master has more item like 1000 items then i need to repeat all item for each warehouse in order to maintain warehouse wise.
Does this will affect the perfomence when I fetch the details on forms?
Is there anyother way to achive this?
Now please share your idea..
Thanks.
It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
realize that we all can read & write SQL so instead of describing in words any TABLE, just post actual DDL
every application should be designed to at least Third Normal Form
|
|
|