(Msg. 1) Posted: Wed Oct 01, 2008 12:02 pm
Post subject: Design Question Archived from groups: microsoft>public>access>tablesdbdesign (more info?)
I am looking for some database design advice. I am attempting to create a
inventory type database.
I had envisioned One main table for products, with lookup tables to make it
easy for the issuer to find what they are looking for when they issue it.
For example if there were a number of main categories, each of the main
categories would have sub categories which would further describe the item,
and become available when a particular category was chosen. (Kind of a drill
down approach)
ie: Main Category: Shirt
Second Level Category: Long Sleeve
Third Level: Men's
Fourth Level: Size Large
Are Lookup tables for each of the categories and subcategories the wrong way
to go? It's starting to look like there will be many, many, many lookup
tables if I continue this way...Could someone suggest another approach to
this? Am I way off base with the lookup table strategy?
(Msg. 2) Posted: Wed Oct 01, 2008 3:54 pm
Post subject: Re: Design Question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Lookup tables are the way to go.
HTH
--
-Larry-
--
"karbar" <karbar RemoveThis @discussions.microsoft.com> wrote in message
news:2B90FC36-5898-4508-9E91-13C93F3F995F@microsoft.com...
> I am looking for some database design advice. I am attempting to
create a
> inventory type database.
>
> I had envisioned One main table for products, with lookup tables to
make it
> easy for the issuer to find what they are looking for when they
issue it.
> For example if there were a number of main categories, each of the
main
> categories would have sub categories which would further describe
the item,
> and become available when a particular category was chosen. (Kind of
a drill
> down approach)
>
> ie: Main Category: Shirt
> Second Level Category: Long Sleeve
> Third Level: Men's
> Fourth Level: Size Large
>
> Are Lookup tables for each of the categories and subcategories the
wrong way
> to go? It's starting to look like there will be many, many, many
lookup
> tables if I continue this way...Could someone suggest another
approach to
> this? Am I way off base with the lookup table strategy?
(Msg. 3) Posted: Wed Oct 01, 2008 6:15 pm
Post subject: Re: Design Question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
On Wed, 1 Oct 2008 12:02:02 -0700, karbar
<karbar DeleteThis @discussions.microsoft.com> wrote:
>I am looking for some database design advice. I am attempting to create a
>inventory type database.
>
>I had envisioned One main table for products, with lookup tables to make it
>easy for the issuer to find what they are looking for when they issue it.
>For example if there were a number of main categories, each of the main
>categories would have sub categories which would further describe the item,
>and become available when a particular category was chosen. (Kind of a drill
>down approach)
>
>ie: Main Category: Shirt
> Second Level Category: Long Sleeve
> Third Level: Men's
> Fourth Level: Size Large
>
>Are Lookup tables for each of the categories and subcategories the wrong way
>to go? It's starting to look like there will be many, many, many lookup
>tables if I continue this way...Could someone suggest another approach to
>this? Am I way off base with the lookup table strategy?
In general, your idea of lookup tables is correct.
However, you may find that thinking of it as a hierarchy with Levels
won't work. For example, may different products might be considered
Men's, but you wouldn't want to create a different Men's value for
each Category and Subcategory, right?
Shirt - Long Sleeve - Men's
Shirt - Short Sleeve - Men's
Shirt - Tank Top - Men's
....
It would probably be better to make some of your lookup tables
independent of each other instead of hierarchical. For example, you
could have a Gender lookup table with Men, Women, Kids, etc. This
would not have anything to do with Category of Shirt, Pants, Belts,
Shoes, etc.
If you think you know what all the lookups are going to be, then you
can put a foreign key for each one in your Product table. You'll lose
the benefit of your cascading comboboxes, but you'll have much more
flexibility in setting up combinations with fewer redundant lookup
values.
But if you think they'll change and expand over time, or if you'll
need to link a Product with more than one lookup value from the same
table, then you'll need to use more of an Attribute approach.
This gets more complex, but basically you have a cross-reference table
that links Products with Attributes. Each Attribute (Men, Shirt)
belongs to an Attribute Group (Gender, Type). With the
cross-reference table you can now link a product with many different
attributes and use flexible queries to find them later.
(Msg. 4) Posted: Thu Oct 02, 2008 5:46 am
Post subject: Re: Design Question [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
Armen and Larry,
Thank you both.
I hadn't thought of a cross-reference table like that, I think after reading
your posts, I will take a "combined" approach, a mix of lookup tables and a
cross ref table.
Many thanks,
Karen
"Armen Stein" wrote:
> On Wed, 1 Oct 2008 12:02:02 -0700, karbar
> <karbar DeleteThis @discussions.microsoft.com> wrote:
>
> >I am looking for some database design advice. I am attempting to create a
> >inventory type database.
> >
> >I had envisioned One main table for products, with lookup tables to make it
> >easy for the issuer to find what they are looking for when they issue it.
> >For example if there were a number of main categories, each of the main
> >categories would have sub categories which would further describe the item,
> >and become available when a particular category was chosen. (Kind of a drill
> >down approach)
> >
> >ie: Main Category: Shirt
> > Second Level Category: Long Sleeve
> > Third Level: Men's
> > Fourth Level: Size Large
> >
> >Are Lookup tables for each of the categories and subcategories the wrong way
> >to go? It's starting to look like there will be many, many, many lookup
> >tables if I continue this way...Could someone suggest another approach to
> >this? Am I way off base with the lookup table strategy?
>
> In general, your idea of lookup tables is correct.
>
> However, you may find that thinking of it as a hierarchy with Levels
> won't work. For example, may different products might be considered
> Men's, but you wouldn't want to create a different Men's value for
> each Category and Subcategory, right?
>
> Shirt - Long Sleeve - Men's
> Shirt - Short Sleeve - Men's
> Shirt - Tank Top - Men's
> ....
>
> It would probably be better to make some of your lookup tables
> independent of each other instead of hierarchical. For example, you
> could have a Gender lookup table with Men, Women, Kids, etc. This
> would not have anything to do with Category of Shirt, Pants, Belts,
> Shoes, etc.
>
> If you think you know what all the lookups are going to be, then you
> can put a foreign key for each one in your Product table. You'll lose
> the benefit of your cascading comboboxes, but you'll have much more
> flexibility in setting up combinations with fewer redundant lookup
> values.
>
> But if you think they'll change and expand over time, or if you'll
> need to link a Product with more than one lookup value from the same
> table, then you'll need to use more of an Attribute approach.
>
> This gets more complex, but basically you have a cross-reference table
> that links Products with Attributes. Each Attribute (Men, Shirt)
> belongs to an Attribute Group (Gender, Type). With the
> cross-reference table you can now link a product with many different
> attributes and use flexible queries to find them later.
>
> Armen Stein
> Microsoft Access MVP
> www.JStreetTech.com >
>
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum