On Tue, Mar 18, 2008 at 2:48 PM, MB Software Solutions General Account <
[EMAIL PROTECTED]> wrote:

> Stephen Russell wrote:
> > On Tue, Mar 18, 2008 at 10:26 AM, MB Software Solutions General Account
> <
> > [EMAIL PROTECTED]> wrote:
> >
> >
> >> Scenario:  product inventory database, complete with Products,
> >> Locations, Inventory (counts), and Inventory_Transactions tables
> >>
> >> Schema for tables in question:
> >> http://mbsoftwaresolutions.com/temp/partial_schema031808.htm
> >>
> >> I was going to have the Inventory table be populated automatic via
> >> triggers whenever a record is inserted into the Products table.
> >> Likewise similar triggers with the Locations table, so that every
> >> Product/Location combination was represented in the Inventory table.
> >> When a record was inserted in the Inventory_Transactions table, the
> >> i/u/d triggers there would call a generic procedure to recalculate the
> >> qty in stock for that particular iinventoryid (which can be represented
> >> as product/location unique pair too).
> >>
> >> 1) I'm thinking that I might prefer to use a multi-FK of
> >> product/location instead of iinventoryid in Inventory_Transactions, as
> >> it requires one less JOIN back to the Inventory table.
> >>
> >> 2) My approach to maintaining the QtyInStock values in Inventory (done
> >> via the triggers)....do you think this is the best approach?
> >>
> >
> >
> >
> -----------------------------------------------------------------------------
> >
> > Keys would be better as guids.
> >
> >
> >
>
> Steve,
>
> Sometimes I don't understand where you're coming from.  Perhaps I'm
> KeyRock, the frozen caveman software engineer
> (
> http://www.boxxet.com/Saturday_Night_Live/SNL_Phil_Hartman_Unfrozen_Caveman_Lawyer_and_More.130qnc.d
> ),
> but I think I'm sure I stated how I'd be using keys in either
> case....integers or GUIDs...whatever.  But let's play your angle for a
> sec.  How does using GUIDs achieve a better plan for the scenario I
> presented above?   ;-)
>
> --------------------------------------

Use the same db for multiple retail stores for the tires store.  If your
using ints your going to be screwed or have a LOT of code rewrite on your
hand


-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to