View Single Post
  #2  
Old March 19th, 2010, 10:08 PM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Beginner - 3 tables in 3 loops

dsasorin,

Well, at least one of those tables is wrong and you are missing one,
possibly two tables. I am not totally clear what you are doing but I can
say this... it seems odd that you need a table for years. Sounds like you
need a *joiner* table.

tblPowerPlants
pPowerPlantID (PK - Autonumber)
etc...

tblGenerators
gGeneratorID (PK - Autonumber)
etc...

tblPowerPlantGenerators
ppgPowerPlantGeneratorID (PK - Autonumber)
ppgPowerPlantID (FK - Long)
ppgGeneratorID (FK - Long)

tblPowerPlantYears
ppgPowerPlantGeneratorID (FK - Long)
ppgYear (Combo Box with years)

If you explain your purpose a little more it would help to give you a more
precise answer. I also don't understand the *looping*, what are the loops
for? Out of curiousity, what were the first lessons?

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"dsasorin" u58852@uwe wrote in message news:a5427d702fbf8@uwe...
Hi !

I am a beginner to databeses, and particulary to MS Access 2003. (althought
I
passed the first lessons)
I want to make a small database with possibility to grow up. (max. 100
entries for a table)
I think that in my case the data must be structured like loop into loop.
Like that:

Year:
2000
2001
2002
2003
etc.

Plant:
plant_1
plant_2
plant_3
etc.

Generator:
gen_1
gen_2
gen_3
etc.

So for every Year it must exist some Power Plants, and for every Power Plant
it must exist some Generators.
I already have made 3 tables: YEAR, PLANT, GENERATOR with data in it.
So, few questions arise:

1. Is my algorithm any good (to consider 3 loops one in another for
database)
?
2. If my algorithm is good, how should it be done the relationship between
tables ?

That is for start. Later i must make queries, input data, some logical
comparison, etc.
So i must do right from the beginning. I admit that my database must be done
for 8 loops, not 3, but if i understand for 3, the same it will be for 8.

Thanks in advance for help !