Splitting a single table into many tables

Mikkel

Registered User.
Local time
Today, 22:51
Joined
Oct 19, 2007
Messages
18
Hi
I have a Products table that I need to divide into multiple tables, eg. Speakers, cameras, amplifiers etc. Dividing the table is easy, but I need to know the basic approach and methods used when a using multiple tables like this. Currently with one table, the database works fine, but do not understand how to work with many tables that used to be one Products table.
My Access 2003 Database is similar to Northwind

Must be a simple question, repeated many times before, but I cannot seem to find the rigt O
 
This is a fairly basic approach but will give you the idea.

If you were to start making a DB for personal contacts then you would have such things as Firstname, LastName, DOB etc. Then there would be details for children of your contacts. They would also have FirstName, LastName, DOB etc. But a problem is how many children. Some people have none while others have 1 or 2 or 6 etc. If these details were on the same record in the same table as your contact then you would need extra fields like FirstName2, LastName2, DOB2 and FirstName3, LastName3, DOB3 etc. This becomes a real problem. Apart from the obvious problems it means that searches, averaging DOB or whatever become very difficult.

Thus a second table is made to store the children details. If someone has 6 kids then there will be 6 records for them in that table. No kids will mean no records.

Thus any data that can be multiple instances of the same type of data and especially where the number of instances is an unknown goes into another table. Each record has the same ID number as the single record for your contacts in the main table.
 
How would I then modify Northwinds approach to the Order Detail form control box ProductID, where the Dlookup on the UnitPrice text box refers to only to the single Products table unitprice field?
 
Dividing the table up is going the wrong way. If you need to pull out different categories of rpoduct, include a field that identifies the category and use a query to select the one you want.
 
If I undestand you correctly, my desire to split a Product Table for purpose of convenience and not principal is the wrong way to go. I just thought it might be easier to work with different tables for different product groups?
Although I am sure one can split the tables for convenience, but it goes a bit beyond my level of expertise at this point. I am trying to use as little VBA as possible as I am still not very good at it.
Any closing comments? Thanks for the support! Much appreciated..
Mike
 
You don't need VBA to query a single table for the category you are interested in, just a parameter query.
 
Before we get too deep, I want to emphasize that this is your project. If you want to split, fine. If you want to know how to keep it together, fine.

THEORY says you should not split a table that contains things that have the same function in your business. You should merely qualify the items with a class-code that says, this is a camera, that is a projector, this is a left-handed veeblefetzer.

But for folks not used to Access, that is a confusing statement because you often don't realize exactly what you are doing at a higher viewpoint. So excuse me if I put on my "professor" hat for just a moment.

Access is a business modeling tool, one of many such products. It is just not as clear that that it is such a tool. But ALL database tools of any quality allow you to make a "model" of your business. Let's say that your business is a retail store. OK, what do you do in a retail store? You SELL things. So what is your business model?

Well, you have inventory in stock from suppliers. You can have orders pending. You sell inventory from stock (or from back-order lists) to customers. What does that mean in simple terms regarding business models and Access?

It means you would have tables for your suppliers, customers, supply orders, and product line information. These tables would have relationships based on matching keys. Read up on "database normalization" before you go too far with this, but let me get to the point of why you don't split your product line table.

In your business model, your cameras, speakers, and other items all play they same role. They are items to be bought, stocked, and sold. It doesn't matter whether they are cameras, speakers, left-handed veeblefetzers, or Christmas ornaments.

If you want to keep separated product descriptions for special purposes, there are ways to do this that keep the base product descriptions together and just have separate detail tables for the things that cannot be retained in the base table because sometimes the descriptives just don't fit. But you must not lose sight of the purpose of your inventory. Splitting the tables into product types might lead to that point.
 
Well said Doc Man (as usual). I'm not going to evangelise on splitting or not splitting, since I'm happy to break the rules when it suits me. I just find it easier knowing that I'm breaking the rules and I have to be sure that this is justified. Of course it's much easier after 10 years of databse design that 10 minutes!
 
Well thanks guys, I think Doc Man put the proverbial nail in the coffin of my problem, which is one of principal more than technical prowess. Now on to my next problem...
Cheers!
Mke;)
 
Thanks Guys! I think this solves the principal issue, one of principal rather than technical prowess.
Cheers!
Mike
 

Users who are viewing this thread

Back
Top Bottom