Stuck in workorder.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a food database for my dogs. I have created the data in excel,
and imported the table into access, and now I am stuck! I just don´t know in
what order to to things. This is what I want to achieve: I want to put in the
amount of different foods I gave the dogs that day and get their ratio of
minerals and vitamins.
What do I need to to? Create query or form? I have really tried, and read
the helpsection, but it is all just spinning around in my head now...

/Falin
 
hi,
The purpose of a database is to store data.
First decide what data you need to store.
Second develope a way to put data in the tables. this is
usually done with forms. Remember-garbage in/garbage out.
Third develope a way to get data out of the tables. this
is usually done with queries/reports.
Last if you need to manipulate the data in the tables,
develope ways of doing that. this is usually done with
various action queries ie append, update, maketable ect.
it does get a tad more complicated but this is the 4
point blueprint i use to create my databases. It all
depends on what you need to do.
 
Hi!
Then I am on step three, I want to get data out of the table. I have all the
information about the food I need, and for example the amounts of protein and
calcium per 100 g. Now I want to be able to put in 20 g carrots and 200 g
potatoes and get to know how much protein and calcium that contains.

/Falin

"(e-mail address removed)" skrev:
 
I am creating a food database for my dogs. I have created the data in excel,
and imported the table into access, and now I am stuck! I just don´t know in
what order to to things. This is what I want to achieve: I want to put in the
amount of different foods I gave the dogs that day and get their ratio of
minerals and vitamins.
What do I need to to? Create query or form? I have really tried, and read
the helpsection, but it is all just spinning around in my head now...

/Falin

You'll need to have more than one table. Excel is a spreadsheet, a
good one; but a spreadsheet and a relational database are as different
as cats and dogs (or more so!)

I'd suggest you have at least six tables:

Animals
AnimalID 'unique identifier, autonumber or manual
AnimalName
Weight
DateOfBirth
<other info about the dog>

Foods
FoodID ' autonumber Primary Key
FoodName <e.g. Science Diet Senior dry food>
<any other needed info about the product>

Nutrients
NutrientID ' autonumber Primary Key
NutrientName (e.g. calories, zinc, Vitamin B6, ...>
Comments

FoodComposition
FoodID ' link to Foods
NutrientID ' link to Nutrients
Amount
Units ' e.g. 100 IU Vitamin D, 340 mg Mg, ...

Feeding
FeedingID Autonumber
FeedingDate date/time
AnimalID ' link to Animals
<probably need something about uneaten amount>
Comments

FeedingComposition
FeedingID ' link to Feeding
FoodID ' link to Foods
Quantity ' ounces or grams

You can then create Queries to sum up the nutrients for any particular
day's Feedings, joining Feeding to FeedingComposition to Foods to
FoodCompositions to Nutrients and making it into a Totals query.

Other arrangements of tables may be designed, but this seems to be a
good fit to me, based on the little I understand of your requirements.

John W. Vinson[MVP]
 
To start you need tables like this:

TblFood
FoodID
NameOfFood
Selected 'Yes/No Data Type

TblMineral
MineralID
MineralName

TblVitamin
VitaminID
VitaminName

TblGramMineralInOunceOfFood
GramMineralInOunceOfFoodID
FoodID
MineralID
GramMineralInOunceOfFood

TblGramVitaminInOunceOfFood
GramVitaminInOunceOfFoodID
FoodID
VitaminID
GramVitaminInOunceOfFood

TblFoodForDog
FoodForDog
FoodID
OuncesOfFood
 
Back
Top