473,382 Members | 1,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Best way to have subcategories?

I have read various things on subcategories. If there is only one
subcategory for a main category it doesn't seem too bad, just another
table, but I was wondering what some of you might recommend as the
best way to created subcategories. What if a subcategory has another
subcategory? I have read about sql adjacency models, but wanted a
real world example to see if this is necessary. thanks in advance.

Feb 12 '07 #1
1 2386
tbl_parts:
part_id - AutoNumber
part_description

tbl_bom (bill_of_material)
bom_id - Autonumber - indexed (No Duplicates)
part_id - Number - FK - PK
sub_part_id - Number - FK - PK (No relationships yet)
qty - Number

This is something I've been toying with for a while. I don't know how
to tool the relationship for the sub_part_id to the tbl_parts. The
problem is that they are two separate instances linked to the same
field. It works well I just use an extra lookup on my form when the
record saves to make sure that the subpart exists.

Cheers,
Jason Lepack

On Feb 12, 11:18 am, "jmDesktop" <needin4mat...@gmail.comwrote:
I have read various things on subcategories. If there is only one
subcategory for a main category it doesn't seem too bad, just another
table, but I was wondering what some of you might recommend as the
best way to created subcategories. What if a subcategory has another
subcategory? I have read about sql adjacency models, but wanted a
real world example to see if this is necessary. thanks in advance.

Feb 12 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bill | last post by:
I've got a bookstore I'm developing, and I wanted to list all the categories on the home page of the site. However, there are so many, that they now extend way below the screen, making the page...
15
by: John J | last post by:
I've written the following code into a class to search for and display the results of all races entered (The complete code is in a previous thread). I wish to amend the code so as to display the...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
3
by: Irene | last post by:
Hi all, I have set up a simple VB program (and later on an ASP interface) to manage an Athletics database. I'm using Access 2000. To simplify, I have the Athlets, the Competitions and the...
10
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read...
13
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use...
3
Staria
by: Staria | last post by:
Hi... I'm currently working on a project where I would like to have Categories and SubCategories. I've banged my head on this for several days, but can't seem to get this the way I want it to...
2
by: DotNetNewbie | last post by:
Hello, I need to display a list of categories on the left side of a page, and I am confused how I would do this using a List Control (as appose to weaving my own HTML on the server side). My...
2
by: itpvision | last post by:
Hello, I have a link navigation of categories retrieved from the database, while I know how to display subcategories based on category link clicked with classical approach, I want to do this with...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.