suggest - me not satisfied !

J

jason

I have to keep inventory records. i have designed 3
tables:
items: item_id, name, qty
issued: transaction_id, item_id(FK from items), qty_issued
received:transaction_id, item_id(FK), qty_received

Whenever i receive item...
1.I simply record the transaction as it is to received
table,
2.and add that received quantity into items table (macro
used on onUpdate event).

Likewise i deduct the issued qty from items table while
issuing through issued table. Is my design good or do i
need some improvement?
 
S

Steve Schapel

Jason,

Your design is unnecessarily complicated, and your methods unnecessarily
difficult. For this type of application, you only need one table, with
fields like this...

Item_id
ItemName
TransactionDate
TransactionQuantity
TransactionType (this means issued/received)

When the data is in this structure, data entry is very simple, and it is
really easy at any point to use a query to derive quantity on hand for
any item, totals issued and received, etc.
 
S

Steve Schapel

Jason,

Apologies. On second thoughts, I would do two tables:

Table: Items
Item_id
ItemName
other item-specific fields

Table: Transactions
TransactionID
Item_id
TransactionDate
TransactionQuantity
TransactionType (this means issued/received)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top