Database table structure W LIV 0252 Final Report.

Page 154 of 201

10.4 Database table structure

A simplified database table structure for the IMS is shown below in Figure 37. Figure 37: Diagram of table structure for IMS database Brief explanations are provided here of the format and linkages and different items in the diagram. This is followed by a general description of how the database might function. Entities are identified by the table headings bold, shaded first row of each table and are broadly classified as reference entities ref.VESSEL for example or data entities data.VOYAGE for example. Within a particular entity or table, the rows of items are called attributes. Attributes refer to the data elements that are to be saved for each entity. The lines between tables represent linkages or relationships between entities. In the diagram above, the relationship links have been simplified to allow general depiction of a table structure. In a relational database, relationship links between tables are tightly defined at the individual attribute level and may be classified as one-to-one, one-to-many, many-to-many or as pass-through linkages. Treatment_id Event_id Date Time Key Value units data.TREATMENT Mortality_id DeckReport_id Animal tag ID Animal Count default=1 Location Pen Body condition Syndrome Post-mortem findings Diagnosis Photo-gallery data.MORTALITY data.EVENT Event_id DeckReport_id Event description Animal tag ID if available Animal Count Location Pen Syndrome Diagnosis disease Treatment Photo-gallery Location_id Location name Country Sea Region Latitude ref.LOCATION Vessel_id Vessel name ref.VESSEL RefDisease_id Species Syndrome ref.DISEASE Deck_id Vessel_id ref.DECKS Row_id Deck_id ref.ROWS Log_id Voyage_id Date Voyage day Location Latitude Longitude data.LOG Voyage_id Vessel_id Log Start data.VOYAGE Pen_id Row_id ref.PENS Activity_id Log_id Activity type Start time End time data.ACTIVITY Consignment_id Activity_id Animal_id Exporter Count head Deck Row Hold Pen data.CONSIGNMENT VesselReport_id Log_id Sea Wind Feed Water data.VESSEL REPORT DeckReport_id Log_id Deck_id Feed Water Births Abortions Resp rate Resp character Faeces score General comment Photo gallery Other data.DECK REPORT Climate_id DeckReport_id Deck Date Time Key Value data.CLIMATE ref.ANIMAL RefAnimal_id Species Breed Class RefClimate_id Dry bulb temp Wet bulb temp Humidity Airflow Other... ref.CLIMATE KEYS Animal_id Species Breed Class Other data.ANIMAL RefTreatment_id Product Withhold Inventory at start Other ref.TREATMENT KEYS Page 155 of 201 Each entity is generally depicted with a first attribute row indicating the primary key for that entity – a unique identifier for every record in that entity. In some cases a primary key may be based on more than one attribute. The relational nature of these entities allows efficient and consistent storage of data that may be stored in multiple separate tables linked together. When a sick animal or mortality is recorded in a specific pen on a specific day, it will automatically be linked to consignment, vessel, location and other data. Data entities are the core tables into which raw data and information is captured during normal operations, such as details on deck conditions and events mortalities, animal treatments etc. Data entered in one table is related to all the data entered in other tables through the relational linkages between tables. Reference entities contain pre-entered information that can be referenced or linked to reduce requirements for data entry during routine operations. For example, lists of species and breed and class of animal can be pre-defined and entered into reference tables and information about each ship number of decks, rows, pens etc can be similarly pre-entered. The table structure diagram shown here does not indicate data type for each attribute. Attributes may be based defined on as text string records, characters text, numbers, spaces, punctuations, etc, dates andor times, boolean values yes or no true or false or any of many different types of numeric fields.

10.5 Application functions