The goal of this case study is to give the reader an initial look at Python code that uses the gDS functionality.
In order to run the code you must place it on a Linux (real or virtual) host.
- The example features three tables — gCounty, gFarm, and gAnimal. See the schema file "animalFarm_01.dd".
- gFarms cite the gCounties they are located in. gAnimals cite the gFarms they exist on.
- The code starts by creating a few rows in the gCounty and gFarm tables using straight-line calls to the respective "AddARow" routines.
- The example then spawns a number of simultaneous processes. Each process inserts one gAnimal row into the gAnimal table under a system lock.
- After the processes are complete, the three tables are dumped to the screen and a short "report" is generated.
- Finally the user is able to select a gAnimal and print out the gFarm and gCounty it belongs to.