# Database overview
# Database schema
Using a read-only guest connection, you will have to specify the APP schema in your SQL queries. For example:
SELECT * FROM APP.TRUIE WHERE TAGID=123456789
# Truie (Sow)
Most of the data tables are related using the TruieID column (means SowID). This is a unique number used to reference sows, which also represents the UNIX time (opens new window) at the creation of the sow.
Link to Web API
The TruieID corresponds to the gestal_id found in some Web API resources.
(ex: Sows)
Excel conversion formula
Use the following formula to convert a UNIX time into a readable date:
=([UNIX TIMESTAMP]/(86400*1000))+DATE(1970,1,1)
# Fiches (Cards)
Much like real sow cards that are often hung up next to sow crates, Gestal has "Feeding" cards that contain the sow feeding directives. Different ones exist for farrowing, gestation and nursery/finishing.
# Rapports (Reports)
Daily feed intakes are saved in reports. Unlike an extended analysis report, the Gestal report represent detailed and segmented feed intake data. For example, there can be up to 8 feed intake reports for a single farrowing day.
ID column
All tables have an ID column which contain a sequential auto-incremented value.
This ID is never used in database tables relations.
← Getting Started Sows →