Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Design 1

Status
Not open for further replies.

SpankYou

Programmer
Feb 24, 2003
211
GB
Sorry Bout this I'm a bit new to the database world, I'm creating a database, and I was wondering whether for a table called components, to think of these components as just "components" or whether they should be valued as "type of components".
Considering each possible value results in completely opposite results for example...

Example 1: 1 batch (collection of same type components) contains 1 "type of component"

Example 2: 1 batch (collection of same type components) contains Many "component's"

I anyone has any understanding of what i'm trying to say please help.


Sam
 
You could have a table called Batches that describes each "batch" - what the batches are for, where they're stored, etc. with a primary key, let's say, batchID.
Then you could have another table called Components that descibes the individual components and their properties. Primary key componentID.
Now, it seesm that one component can belong to many batches and one batch can have many components. So a classic many to many relationship.
You would then need a third table, called a "junction table" in access, that has the primary fields of both tables, in this case a field called batchID and componentID. You would then have these as a multi-field primary key for the junction table (call it batcom). Using this table, you would create the connection between a "batch" and a "component".

Neil
 
Just to say thanks, I realise I forgot at the time.

Anyway thank you

Cheers


Sam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top