From: mvelez@unixg.ubc.ca (Michael Velez)
Newsgroups: comp.databases
Subject: help designing Paradox files/forms
Date: 27 Jan 93 08:27:22 GMT
Organization: The University of British Columbia
NNTP-Posting-Host: unixg.ubc.ca
Summary: Need help designing paradox files and forms
Keywords: Paradox forms file structure advise help

I'm new to paradox 4.0 and would like some recommendations on
designing my database. It is going to be used for on a farm and will
hopefully keep track of the breeding history of various sows and boars
(pigs).


I forsee having four main data files.
   - a Sow file that contains the Sow information, one record per Sow

   - a Boar file that contains the Boar information, one record per
     Boar

   - a Breeding file that contains a separate record for each breeding
       attempt, with a "LitterNumber" to identify this particular
       litter of pigs.

   - a Litter file that contains shipping info for this litter.

   file descriptions:
       Sow - IDTAG          Boar - IDTAG          Breed - Sow_IDTAG
           - DateIn              - DateIn               - Boar_IDTAG
           - DateOut             - DateOut              - LitterNumber
           - [more fields]       - [more fields]        - BreedingDate
                                                        - [more fields]

       Litters - LitterNumber
               - DateShipped
               - ShipWeight
               - [more fields]

Relations:
 1) A Sow will multiple Breed records, which within themselves (Breed
    file) will contain a unique LitterNumber that will be linked to the
    Litters file.

 2) The Boar file is linked to the Breed file and thus the Litters
    file in the same way as the Sows are.

 3) The Breed file contains all the specific breeding information and
    must somehow be linked to the Sow file, the Boar file and to the
    Litters file.


I assume that the IDTAG field in both Sow and Boar files, and the
LitterNumber field in the Litters file should all be indexed. The
question is: how do I link in the Breed file?



Another question: We need to display this Sow-Breed information in
columns like the following:


  | -----------------------------------------------------------|
  | Sow:  _____    DateIn:  _____                              |
  |                DateOut: _____                              |
  | -----------------------------------------------------------|
  |                Breed rec #1 |  Breed rec #2 | Breed rec #3 |
  |              |              |               |              |
  | Boar ID:     |              |               |              |
  | BreedingDate:|              |               |              |
  | LitterNumber:|              |               |              |
  |   [etc]      |              |               |              |
  |                                                            |
  |-------------------------------------------------------------


I can get multiple records horizontally using a form, but haven't
found any way to display them vertically. Is this possible using a
form? I don't really have any choice in the matter, I have to display
them this way (the Boss says so). What are my options?

Any ideas on the file design or form design would be greatly
appreciated!

Scott
-- 
Michael Scott Velez           |     "If God could dance, it would be
mvelez@unixg.ubc.ca           |     in a black t-shirt and at 140bpms."
Scott_Velez@mindlink.bc.ca    |
Newsgroups: comp.databases