Re: Garden database design
- From: "Amy Blankenship" <Amy_nospam@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 19 Jan 2007 07:31:32 -0600
I think you need to look at it more as the life cycle of an Item. So
tblItem
ItemID
ItemDesc
ItemType
tblItemTypes
ItemTypeID
ItemTypeDesc
tblItemEvent
EventID
ItemID
EventDate
tblEventDetails
EventID
PropertyDesc
PropertyValue
So by using an EventDesc of "Purchase" with PropertyDesc of "Supplier",
"PurchaseAmount" and values of "Gurney's Seed Co." and $1.29, you can record
a purchase. By recording "Light Level" and "dark", in an event with a
description of "Sowing", you can record that you planted the seed and later
you can record a "Planting" event.
I'd suggest that you also have tblEventType and tblEventTypeProperties to
help you make sure that you fill in the correct properties for each event
and that the same event is always called the same thing. However, it will
*work* as modeled above, just not as well.
Have you considered what the data will look like if you only plant a portion
of a seed packet or devide a plant you bought to place into two separate
places in the garden?
HTH;
Amy
"HenBar" <sonypicx@xxxxxxxxxxxx> wrote in message
news:e7HWugwOHHA.5064@xxxxxxxxxxxxxxxxxxxxxxx
I am trying to design a database which will track information about a
garden. I have several entities in mind so far, the most troublesome noted
below with some of the most important attributes.
PurchaseInfo:
PurchaseIdNo (PK)
Supplier
DatePurchased
TypePurchase (which would contain one of the following items[Plant, Seed,
Misc])
....
This is where the problem arises. Depending on the data in the
TypePurchase field, one or more things can happen:
1) If TypePurchase is Plant, it will go directly into the Garden as a
Planting (probably another entity containing information such as location,
number of plants, date planted etc.) It is possible (probable actually)
to set out different numbers of plants on different dates in different
locations.
2a) If TypePurchase is Seed, it could be either sown (planted) directly
into the garden where basically the same information as 1) above would
need to be tracked (again should be different numbers of seeds on
different dates in different locations)
2b) or it could be started inside where additional information will need
to be recorded (Light (light/dark), Heat (warm, cool), date sown, number
seeds sown, Transplant (y/n), if Transplant = y, number of transplants,
date transplanted). These seeds (which are now plants) will be planted
into the garden where they will require that the same information as in
item 1) above be recorded.
3) If the type is Misc, it does not go into the garden.
My problem is that I am unsure of the best way create the additional
entities to track the information about how the Seed information should be
recorded.
Thanks in advance for any help anyone can give me with this,
Hank
.
- Follow-Ups:
- Re: Garden database design
- From: HenBar
- Re: Garden database design
- References:
- Garden database design
- From: HenBar
- Garden database design
- Prev by Date: RE: Printer and Cartridge Database
- Next by Date: The Number of Species on Earth (?)
- Previous by thread: Garden database design
- Next by thread: Re: Garden database design
- Index(es):
Relevant Pages
|