hmm...i'm doing this rather big inventory-thingy myself, and i - even though i completly lack any formal SQL-education must warn against being TOO formalistic. i was striving towards complete orthogonality (sp?) and used indices everywhere - but now i have SQL statements that basically only consist of tons and tons of JOINs, which can get really, really slow if you have a moderate database (>100k rows). and even though i fear that i'll loose my recently aquiered status of 'monk' by suggesting this, i'd say that if you have information (like sections) that don't change too much, and wont clash too often, at least give the over-simplistic "simply-put-the-name-in-the-column" approach at least a thought....for simple systems, i'd almost say that it's the better approach. (the people that did the old system which i am replacing always wonder why i have to use all that SQL for some simplistic stuff, when they simply ran through the tables without really thinking too much...but then again, i am replacing their system ;-)
that being said, here's what i am doing:
every item has a couple of columns that are 'group-ids'. in a seperate table i store all grouping-information (id, name, subgroup of, contains items of type id X, etc.). i might migrate the 'id' part to actually being a 'id-path', i.e. "000100060007" would mean 'item is in subgroup 0007 of subgroup 0006 of group 0001' - that way, listing all items in group 0001 and below is trivial (in contrast to eternal 'does this group have any sub-group?' loops).
i manage the prices with a field containing the percents of discount (but that was a requirement). your approach looks fine to me.
good luck, and keep it simple - some times the simpler way IS the better way, IMHO (my theory being that so many geeks have long beards because they never heard of occham's razor ;-). inventory systems are hell, i tell ya!

but please DO take all this with a load of salt - i'm a radical autodidact.

In reply to Re: Managing Inventory Sections with Perl and SQL by schweini
in thread Managing Inventory Sections with Perl and SQL by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.