how can I make sub categories in access database?

  • Thread starter Thread starter Guest
  • Start date Start date
This is a fairly cryptic post -- what do YOU mean by "make sub categories"?
Are you describing a data structure question, or a forms question, or a
query question, or ...?
 
I'm asking about data structure.. I have a lot of categories in my data
base.. I want to divide them into sub categories..
How can I do that?
 
I'm asking about data structure.. I have a lot of categories in my data
base.. I want to divide them into sub categories..
How can I do that?

One common way is to have a self-referential Category table:

Categories
Category
ParentCategory

This table is related to itself, with a one (ParentCategory) to many
(category) join in the relationships window. A toplevel category has a
NULL in its ParentCategory field. This gives you any desired number of
layers of sub, sub-sub-, sub-sub-sub- categories. Your item table
would then refer to a specific category (at any level), and you can
use a join from MainTable to Categories to Categories to see that
category's parent.

John W. Vinson[MVP]
 
Per wessam:
I'm asking about data structure.. I have a lot of categories in my data
base.. I want to divide them into sub categories..
How can I do that?

Depends on what a "category" or "subCategory" is.

Can one entity be in many categories/subcategories or just one?


OTOH, maybe you're describing a hierarchical structure where different
bottom-level entities can have varying numbers entities above them in a
hierarchy.

viz:
---------------
Vendor
Database
Table
Field
---------------
vs
---------------
Vendor
FeedStream
Field
---------------



The first case would involve a link table between the parent table and the table
containing category names.

e.g.
tblFund---tblFundCategory---tlkpCategory


The second case would involve recursive relationships.

One table with each item having an optional "Parent" - which I cannot figure out
how to represent within the confines of ASCII text...-)
 

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

Back
Top