Mealab database schema

The Mealab database schema is stored as a JSON notation, designed to be a human-readable and compact notation.
It lists the database tables and their MySQL field types.
Symbols that may prepend a field type are:
  1. The ^ symbol, to denote that a field is a foreign key (pointer to another table). This symbol is followed by <tablename.tablefield>, which must be a valid field name of another table in the same database. If fieldname is omitted, then the primary key of the referenced table is assumed. The MySQL field type is inferred from the referenced field.
  2. The ! sign, to denote that the field is [part of] a primary key
  3. The # sign, to denote that the field is an auto incrementing primary key
{
  "tables":{
    "AnimalType":{
      "fields":{
        "species":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "CellInfo":{
      "fields":{
        "ID_StimulatedLayer":"^StimulatedLayer.ID",
        "ID_SliceInfo":"^SliceInfo.ID",
        "ID_CellType":"^CellType.ID",
        "ID":"#int(11)",
        "comments":"varchar(255)",
        "cellInfo":"varchar(255)",
        "cellDepth_um":"double"
      }
    },
    "CellType":{
      "fields":{
        "ID":"#int(11)",
        "fullName":"varchar(255)",
        "cellType":"varchar(255)"
      }
    },
    "Chemical":{
      "fields":{
        "ID":"#int(11)",
        "chemical":"varchar(255)"
      }
    },
    "ChipInfo":{
      "fields":{
        "type":"varchar(255)",
        "ID":"#int(11)",
        "chipNumber":"int(11)"
      }
    },
    "ConcentrationUnit":{
      "fields":{
        "ID":"#int(11)",
        "concentrationUnit":"varchar(255)"
      }
    },
    "CulturePreparation":{
      "fields":{
        "type":"varchar(255)",
        "preparationDate":"datetime",
        "name":"varchar(255)",
        "ID_Persons2":"^Persons.ID",
        "ID_Persons1":"^Persons.ID",
        "ID":"#int(11)",
        "from":"varchar(255)"
      }
    },
    "ElectrodeConfiguration":{
      "fields":{
        "ID":"#int(11)",
        "electrodeConfiguration":"varchar(255)"
      }
    },
    "ExperimentInfo":{
      "fields":{
        "ID_SlicePreparation":"^SlicePreparation.ID",
        "ID_CulturePreparation":"^CulturePreparation.ID",
        "ID":"#int(11)",
        "experimenter2":"^Persons.ID",
        "experimenter1":"^Persons.ID",
        "experimentDate":"datetime",
        "comments":"varchar(255)"
      }
    },
    "Measurements":{
      "fields":{
        "time":"datetime",
        "stimElecB":"^StimulatedElectrode.ID",
        "stimElecA":"^StimulatedElectrode.ID",
        "setUpUsed":"varchar(255)",
        "meaFile":"varchar(255)",
        "ID_TargetColumn":"^TargetColumn.ID",
        "ID_StimulationProtocol":"^StimulationProtocol.ID",
        "ID_StimulatedLayer":"^StimulatedLayer.ID",
        "ID_SliceInfo":"^SliceInfo.ID",
        "ID_SingleCell":"^SingleCell.ID",
        "ID_LastTreatment":"int(11)",
        "ID_ElectrodeConfiguration":"^ElectrodeConfiguration.ID",
        "ID":"#int(11)",
        "comments":"varchar(255)"
      }
    },
    "Persons":{
      "fields":{
        "initials":"varchar(255)",
        "ID":"#int(11)",
        "fullName":"varchar(255)"
      }
    },
    "SingleCell":{
      "fields":{
        "restingPotential":"varchar(255)",
        "ID_CellInfo":"^CellInfo.ID",
        "ID":"#int(11)",
        "holdingPotential":"varchar(255)",
        "fileName":"varchar(255)",
        "comments":"varchar(255)"
      }
    },
    "SliceInfo":{
      "fields":{
        "sliceThickness":"^SliceThickness.ID",
        "sliceOrCultureName":"varchar(255)",
        "overviewPicture":"varchar(255)",
        "ID_ExperimentInfo":"^ExperimentInfo.ID",
        "ID":"#int(11)",
        "comments":"varchar(255)",
        "chipInfo":"^ChipInfo.ID"
      }
    },
    "SliceMap":{
      "fields":{
        "ID_SliceInfo":"^SliceInfo.ID",
        "ID":"#int(11)",
        "elec_colrow":"^StimulatedElectrode.ID",
        "electrode_colrow":"int(11)",
        "corticalLayer":"varchar(255)",
        "corticalColumn":"varchar(255)"
      }
    },
    "SlicePreparation":{
      "fields":{
        "supplier":"varchar(255)",
        "preparedBy":"^Persons.ID",
        "ID_SliceProtocol":"^SliceProtocol",
        "ID_AnimalType":"^AnimalType.ID",
        "ID":"#int(11)",
        "deliveryDate":"datetime",
        "comments":"varchar(255)",
        "animalAge":"varchar(255)"
      }
    },
    "SliceProtocol":{
      "fields":{
        "sliceProtocol":"varchar(255)",
        "ID":"#int(11)",
        "angle":"varchar(255)"
      }
    },
    "SliceThickness":{
      "fields":{
        "thickness":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "StimulatedElectrode":{
      "fields":{
        "stimulatedElectrode":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "StimulatedLayer":{
      "fields":{
        "stimulatedLayer":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "StimulationProtocol":{
      "fields":{
        "strengthOfStimulus":"varchar(255)",
        "stimulationProtocol(FullName)":"varchar(255)",
        "stimulationProtocol":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "SweepSets":{
      "fields":{
        "sweeps":"varchar(255)",
        "stimulationStrength":"int(11)",
        "stimElec2":"^StimulatedElectrode.ID",
        "stimElec1":"^StimulatedElectrode.ID",
        "ID_ElectrodeConfiguration":"^ElectrodeConfiguration.ID",
        "ID":"#int(11)"
      }
    },
    "TargetColumn":{
      "fields":{
        "targetColumn":"varchar(255)",
        "ID":"#int(11)"
      }
    },
    "Treatment":{
      "fields":{
        "time":"datetime",
        "ID_Unit":"^ConcentrationUnit.ID",
        "ID_TreatmentProtocol":"^TreatmentProtocol.ID",
        "ID_SliceInfo":"^SliceInfo.ID",
        "ID_Chemical":"^Chemical.ID",
        "ID":"#int(11)",
        "concentration":"double",
        "comments":"varchar(255)"
      }
    },
    "TreatmentProtocol":{
      "fields":{
        "treatmentProtocol":"varchar(255)",
        "ID":"#int(11)"
      }
    }
  }
}