A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Beginner - 3 tables in 3 loops



 
 
Thread Tools Display Modes
  #1  
Old March 19th, 2010, 10:46 PM posted to microsoft.public.access.tablesdbdesign
dsasorin
external usenet poster
 
Posts: 1
Default Beginner - 3 tables in 3 loops

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 !

  #2  
Old March 19th, 2010, 11: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 !

  #3  
Old March 20th, 2010, 04:00 PM posted to microsoft.public.access.tablesdbdesign
Abki
external usenet poster
 
Posts: 2
Default Beginner - 3 tables in 3 loops

I hope u need data for all tables.

1) You can go thru all tables and data with 1 loop if you do join all tables
in 1 singel select.

2) If the select is manually written it can be like this:
SELECT *
FROM YEAR,
PLANT,
GENERATOR
WHERE PLANT.FK = YEAR PK
AND GENERATOR FK = PLANT.PK

PK = Primary key, FK = foriegn key
You will have 1 row for each unik kombination.

"dsasorin" skrev:

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 !

.

  #4  
Old March 21st, 2010, 01:28 AM posted to microsoft.public.access.tablesdbdesign
dsasorin via AccessMonster.com
external usenet poster
 
Posts: 3
Default Beginner - 3 tables in 3 loops

The goal is to make a growing database (a programm) with inputs like
year2010/powerplant 3/generator1/ .... or year 2012/powerplant7/generator3
and so on ...

Then, the programm must have a simple user interface with those inputs. In
the database tables i must asign diferent numbers (points) on specific tasks
of the generator for example, and after a logical comparison and arithmetic
calculations, it must result a number of points. So i need to input/select
new data, to see/select old data, and after that i need a result (number of
points) which coresponds to a certain ANSWER, introduced in the very
beginning of the database (i.e. THE GENERATOR IS GOOD), also a table, i think.


So, the purpose of the database is to find the state of the generator, based
on the actions or the maintenance work made on each generator from database,
and a new one.
The criteria is based on those points and arithmetic calculations.

Thank you for interest.


Gina Whipp wrote:
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?

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 !


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201003/1

  #5  
Old March 21st, 2010, 01:40 AM posted to microsoft.public.access.tablesdbdesign
dsasorin via AccessMonster.com
external usenet poster
 
Posts: 3
Default Beginner - 3 tables in 3 loops

I forgot that you put me a simple question. My first lessons were like this
(Access 2003): What is a database ? The components of a database (the objects)
. How to sort data in tables ? and thinks like that ...

Gina Whipp wrote:
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?

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 !


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201003/1

  #6  
Old March 21st, 2010, 01:51 AM posted to microsoft.public.access.tablesdbdesign
dsasorin via AccessMonster.com
external usenet poster
 
Posts: 3
Default Beginner - 3 tables in 3 loops

Abki, please forgive me, but i don't understand your answer. Maybe because
i'm a beginner in Access. I don't know how to join tables nor to manually
writte a select. Maybe you get a picture for what i want to do, from my other
answer to Gina Whipp. Thank you too.

Abki wrote:
I hope u need data for all tables.

1) You can go thru all tables and data with 1 loop if you do join all tables
in 1 singel select.

2) If the select is manually written it can be like this:
SELECT *
FROM YEAR,
PLANT,
GENERATOR
WHERE PLANT.FK = YEAR PK
AND GENERATOR FK = PLANT.PK

PK = Primary key, FK = foriegn key
You will have 1 row for each unik kombination.

"dsasorin" skrev:

Hi !

[quoted text clipped - 42 lines]

.


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201003/1

  #7  
Old March 21st, 2010, 01:58 AM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Beginner - 3 tables in 3 loops

dsasorin,

Okay, that didn't get me the answer needed, so let's try this...

1. Is a Powerplant always going to have the same Generator?
2. Do you put in dates when you enter the activities?
3. Where are the activities entered?
4. Where is the data you do the calculations on, is it in a table?

You are concentrating on the how the data will look instead of how to store
the data. It's like buying tires before you buy the vehicle. You need to
buy the vehicle first... or build your tables first.

--
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 via AccessMonster.com" u58852@uwe wrote in message
news:a5507a74f901c@uwe...
The goal is to make a growing database (a programm) with inputs like
year2010/powerplant 3/generator1/ .... or year 2012/powerplant7/generator3
and so on ...

Then, the programm must have a simple user interface with those inputs. In
the database tables i must asign diferent numbers (points) on specific tasks
of the generator for example, and after a logical comparison and arithmetic
calculations, it must result a number of points. So i need to input/select
new data, to see/select old data, and after that i need a result (number of
points) which coresponds to a certain ANSWER, introduced in the very
beginning of the database (i.e. THE GENERATOR IS GOOD), also a table, i
think.


So, the purpose of the database is to find the state of the generator, based
on the actions or the maintenance work made on each generator from database,
and a new one.
The criteria is based on those points and arithmetic calculations.

Thank you for interest.


Gina Whipp wrote:
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?

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 !


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201003/1

  #8  
Old March 21st, 2010, 01:59 AM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Beginner - 3 tables in 3 loops

dsasorin,

Oh okay.. was just curious. But it is interesting that you didn't mention
Data Normalization and Data Modeling, do they teach that?

--
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 via AccessMonster.com" u58852@uwe wrote in message
news:a55094019f828@uwe...
I forgot that you put me a simple question. My first lessons were like this
(Access 2003): What is a database ? The components of a database (the
objects)
How to sort data in tables ? and thinks like that ...

Gina Whipp wrote:
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?

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 !


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...esign/201003/1

  #9  
Old March 22nd, 2010, 11:30 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Beginner - 3 tables in 3 loops

Gina,

More from my EE background than my (much less than yours) database
background, I think that the generators are handled as one-of-a-kind items,
not a list of types that would get used multiple times. Each
instance/installation of a "generator" is typically a $xxx,xxx,xxx.xx
multi-year construction project. If so, then "Generator #1" is just half
of the name given to a particular generator. The full name might be Plant
#5-generator #1 If that were true, IMHO a junction table would not be
appropriate.

- - -

In order to have a good database, or to explain enough to us to help, you
are going to have to start with deciding upon what the entities are that you
are going to database, and what the mission that you want it to accomplish
is. Do this without using any database terminology.


IF (and I emphasize IF, because we don't know that) you main mission were to
track and completed maintenance, then instance of required-then-completed
maintenance would be your main table. In that case the year and or date
would be merely a field, If my guess address to Gina were right, you
would probably have a table with listings of your individual generators. The
plant # might be just half of the name of that generator, or an attribute of
that generator.

Again, these are just guesses. You'll have to tell us more to get a real
answer.

Hope that helps a little.




  #10  
Old March 22nd, 2010, 11:59 PM posted to microsoft.public.access.tablesdbdesign
Fred
external usenet poster
 
Posts: 1,451
Default Beginner - 3 tables in 3 loops

Ooops. The second part was supposed to be addressed to the OP :


"Fred" wrote:

Gina,

More from my EE background than my (much less than yours) database
background, I think that the generators are handled as one-of-a-kind items,
not a list of types that would get used multiple times. Each
instance/installation of a "generator" is typically a $xxx,xxx,xxx.xx
multi-year construction project. If so, then "Generator #1" is just half
of the name given to a particular generator. The full name might be Plant
#5-generator #1 If that were true, IMHO a junction table would not be
appropriate.

- - -


To: Dsasorin:

In order to have a good database, or to explain enough to us to help, you
are going to have to start with deciding upon what the entities are that you
are going to database, and what the mission that you want it to accomplish
is. Do this without using any database terminology.


IF (and I emphasize IF, because we don't know that) you main mission were to
track and completed maintenance, then instance of required-then-completed
maintenance would be your main table. In that case the year and or date
would be merely a field, If my guess address to Gina were right, you
would probably have a table with listings of your individual generators. The
plant # might be just half of the name of that generator, or an attribute of
that generator.

Again, these are just guesses. You'll have to tell us more to get a real
answer.

Hope that helps a little.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.