C
Christo Yssel
Hi,
I created a small database. I just need to be sure that I have done it all
correctly. Any suggestions would be appreciated.
Scenario:
The database tracks information about farmers who attend auctions. The same
auction may take place more than once, lets say every three months, once a
year, twice maybe. Every auction may be of one or more than one type (Where
type is what is sold at the auction, ex. Breeding Cattle, Horses, Sheep,
Milk Cows). There is a many-to-many relationship between Type and Auction.
A farmer may attend one or more than one auction, but he can also attend the
same auction but on different dates. Farmers and auctions are in a
may-to-many relationship. I need the following reports: A list of all
farmers which attended an auction on a specific date. Whenever a auction is
scheduled we need to print mailing labels to send invitations to farmers,
but these labels are filtered by type. So if the type of the auction is
horses, labels will be printed for all farmers who attended horse type
auctions, but if the auctions is of two types Horses and Milk Cows, labels
must be printed to include both types. (I am not sure how I am going to
prevent duplicate labels in the second case, because a farmer may have
attended both types).
Tables:
Farmers
FarmerID (PK)
Surname
Name
Initials
Address
....
Active (Never delete farmer, set active to no when he does not attend
auctions any more)
FarmerAuctionDetails
FarmerID
AuctionID
Date (I have set the composite primary key to all three fields as the
farmer can attend the same auction but on different dates)
Auctions
AuctionID (PK)
Name
Description
AuctionTypeDetails
AuctionID (FK)
AuctionTypeID (FK) Composite primary key
AuctionTypes
AuctionTypeID
Type
Description
Thanks
Christo
I created a small database. I just need to be sure that I have done it all
correctly. Any suggestions would be appreciated.
Scenario:
The database tracks information about farmers who attend auctions. The same
auction may take place more than once, lets say every three months, once a
year, twice maybe. Every auction may be of one or more than one type (Where
type is what is sold at the auction, ex. Breeding Cattle, Horses, Sheep,
Milk Cows). There is a many-to-many relationship between Type and Auction.
A farmer may attend one or more than one auction, but he can also attend the
same auction but on different dates. Farmers and auctions are in a
may-to-many relationship. I need the following reports: A list of all
farmers which attended an auction on a specific date. Whenever a auction is
scheduled we need to print mailing labels to send invitations to farmers,
but these labels are filtered by type. So if the type of the auction is
horses, labels will be printed for all farmers who attended horse type
auctions, but if the auctions is of two types Horses and Milk Cows, labels
must be printed to include both types. (I am not sure how I am going to
prevent duplicate labels in the second case, because a farmer may have
attended both types).
Tables:
Farmers
FarmerID (PK)
Surname
Name
Initials
Address
....
Active (Never delete farmer, set active to no when he does not attend
auctions any more)
FarmerAuctionDetails
FarmerID
AuctionID
Date (I have set the composite primary key to all three fields as the
farmer can attend the same auction but on different dates)
Auctions
AuctionID (PK)
Name
Description
AuctionTypeDetails
AuctionID (FK)
AuctionTypeID (FK) Composite primary key
AuctionTypes
AuctionTypeID
Type
Description
Thanks
Christo