Database Schema
The BHaven Goat Registry runs in the cloud on a MySql database.
This registry consists of the following tables:
1) farms table
Contains information on all Goat Breeders and Goat Owners.
Referenced by the Goats Table.
A Farm Table ID is a reference to the Farms table.
2) goats table
Contains information on all goats that have been owned by BHaven and their relatives.
A BHaven goat is one of the following:
a) Registered with the ABGA.
b) Purchased from Hummel Farms.
c) Wether.
Goats have a breeder and owner (if known).
These fields reference the Farms Table.
A Goat Table ID is a reference to Goats table.
3) wethers table
Contains information on all Wethers born at BHaven Farms.
Referenced by the Goats Table.
A Wether Table ID is a reference to the Wethers table.
4) hummels table
Contains information on all Hummel Livestock Goats.
Referenced by the Goats Table.
A Hummel Table ID is a reference to the Hummels table.
5) abgas table
Contains information on all goats that are registered with the ABGA.
Referenced by the Goats Table.
A Abga Table ID is a reference to the Abgas table.
MySQL
For all of you SQL warriors, use the following to connect to the BHaven Goat Registry:
mysql --host=rds-mysql-bhaven.cyxs5uejvjao.us-east-1.rds.amazonaws.com --user=customer --password=Customer0
Basic RESTful Interface to the BHaven Goat Registry
For the rest of you non-nerd types - do not fret.
The BHaven Goat Registry is accesible via the following Basic RESTful interface.
The BHaven Goat Registry Web <URL> = http://ec2-54-209-101-55.compute-1.amazonaws.com:3000
1) <URL>/bhaven_goats/abgas
Show all goats that are registered with the ABGA.
2) <URL>/bhaven_goats/abgas/<query>
Show all goats that are registered with the ABGA using a search criteria.
Where "<query>" contains at least one of the following:
"?id=string" : string = Abga Table ID.
"?reg=string" : string = ABGA registration number.
"?class=string" : string = (fullblood, american, purebred).
"?percent=string" : string = percent boer (50 - 100).
"?left_ear=string" : string = left ear tatoo.
"?right_ear=string" : string = right ear tatoo.
"?horned=string" : string = (true, false).
" ?sex=string" : string = (buck, doe).
"?dob=string" : string = date of birth (YYYY-MM-DD).
"?desc=string" : string = description.
"?name=string" : string = name.
"?birth_num=string" : string = number in birth.
"?dna=string" : string = (OT, SQ).
"?enobled=string" : string = (true, false).
"?sire_of_merit=string" : string = (true, false).
"?breeder_id=string" : string = breeder Farm Table ID.
"?owner_id=string" : string = owner Farm Table ID.
3) <URL>/bhaven_goats/farms
Show all Farms.
4) <URL>/bhaven_goats/farms/<query>
Show all Farms using a search criteria.
Where "<query>" contains at least one of the following:
"?id=string" : string = Goat Table ID.
"?farm_name=string" : string = farm name.
"?owner_name=string" : string = owner name.
"?owner_abga_id=string" : string = owner ABGA ID.
"?owner_addr=string" : string = owner address.
5) <URL>/bhaven_goats/goat
Show all Goats.
6) <URL>/bhaven_goats/goat<query>
Show all Goats using a search criteria.
Where "<query>" contains at least one of the following:
"?id=string" : string = Goat Table ID.
"?abga_id=string" : string = ABGA registration number.
"?hummel_id=string" : string = Hummel registration number.
"?wether_id=string" : string = Wether registration number.
"?alive=string" : string = (true, false).
"?for_sale=string" : string = (true, false).
"?sold=string" : string = (true, false).
"?dam_id=string" : string = Dam Goat Table ID.
"?sire_id=string" : string = Sire Goat Table ID.
7) <URL>/bhaven_goats/hummel
Show all Hummel Livestock goats.
8) <URL>/bhaven_goats/hummel<query>
Show all Hummel Livestock goats using a search criteria.
Where "<query>" contains at least one of the following:
"?id=string" : string = Hummel Table ID.
"?reg=string" : string = Hummel registration number.
"?horned=string" : string = (true, false).
"?dob=string" : string = date of birth (YYYY-MM-DD).
"?desc=string" : string = description.
"?dob=string" : string = date of birth (YYYY-MM-DD).
"?desc=string" : string = description.
"?name=string" : string = name.
9) <URL>/bhaven_goats/wether
Show all goats that are wethers.
10) <URL>/bhaven_goats/wether<query>
Show all goats that are wethers using a search criteria.
Where "<query>" contains at least one of the following:
"?id=string" : string = Wether Table ID.
"?reg=string" : string = BHaven Wether registration number.
"?percent=string" : string = percent boer (50 - 100).
"?horned=string" : string = (true, false).
"?dob=string" : string = date of birth (YYYY-MM-DD).
"?desc=string" : string = description.
"?name=string" : string = name.
"?birth_no=string" : string = number in birth.
Advanced RESTful Interface to the BHaven Goat Registry
For you more adventuresome types the BHaven Goat Registry is also accesible via the following Advanced RESTful interface.
This interface is used to show Goat Relationships.
The BHaven Goat Registry Web <URL> = http://ec2-54-209-101-55.compute-1.amazonaws.com:3000
1) <URL>/bhaven_goats/ancestors?goat_id=x
Show the ancestors of a goat.
Where "?goat_id=x" refers to a Goat Table ID.
2) <URL>/bhaven_goats/descendants?goat_id=x
Show the descendants of a goat.
Where "?goat_id=x" refers to a Goat Table ID.
3) <URL>/bhaven_goats/related?goat_id=x?goat_id=y
Determine if two goats are related.
Where "?goat_id=x" and "?goat_id=y" refer to distinct Goat Table IDs.