CASE STUDY 1
animalFarm_01
The goal of this case study is to give the reader an initial look at Python code that uses the gDS functionality.
The first 05:30 of this video presents a development environment capable of running the case study code on a Windows 11 system using a Ubuntu VM on VMware.
After that we review the “animalFarm_01” example. The example features 3 tables – gCounty, gFarm and gAnimal. See “animalFarm_01.dd”. Farms cite the Counties they are located in. Animals cite the farms they exist on. The code creates a few Counties and Farms using straight-line calls to “insert row” routines. The example then spawns a number of processes. Each process inserts one animal into the gAnimal table under a system lock. After the processes complete, the 3 tables are dumped to the screen and a short “report” is generated.