|
Database Background Information.
The following is of a technical nature but should serve as background
information about the nature of a relational database and how it relates to
this application.
One of the important features of a relational database that permits using a
single table, like the one depicted here as CornContract is SQL Server's
underlying ability to maintain the integrity of the relationships between data
in one table with that of another's.
The term generally used for this ability is called "Referential
Integrity". The key to the CornContract table"s significance, aside from
the information it carries, is the relationship that information has to
other tables and the guarantee that it refers to one and only one entry in
another table where a positive identity is called for.
The methodology that has been applied to the example below is based on a
person or company being responsible for all the components involved and
maintaining a 1:1 correspondence between people and components.
The rules that have been set up in this case insist that either a vendorID
or a growerID exist for all items and events in the system. No seed can be
entered, no plot of land or other asset can be added to the system
without there being a unique ID for the person responsible
pre-existing in either the Grower or Vendor tables..
Additionally, each time a CornContract entry is made, the system
checks to see that the entry for the critical line items (numbered 1,2 and 3
respectively in the charts below) exist in the other tables. This system of checks work both ways.
You cannot, for instance delete a seed entry if there is an active
CornContract in place using that seed. You would not be able to delete a
truck, barge or railcar if it was currently carrying a load listed in the
active contract list either.
This system of rules imposes some limitations on how items are entered into
the database, but they all support the system's integrity. You could not
just give a load to a truck driver and "do the paperwork later"
and have him listed in the system. You must first:
-
Enter the owner of the truck in the
vendor table,
-
Enter the truck in it's proper table.
-
Only then can the entry be made that
marks a portion of that contract as being in that truck.
A database is not just the many tables
that make up its data, it is the interlocking system of rules that govern
the relationships between the different tables as well. (a more
complete map of these relationships can be seen by clicking on the Map
button on the left)
|
Contract Information is tied to
|
|
|
Contract No. |
IL20001JS0006FG |
| 1
|
Seed Serial No. |
BJ565-00271299FG |
|
|
Start Date |
8/1/2000 |
| 2
|
Grower ID |
IL20001JS |
| 3
|
Crop Field |
IL20001006 |
|
|
Crop Type |
Corn-FG |
|
|
Harvest Date |
12/1/2000 |
|
|
Ship Date |
11/7/2000 |
|
|
Test Wt. |
56 lbs./bu. |
|
|
Moist. Cnt. |
16% |
|
|
Dry Yield |
147 Bu./Acre |
|
|
Adj. Yield |
142 Bu/Acre |
|
|
Land Information...
|
|
3
|
Field ID No.
|
IL20001006
|
|
|
Grower ID
|
IL20001JS
|
|
|
Land Desc.
|
NHNEQSWQSEQ20
|
|
|
State
|
IL
|
|
|
Gps Data
|
40:05:11 88:15:33
|
|
|
Acres
|
5
|
|
|
Now Growing
|
IL20001JS0006FG
|
|
|
Last Grew
|
IL20001JS0006FG |
|
|
| Source Seed...
|
| 1
|
Serial No. |
BJ565-00271299FG |
|
|
Prod. Name |
Bojac565 |
|
|
Prod. No. |
565 |
|
|
LotNo. |
565-0027 |
|
|
Mfg. By |
Bojac |
|
|
Mfg. Date |
12/1/1999 |
|
|
|
...and the Grower.
|
| 2
|
Grower ID |
IL20001JS |
|
|
Name |
John Smith
|
|
|
Address |
2121 E. Church |
|
|
City |
Champaign |
|
|
State |
Il |
|
|
Zipcode |
61821 |
|
|
©2000, Enjoya.com
|