473,398 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Normalized Inventory Database

Seth Schrock
2,965 Expert 2GB
I've started thinking about creating an inventory database, which is something that I've never done before. I definitely want it to be normalized. But my question is the storing of current inventory numbers. My first instinct would be to always perform the math of add all new shipments minus sales equals current inventory so that there is no storage of a calculated value. However, say 10 years down the road, that could be a lot of math happening for many products and result in a serious performance hit. As I said before, I've never done this, so I'm just assuming about the performance hit. Is this a real concern, or should I not worry about it?

I have heard that with banking databases (similar in that there is a lot of ins and outs changing the balance of the account) they store the balance of each account at the end of the processing day. Is this the best way to do it? Just looking for some general direction from someone who has more experience than me.
Jan 6 '17 #1
2 1010
jforbes
1,107 Expert 1GB
The best I've seen in practice is to do both. Both store the current Inventory Levels as well as have a routine that calculates the Inventory Levels on the fly. This gives the flexibility of recalculating the levels as needed, but also having a level to work with readily at hand.

In the Transaction Table, there would also be Transaction Types to Add and Remove Inventory as well as a third type to Set the Inventory Level (with a reason code). This way, you can archive Transactions and create a Set Level Record that would take place of all the Historical Transaction Records. This can be done after a Physical Inventory (where Items are physically counted) or as a part Year End. Ultimately the Set Inventory Level Transaction would allow you to shrink your Transaction Table as needed, saving time on calculations.

The routine to calculate the Inventory Levels could be parameterized to receive an Item Number, to give the flexibility of recalculating the level of a specific Item or Group of Items. If you are using SQL Server as the backend, you could call the calculation in the Transaction Table Insert/Update Trigger which would keep your Inventory Levels current pretty much no matter what.

A subset of suggested Tables would be (at the most basic level):
Item - Detail on an Inventoriable Item.
Warehouse - Warehouse locations, generally a set of shelves where an Item would be inventoried once and only once. Sometimes there are multiple Warehouses at a single street address so that inventory can be moved between Warehouses. For example, Receive Items into Distributor Stock and then move them to Production Stock as needed so that a machine could be built.
ItemWarehouse - This is where the Inventory Levels would be stored. It's a many-to-many between Items and Warehouses. The Transactions Table would reference this Table for the Source and Destination of Item Transfers.
Site - A Site is a Physical Building (or campus), typically with multiple Warehouses. A Warehouse would have a Foreign Key to the Site Table. You may not need this if you aren't planning on having Locations on different sides of town or in different States.

There's a lot more to this, which I'm sure you will are quite capable of tackling. Like always, we are here.
Jan 6 '17 #2
Seth Schrock
2,965 Expert 2GB
Thanks for that. I also found Allen Browne's little tutorial about it. It brought up some points that basically force you to perform a count periodically: items go missing from inventory. Between your suggestions and Allen's article, I think that I can do what I need to.

Thanks again.
Jan 7 '17 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: DeepDiver | last post by:
I am developing an inventory database in SQL Server. I realize there are many commercial (as well as some non-commercial) inventory offerings, but my client has specific requirements that would...
6
by: mpmason14 | last post by:
I found a vbscript on vbskrypt.com that allows me to inventory the software installed on my computer and puts it in an Access database. problem: the script only finds those programs installed...
12
by: suprdad25 | last post by:
I was given an assignment to create a MS Access home inventory database that has a minimum of 5 tables. I have 7 tables (Appliances,Vehicles,Movies,Furniture,Games,Electronics, and Rooms) The...
1
by: linktoali | last post by:
I need a demo project on inventory database system with the backend SQL server databa in VB.net
5
by: StephR | last post by:
Hello! I'm not very good in making code work for me, so I thought I would put it on here and ask for some suggestions. Here is some back ground. I have an inventory database that I can log what is...
5
by: StephR | last post by:
Hi guys. I posted a question last week about getting the order qty based on my case packs. I couldn't figure out the code, and I couldn't seem to explain myself right. So what I did was added 5 new...
2
by: pkfloyd | last post by:
I am looking to create a database which will keep track of a warehouse inventory as well as inventory on sales trucks and track customer sales. Want to link tables so that totals are linked when...
2
by: RoaringChicken | last post by:
Hi. Vista Ultimate Access 2007 I'm developing an inventory database and have question on design. The database stores collection details. One item in the collection, one record. The design...
0
by: suradj | last post by:
Friends, Newbie I have a database with: Tables: tblEmployee
6
by: Amanda Shuping | last post by:
I am trying out this program for a auto inventory database, I have mostly figured out the year, make, but can not see a field to modify for models to narrow search down, can someone please help,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.