-- phpMyAdmin SQL Dump
-- version 2.11.3deb1ubuntu1.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 13, 2011 at 10:41 AM
-- Server version: 5.0.51
-- PHP Version: 5.2.4-2ubuntu5.17

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `bien2`
--

-- --------------------------------------------------------

--
-- Table structure for table `bien_genus_family`
--

CREATE TABLE IF NOT EXISTS `bien_genus_family` (
  `family` varchar(250) character set utf8 NOT NULL,
  `genus` varchar(150) character set utf8 collate utf8_bin default NULL,
  `tot_families` int(1) default NULL,
  KEY `genus` (`genus`),
  KEY `family` (`family`),
  KEY `tot_families` (`tot_families`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `clade`
--

CREATE TABLE IF NOT EXISTS `clade` (
  `cladeID` int(11) unsigned NOT NULL,
  `parentCladeID` int(11) unsigned default NULL,
  `cladeNameStd` varchar(250) NOT NULL,
  `rank` varchar(50) default NULL,
  `isHybrid` int(1) unsigned NOT NULL,
  `family` varchar(100) default NULL,
  `leftIndex` int(11) unsigned default NULL,
  `rightIndex` int(11) unsigned default NULL,
  `source` varchar(25) default NULL,
  `majorPlantGroup` varchar(45) default NULL,
  `embryophytes` varchar(45) default NULL,
  `vascularPlants` varchar(45) default NULL,
  `seedPlants` varchar(45) default NULL,
  `floweringPlants` varchar(45) default NULL,
  PRIMARY KEY  USING BTREE (`cladeID`),
  KEY `nameStaging_isHybrid` (`isHybrid`),
  KEY `nameStaging_family` (`family`),
  KEY `nameStaging_leftIndex` (`leftIndex`),
  KEY `nameStaging_rightIndex` (`rightIndex`),
  KEY `idx_source` (`source`),
  KEY `nameStaging_rank` USING BTREE (`rank`),
  KEY `Index_majorPlantGroup` USING BTREE (`majorPlantGroup`),
  KEY `Index_embryophytes` USING BTREE (`embryophytes`),
  KEY `Index_seedPlants` USING BTREE (`seedPlants`),
  KEY `Index_vascularPlants` USING BTREE (`vascularPlants`),
  KEY `Index_floweringPlants` USING BTREE (`floweringPlants`),
  KEY `nameStaging_parentCladeID` USING BTREE (`parentCladeID`),
  KEY `nameStaging_cladeNameStd` USING BTREE (`cladeNameStd`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `cladeName`
--

CREATE TABLE IF NOT EXISTS `cladeName` (
  `cladeNameID` int(11) NOT NULL auto_increment,
  `cladeID` int(10) unsigned NOT NULL,
  `cladeName` varchar(250) NOT NULL,
  `cladeNameUnique` varchar(300) default NULL,
  `nameStatus` varchar(50) default NULL,
  `source` varchar(45) default NULL,
  PRIMARY KEY  USING BTREE (`cladeNameID`),
  KEY `idx_cladeID` USING BTREE (`cladeID`),
  KEY `Index_source` (`source`),
  KEY `idx_name` USING BTREE (`cladeName`),
  KEY `idx_nameStatus` USING BTREE (`nameStatus`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=89884 ;

-- --------------------------------------------------------

--
-- Table structure for table `DataSource`
--

CREATE TABLE IF NOT EXISTS `DataSource` (
  `DataSourceID` int(10) unsigned NOT NULL auto_increment,
  `DataSourceName` varchar(255) NOT NULL,
  `DataSourceType` varchar(255) NOT NULL,
  PRIMARY KEY  (`DataSourceID`),
  KEY `DataSourceName` (`DataSourceName`),
  KEY `DataSourceType` (`DataSourceType`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Data sources for plots or specimens' AUTO_INCREMENT=30 ;

-- --------------------------------------------------------

--
-- Table structure for table `geoIndividualObservation`
--

CREATE TABLE IF NOT EXISTS `geoIndividualObservation` (
  `ID` int(11) unsigned NOT NULL COMMENT 'Links 1:1 with DBPlotID',
  `countryISO` varchar(25) default NULL,
  `countryStd` varchar(150) default NULL,
  `isInCountry` int(1) default NULL,
  `countryDistError` double default NULL,
  `stateProvinceStd` varchar(150) default NULL,
  `isInStateProvince` int(1) default NULL,
  `stateProvinceDistError` double default NULL,
  `countyParishStd` varchar(150) default NULL,
  `isInCountyParish` int(1) default NULL,
  `countyParishDistError` double default NULL,
  `isValidLatLong` int(1) default NULL,
  `isCultivated` int(1) default '0',
  `isCultivatedReason` varchar(255) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `geoI_countryISO_NDX` (`countryISO`),
  KEY `geoI_countryStd_NDX` (`countryStd`),
  KEY `geoI_isInCountry_NDX` (`isInCountry`),
  KEY `geoI_countryDistError_NDX` (`countryDistError`),
  KEY `geoI_stateProvinceStd_NDX` (`stateProvinceStd`),
  KEY `geoI_isInStateProvince_NDX` (`isInStateProvince`),
  KEY `geoI_stateProvinceDistError_NDX` (`stateProvinceDistError`),
  KEY `geoI_countyParishStd_NDX` (`countyParishStd`),
  KEY `geoI_isInCountyParish_NDX` (`isInCountyParish`),
  KEY `geoI_countyParishDistError_NDX` (`countyParishDistError`),
  KEY `geoI_isValidLatLong_NDX` (`isValidLatLong`),
  KEY `geoI_isCultivated` (`isCultivated`),
  KEY `geoI_isCultivatedReason` (`isCultivatedReason`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `geoPlotMetaDataDimension`
--

CREATE TABLE IF NOT EXISTS `geoPlotMetaDataDimension` (
  `ID` int(11) unsigned NOT NULL COMMENT 'Links 1:1 with DBPlotID',
  `countryISO` varchar(25) default NULL,
  `countryStd` varchar(150) default NULL,
  `isInCountry` int(1) default NULL,
  `countryDistError` double default NULL,
  `stateProvinceStd` varchar(150) default NULL,
  `isInStateProvince` int(1) default NULL,
  `stateProvinceDistError` double default NULL,
  `countyParishStd` varchar(150) default NULL,
  `isInCountyParish` int(1) default NULL,
  `countyParishDistError` double default NULL,
  `isValidLatLong` int(1) default NULL,
  `isCultivated` int(1) default '0',
  `isCultivatedReason` varchar(255) default NULL,
  PRIMARY KEY  (`ID`),
  KEY `geoP_countryISO_NDX` (`countryISO`),
  KEY `geoP_countryStd_NDX` (`countryStd`),
  KEY `geoP_isInCountry_NDX` (`isInCountry`),
  KEY `geoP_countryDistError_NDX` (`countryDistError`),
  KEY `geoP_stateProvinceStd_NDX` (`stateProvinceStd`),
  KEY `geoP_isInStateProvince_NDX` (`isInStateProvince`),
  KEY `geoP_stateProvinceDistError_NDX` (`stateProvinceDistError`),
  KEY `geoP_countyParishStd_NDX` (`countyParishStd`),
  KEY `geoP_isInCountyParish_NDX` (`isInCountyParish`),
  KEY `geoP_countyParishDistError_NDX` (`countyParishDistError`),
  KEY `geoP_isValidLatLong_NDX` (`isValidLatLong`),
  KEY `geoP_isCultivated` (`isCultivated`),
  KEY `geo_isCultivatedReason` (`isCultivatedReason`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `IndividualObservation`
--

CREATE TABLE IF NOT EXISTS `IndividualObservation` (
  `ObservationID` int(11) NOT NULL auto_increment,
  `ObservationType` int(11) default NULL,
  `PlotTreeTag` varchar(32) collate utf8_bin default NULL,
  `DBPlotID` int(11) default NULL,
  `SpecimenCatalogNO` varchar(64) collate utf8_bin default NULL,
  `ObservationSpecimenID` int(11) default NULL,
  `LatestDateCollected` date default NULL,
  `DecimalLatitude` decimal(10,5) default NULL,
  `DecimalLongitude` decimal(10,5) default NULL,
  `NumberOfStems` int(11) default NULL,
  `BasalDiameter` decimal(10,5) default NULL,
  `Height` decimal(10,5) default NULL,
  `TaxonomyID` int(11) NOT NULL,
  `RawTreeID` int(10) default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`ObservationID`),
  KEY `RefPlotMetaDataDimension411` (`DBPlotID`),
  KEY `RefTaxonDimension381` (`TaxonomyID`),
  KEY `ObservationSpecimenID` (`ObservationSpecimenID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=22296066 ;

-- --------------------------------------------------------

--
-- Table structure for table `IndividualObservationMeasurement`
--

CREATE TABLE IF NOT EXISTS `IndividualObservationMeasurement` (
  `ObservationID` int(11) NOT NULL,
  `StemNO` int(11) NOT NULL auto_increment,
  `ObservationNO` int(11) NOT NULL,
  `PrimaryStem` int(11) default NULL,
  `DBH` decimal(10,5) default NULL,
  `HOM` decimal(10,5) default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`ObservationID`,`StemNO`,`ObservationNO`),
  KEY `RefIndividualObservation11` (`ObservationID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `ObservationSpecimen`
--

CREATE TABLE IF NOT EXISTS `ObservationSpecimen` (
  `ObservationSpecimenID` int(11) NOT NULL auto_increment,
  `DBSourceID` int(11) NOT NULL,
  `Continent` varchar(64) collate utf8_bin default NULL,
  `Country` varchar(100) collate utf8_bin default NULL,
  `StateProvince` varchar(64) collate utf8_bin default NULL,
  `verbatimCountry` varchar(100) collate utf8_bin default NULL,
  `County` varchar(100) collate utf8_bin default NULL,
  `Locality` varchar(1024) collate utf8_bin default NULL,
  `Collector` varchar(256) collate utf8_bin default NULL,
  `IdentifiedBy` varchar(128) collate utf8_bin default NULL,
  `IdentifiedDate` date default NULL,
  `CoordinateUncertainty` decimal(10,5) default NULL,
  `CoordinateUncertaintyUnits` varchar(10) collate utf8_bin default NULL,
  `VegetationCategory` varchar(32) collate utf8_bin default NULL,
  `test` tinyint(3) unsigned NOT NULL,
  `Cultivated` int(1) NOT NULL,
  `CollectionNumber` varchar(24) collate utf8_bin default NULL,
  PRIMARY KEY  (`ObservationSpecimenID`),
  KEY `RefSpecimenSourceData421` (`DBSourceID`),
  KEY `DBSourceID` (`DBSourceID`,`Continent`,`Country`,`StateProvince`,`County`,`Locality`(255),`Collector`(255),`IdentifiedBy`,`IdentifiedDate`,`CoordinateUncertainty`,`CoordinateUncertaintyUnits`,`VegetationCategory`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=8578890 ;

-- --------------------------------------------------------

--
-- Table structure for table `PlotAggregateFact`
--

CREATE TABLE IF NOT EXISTS `PlotAggregateFact` (
  `DBPlotID` int(11) NOT NULL,
  `PlotTimeID` int(11) NOT NULL,
  `TotalIndividuals` int(11) default NULL,
  `[REDACTED]` int(11) default NULL,
  `[REDACTED].5cm` int(11) default NULL,
  `[REDACTED]` int(11) default NULL,
  `PercentCover` decimal(10,5) default NULL,
  `TaxonomyID` int(11) NOT NULL,
  `del` int(1) unsigned default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`DBPlotID`,`PlotTimeID`,`TaxonomyID`),
  KEY `RefPlotMetaDataDimension61` (`DBPlotID`),
  KEY `RefPlotTimeDimension371` (`PlotTimeID`),
  KEY `RefTaxonDimension181` (`TaxonomyID`),
  KEY `DBPlotID_2` (`DBPlotID`,`PlotTimeID`,`TaxonomyID`),
  KEY `DBPlotID_3` (`DBPlotID`,`PlotTimeID`,`TaxonomyID`),
  KEY `DBPlotID_4` (`DBPlotID`,`PlotTimeID`,`TaxonomyID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- --------------------------------------------------------

--
-- Table structure for table `PlotMetaDataDimension`
--

CREATE TABLE IF NOT EXISTS `PlotMetaDataDimension` (
  `DBPlotID` int(11) NOT NULL auto_increment,
  `DBSourceName` varchar(64) collate utf8_bin default NULL,
  `ContactName` varchar(32) collate utf8_bin default NULL,
  `ContactEmail` varchar(32) collate utf8_bin default NULL,
  `ContactTelephone` varchar(32) collate utf8_bin default NULL,
  `Continent` varchar(64) collate utf8_bin default NULL,
  `Country` varchar(32) collate utf8_bin default NULL,
  `StateProvince` varchar(64) collate utf8_bin default NULL,
  `verbatimCountry` varchar(64) collate utf8_bin default NULL,
  `County` varchar(64) collate utf8_bin default NULL,
  `Locality` varchar(256) collate utf8_bin default NULL,
  `VegetationCategory` varchar(32) collate utf8_bin default NULL,
  `PlotCD` bigint(32) default NULL,
  `PlotName` varchar(32) collate utf8_bin default NULL,
  `PlotCensusMethod` varchar(32) collate utf8_bin default NULL,
  `PlotArea` varchar(10) collate utf8_bin default NULL,
  `PlotAreaUnits` varchar(10) collate utf8_bin default NULL,
  `PlotShape` varchar(32) collate utf8_bin default NULL,
  `PlotDecimalLatitude` decimal(10,5) default NULL,
  `PlotDecimalLongitude` decimal(10,5) default NULL,
  `CoordinateUncertainty` decimal(10,5) default NULL,
  `CoordinateUncertaintyUnits` varchar(10) collate utf8_bin default NULL,
  `PlotReferenceX` decimal(10,5) default NULL,
  `PlotReferenceY` decimal(10,5) default NULL,
  `PlotMaxDBH` decimal(10,5) default NULL,
  `PlotMinDBH` decimal(10,5) default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`DBPlotID`),
  KEY `DBSourceName` (`DBSourceName`),
  KEY `PlotName_2` (`PlotName`,`DBSourceName`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=342877 ;

-- --------------------------------------------------------

--
-- Table structure for table `PlotTimeDimension`
--

CREATE TABLE IF NOT EXISTS `PlotTimeDimension` (
  `PlotTimeID` int(11) NOT NULL auto_increment,
  `CensusID` int(11) default NULL,
  `CensusName` varchar(32) collate utf8_bin default NULL,
  `CensusStartDate` date default NULL,
  `CensusEndDate` date default NULL,
  `DBPlotID` int(11) NOT NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`PlotTimeID`),
  KEY `Ref613` (`DBPlotID`),
  KEY `CensusName_2` (`CensusName`,`DBPlotID`,`CensusID`),
  KEY `CensusName_3` (`CensusName`,`DBPlotID`,`CensusID`),
  KEY `CensusName_4` (`CensusName`,`DBPlotID`,`CensusID`),
  KEY `CensusName_5` (`CensusName`,`CensusID`),
  KEY `CensusName_6` (`CensusName`,`CensusID`),
  KEY `CensusName_7` (`CensusName`,`DBPlotID`,`CensusID`),
  KEY `CensusName_8` (`CensusName`,`DBPlotID`,`CensusID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=341814 ;

-- --------------------------------------------------------

--
-- Table structure for table `SpecimenSourceData`
--

CREATE TABLE IF NOT EXISTS `SpecimenSourceData` (
  `DBSourceID` int(11) NOT NULL auto_increment,
  `DBSourceName` varchar(64) collate utf8_bin default NULL,
  `ContactName` varchar(32) collate utf8_bin default NULL,
  `ContactEmail` varchar(32) collate utf8_bin default NULL,
  `ContactTelephone` varchar(32) collate utf8_bin default NULL,
  `SpecimenInstitutionCD` varchar(128) collate utf8_bin default NULL,
  `SpecimenCollectionCD` varchar(128) collate utf8_bin default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`DBSourceID`),
  KEY `DBSourceName` (`DBSourceName`),
  KEY `SpecimenInstitutionCD` (`SpecimenInstitutionCD`,`SpecimenCollectionCD`,`DBSourceName`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=131797 ;

-- --------------------------------------------------------

--
-- Table structure for table `TaxonDataSource`
--

CREATE TABLE IF NOT EXISTS `TaxonDataSource` (
  `TaxonDataSourceID` int(10) unsigned NOT NULL auto_increment,
  `DataSourceID` int(10) unsigned NOT NULL,
  `TaxonomyID` int(10) unsigned NOT NULL,
  `TotalObservations` int(10) unsigned default NULL,
  `GeoreferencedObservations` int(10) unsigned default NULL,
  PRIMARY KEY  (`TaxonDataSourceID`),
  KEY `DataSourceID` (`DataSourceID`),
  KEY `TaxonomyID` (`TaxonomyID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Links taxa to data sources in which they are used' AUTO_INCREMENT=731596 ;

-- --------------------------------------------------------

--
-- Table structure for table `TaxonDimension`
--

CREATE TABLE IF NOT EXISTS `TaxonDimension` (
  `TaxonomyID` int(11) NOT NULL auto_increment,
  `FamilyName` varchar(64) collate utf8_bin default NULL,
  `GenusName` varchar(64) collate utf8_bin default NULL,
  `SpecificEpithet` varchar(64) collate utf8_bin default NULL,
  `InfraspecificEpithet` varchar(64) collate utf8_bin default NULL,
  `InfraspecificRank` varchar(64) collate utf8_bin default NULL,
  `Authority` varchar(128) collate utf8_bin default NULL,
  `is_plotName` int(1) unsigned default '0',
  `taxonAuthorityVerbatim` varchar(250) collate utf8_bin default NULL,
  `taxonMatched` varchar(250) collate utf8_bin default NULL,
  `taxonMatchedAuthority` varchar(250) collate utf8_bin default NULL,
  `unmatchedTerms` varchar(250) collate utf8_bin default NULL,
  `matchScore` decimal(3,2) default NULL,
  `taxonMatchedAcceptance` varchar(1) collate utf8_bin default NULL,
  `familyCorrected` varchar(50) collate utf8_bin default NULL,
  `genusCorrected` varchar(150) collate utf8_bin default NULL,
  `speciesCorrected` varchar(255) collate utf8_bin default NULL,
  `taxonCorrected` varchar(250) collate utf8_bin default NULL,
  `authorityCorrected` varchar(250) collate utf8_bin default NULL,
  `taxonCorrectedTnrsID` int(10) unsigned default NULL,
  `taxonCorrectedRank` varchar(25) collate utf8_bin default NULL,
  `taxonCorrectedAcceptance` varchar(1) collate utf8_bin default NULL,
  `morphospecies` varchar(250) collate utf8_bin default NULL,
  `taxonMorphospecies` varchar(250) collate utf8_bin default NULL,
  `is_scrubbed` int(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`TaxonomyID`),
  KEY `FamilyName` (`FamilyName`),
  KEY `GenusName` (`GenusName`),
  KEY `SpecificEpithet` (`SpecificEpithet`),
  KEY `InfraspecificRank` (`InfraspecificRank`),
  KEY `FamilyName_2` (`FamilyName`,`GenusName`,`SpecificEpithet`,`InfraspecificEpithet`,`InfraspecificRank`,`Authority`),
  KEY `InfraspecificEpithet` (`InfraspecificEpithet`),
  KEY `taxonAuthorityVerbatim` (`taxonAuthorityVerbatim`),
  KEY `taxonCorrected` (`taxonCorrected`),
  KEY `taxonMorphospecies` (`taxonMorphospecies`),
  KEY `is_scrubbed` (`is_scrubbed`),
  KEY `TD_familyCorrected` (`familyCorrected`),
  KEY `TD_taxonMatchedAcceptance` (`taxonMatchedAcceptance`),
  KEY `TD_taxonCorrectedAcceptance` (`taxonCorrectedAcceptance`),
  KEY `TD_taxonCorrectedRank` (`taxonCorrectedRank`),
  KEY `taxonCorrectedTnrsID` (`taxonCorrectedTnrsID`),
  KEY `TD_is_plotName` (`is_plotName`),
  KEY `genusCorrected_idx` (`genusCorrected`),
  KEY `speciesCorrected` (`speciesCorrected`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=FIXED AUTO_INCREMENT=987490 ;

-- --------------------------------------------------------

--
-- Table structure for table `TaxonDimension_bak`
--

CREATE TABLE IF NOT EXISTS `TaxonDimension_bak` (
  `TaxonomyID` int(11) NOT NULL auto_increment,
  `FamilyName` varchar(64) collate utf8_bin default NULL,
  `GenusName` varchar(64) collate utf8_bin default NULL,
  `SpecificEpithet` varchar(64) collate utf8_bin default NULL,
  `InfraspecificEpithet` varchar(64) collate utf8_bin default NULL,
  `InfraspecificRank` varchar(64) collate utf8_bin default NULL,
  `Authority` varchar(128) collate utf8_bin default NULL,
  `is_plotName` int(1) unsigned default '0',
  `taxonAuthorityVerbatim` varchar(250) collate utf8_bin default NULL,
  `taxonMatched` varchar(250) collate utf8_bin default NULL,
  `taxonMatchedAuthority` varchar(250) collate utf8_bin default NULL,
  `unmatchedTerms` varchar(250) collate utf8_bin default NULL,
  `matchScore` decimal(3,2) default NULL,
  `taxonMatchedAcceptance` varchar(1) collate utf8_bin default NULL,
  `familyCorrected` varchar(50) collate utf8_bin default NULL,
  `genusCorrected` varchar(150) collate utf8_bin default NULL,
  `speciesCorrected` varchar(255) collate utf8_bin default NULL,
  `taxonCorrected` varchar(250) collate utf8_bin default NULL,
  `authorityCorrected` varchar(250) collate utf8_bin default NULL,
  `taxonCorrectedTnrsID` int(10) unsigned default NULL,
  `taxonCorrectedRank` varchar(25) collate utf8_bin default NULL,
  `taxonCorrectedAcceptance` varchar(1) collate utf8_bin default NULL,
  `morphospecies` varchar(250) collate utf8_bin default NULL,
  `taxonMorphospecies` varchar(250) collate utf8_bin default NULL,
  `is_scrubbed` int(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`TaxonomyID`),
  KEY `FamilyName` (`FamilyName`),
  KEY `GenusName` (`GenusName`),
  KEY `SpecificEpithet` (`SpecificEpithet`),
  KEY `InfraspecificRank` (`InfraspecificRank`),
  KEY `FamilyName_2` (`FamilyName`,`GenusName`,`SpecificEpithet`,`InfraspecificEpithet`,`InfraspecificRank`,`Authority`),
  KEY `InfraspecificEpithet` (`InfraspecificEpithet`),
  KEY `taxonAuthorityVerbatim` (`taxonAuthorityVerbatim`),
  KEY `taxonCorrected` (`taxonCorrected`),
  KEY `taxonMorphospecies` (`taxonMorphospecies`),
  KEY `is_scrubbed` (`is_scrubbed`),
  KEY `TD_familyCorrected` (`familyCorrected`),
  KEY `TD_taxonMatchedAcceptance` (`taxonMatchedAcceptance`),
  KEY `TD_taxonCorrectedAcceptance` (`taxonCorrectedAcceptance`),
  KEY `TD_taxonCorrectedRank` (`taxonCorrectedRank`),
  KEY `taxonCorrectedTnrsID` (`taxonCorrectedTnrsID`),
  KEY `TD_is_plotName` (`is_plotName`),
  KEY `genusCorrected_idx` (`genusCorrected`),
  KEY `speciesCorrected` (`speciesCorrected`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=FIXED AUTO_INCREMENT=987490 ;

-- --------------------------------------------------------

--
-- Table structure for table `TaxonObservation`
--

CREATE TABLE IF NOT EXISTS `TaxonObservation` (
  `TaxonomyObservationID` int(11) NOT NULL auto_increment,
  `TaxonomyID` int(11) default NULL,
  `PlotOrSpecimenFlag` int(11) default NULL,
  `DBPlotID` int(11) NOT NULL,
  `DBSourceID` int(11) NOT NULL,
  `GBIFScientificNameOriginal` varchar(64) collate utf8_bin default NULL,
  `GBIFFamilyOriginal` varchar(64) collate utf8_bin default NULL,
  `GBIFGenusOriginal` varchar(64) collate utf8_bin default NULL,
  `test` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`TaxonomyObservationID`),
  KEY `RefTaxonDimension301` (`TaxonomyID`),
  KEY `Ref614` (`DBPlotID`),
  KEY `TaxonomyID_2` (`TaxonomyID`,`DBPlotID`),
  KEY `TaxonomyID_3` (`TaxonomyID`,`DBPlotID`),
  KEY `TaxonomyID_4` (`TaxonomyID`,`DBPlotID`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1622693 ;

-- --------------------------------------------------------

--
-- Table structure for table `TraitObservation`
--

CREATE TABLE IF NOT EXISTS `TraitObservation` (
  `TraitObservationID` int(11) unsigned NOT NULL auto_increment,
  `TaxonomyID` int(11) unsigned NOT NULL,
  `Family` varchar(100) default NULL,
  `Genus` varchar(100) default NULL,
  `SpecificEpithet` varchar(100) default NULL,
  `InfraspecificRank` varchar(25) default NULL,
  `InfraspecificEpithet` varchar(100) default NULL,
  `Taxon` varchar(255) default NULL,
  `AuthorOfScientificName` varchar(255) default NULL,
  `TaxonAuthor` varchar(255) default NULL,
  `Habit` varchar(50) default NULL,
  `TraitName` varchar(200) default NULL,
  `TraitValue` varchar(100) default NULL,
  `Unit` varchar(100) default NULL,
  `Method` varchar(255) default NULL,
  `Region` varchar(100) default NULL,
  `Country` varchar(100) default NULL,
  `StateProvince` varchar(100) default NULL,
  `LowerPolitical` varchar(100) default NULL,
  `LocalityDescription` varchar(100) default NULL,
  `VerbatimLatitude` varchar(150) default NULL,
  `VerbatimLongitude` varchar(150) default NULL,
  `VerbatimElevation` varchar(150) default NULL,
  `Source` varchar(100) default NULL,
  `URLSource` varchar(100) default NULL,
  `SourceCitation` varchar(1000) default NULL,
  `SourceID` varchar(255) default NULL,
  `VisitingDate` varchar(100) default NULL,
  `ReferenceID` int(11) unsigned default NULL,
  `Access` varchar(100) default NULL,
  `Project_PI` varchar(255) default NULL,
  `Project_PI_contact` varchar(100) default NULL,
  `Observation` varchar(255) default NULL,
  `Authorship` varchar(255) default NULL,
  `AuthorshipContact` varchar(100) default NULL,
  PRIMARY KEY  (`TraitObservationID`),
  KEY `TaxonomyID` (`TaxonomyID`),
  KEY `Family` (`Family`),
  KEY `Taxon` (`Taxon`),
  KEY `TraitName` (`TraitName`),
  KEY `ReferenceID` (`ReferenceID`),
  KEY `TaxonAuthor` (`TaxonAuthor`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COMMENT='Species trait observations' AUTO_INCREMENT=140286 ;

-- --------------------------------------------------------

--
-- Table structure for table `viewFullOccurrence`
--

CREATE TABLE IF NOT EXISTS `viewFullOccurrence` (
  `OccurID` int(11) NOT NULL auto_increment,
  `DBPlotID` int(11) default NULL,
  `ObservationID` int(11) default NULL,
  `Family` varchar(64) default NULL,
  `TaxonomyID` int(11) default NULL,
  `OrigGenus` varchar(64) default NULL,
  `OrigSpecies` varchar(64) default NULL,
  `TaxonCorrected` varchar(250) default NULL,
  `Genus` varchar(64) default NULL,
  `Species` varchar(64) default NULL,
  `Latin` varchar(64) default NULL,
  `Rank` varchar(16) default NULL,
  `Accepted` varchar(2) default NULL,
  `TaxonMorphoSpecies` varchar(255) default NULL,
  `isCultivated` int(1) default '0',
  `isCultivatedReason` varchar(255) default NULL,
  `CountryOrig` varchar(100) default NULL,
  `CountryStd` varchar(150) default NULL,
  `CountryError` double default NULL,
  `ProvinceStd` varchar(64) default NULL,
  `ProvinceError` double default NULL,
  `County` varchar(64) default NULL,
  `Plot` varchar(32) default NULL,
  `PlotArea` varchar(10) default NULL,
  `Latitude` decimal(10,5) default NULL,
  `Longitude` decimal(10,5) default NULL,
  `isValidLatLong` int(1) default NULL,
  `Date` date default NULL,
  `SurveyType` varchar(10) default NULL,
  `Abund` int(11) default NULL,
  `Abund1` int(11) default NULL,
  `Abund2.5` int(11) default NULL,
  `Abund10` int(11) default NULL,
  `PctCover` decimal(10,5) default NULL,
  `DataSource` varchar(128) default NULL,
  PRIMARY KEY  (`OccurID`),
  KEY `DBPlotID` (`DBPlotID`),
  KEY `ObservationID` (`ObservationID`),
  KEY `Family` (`Family`(16)),
  KEY `TaxonCorrected` (`TaxonCorrected`(25)),
  KEY `Latin` (`Latin`(25)),
  KEY `TaxonomyID` (`TaxonomyID`),
  KEY `Genus` (`Genus`(16)),
  KEY `Species` (`Species`(20)),
  KEY `ORIGLATIN` (`OrigGenus`(16),`OrigSpecies`(20)),
  KEY `CountryStd` (`CountryStd`),
  KEY `SurveyType` (`SurveyType`),
  KEY `DataSource` (`DataSource`),
  KEY `Rank` (`Rank`),
  KEY `Accepted` (`Accepted`),
  KEY `isCultivated` (`isCultivated`),
  KEY `isCultivatedReason` (`isCultivatedReason`),
  KEY `isValidLatLong` (`isValidLatLong`),
  KEY `CountryError` (`CountryError`),
  KEY `ProvinceError` (`ProvinceError`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12050437 ;

-- --------------------------------------------------------

--
-- Table structure for table `viewFullOccurrence_bak20110825`
--

CREATE TABLE IF NOT EXISTS `viewFullOccurrence_bak20110825` (
  `OccurID` int(11) NOT NULL auto_increment,
  `DBPlotID` int(11) default NULL,
  `ObservationID` int(11) default NULL,
  `Family` varchar(64) default NULL,
  `TaxonomyID` int(11) default NULL,
  `OrigGenus` varchar(64) default NULL,
  `OrigSpecies` varchar(64) default NULL,
  `TaxonCorrected` varchar(250) default NULL,
  `Genus` varchar(64) default NULL,
  `Species` varchar(64) default NULL,
  `Latin` varchar(64) default NULL,
  `Rank` varchar(16) default NULL,
  `Accepted` varchar(2) default NULL,
  `TaxonMorphoSpecies` varchar(255) default NULL,
  `CountryOrig` varchar(100) default NULL,
  `CountryStd` varchar(150) default NULL,
  `CountryError` double default NULL,
  `ProvinceStd` varchar(64) default NULL,
  `ProvinceError` double default NULL,
  `County` varchar(64) default NULL,
  `Plot` varchar(32) default NULL,
  `PlotArea` varchar(10) default NULL,
  `Latitude` decimal(10,5) default NULL,
  `Longitude` decimal(10,5) default NULL,
  `Date` date default NULL,
  `SurveyType` varchar(10) default NULL,
  `Abund` int(11) default NULL,
  `Abund1` int(11) default NULL,
  `Abund2.5` int(11) default NULL,
  `Abund10` int(11) default NULL,
  `PctCover` decimal(10,5) default NULL,
  `DataSource` varchar(128) default NULL,
  PRIMARY KEY  (`OccurID`),
  KEY `DBPlotID` (`DBPlotID`),
  KEY `ObservationID` (`ObservationID`),
  KEY `Family` (`Family`(16)),
  KEY `TaxonCorrected` (`TaxonCorrected`(25)),
  KEY `ORIGLATIN` (`OrigGenus`(16),`OrigSpecies`(20)),
  KEY `CountryStd` (`CountryStd`),
  KEY `SurveyType` (`SurveyType`),
  KEY `DataSource` (`DataSource`),
  KEY `Family_2` (`Family`),
  KEY `Rank` (`Rank`),
  KEY `CountryError` (`CountryError`),
  KEY `ProvinceError` (`ProvinceError`),
  KEY `TaxonomyID` (`TaxonomyID`),
  KEY `Latin` (`Latin`(25)),
  KEY `Accepted` (`Accepted`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=12050437 ;
