-- Table structure for table `Betalingen`
--

CREATE TABLE `Betalingen` (
  `admnr` int(11) NOT NULL,
  `volgnr` int(11) NOT NULL,
  `debtor` int(11) DEFAULT NULL,
  `factuurid` int(11) DEFAULT NULL,
  `dt` date DEFAULT NULL,
  `bedrag` decimal(7,2) DEFAULT NULL,
  `journaal` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`admnr`,`volgnr`),
  KEY `debtor` (`debtor`),
  KEY `NewIndex1` (`admnr`,`factuurid`),
  KEY `NewIndex2` (`admnr`,`journaal`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BindwijzeKoppeling`
--

CREATE TABLE `BindwijzeKoppeling` (
  `Artikelgroep` varchar(20) NOT NULL,
  `Bindwijze` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`Artikelgroep`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `DebTrs`
--

CREATE TABLE `DebTrs` (
  `adm_nr` int(11) NOT NULL,
  `seq_nr_deb` int(11) NOT NULL,
  `fin_yr` int(11) NOT NULL,
  `debtor` int(11) NOT NULL,
  `date` date DEFAULT NULL,
  `period` int(11) NOT NULL,
  `entry_nr_type` int(11) NOT NULL,
  `entry_nr` int(11) NOT NULL,
  `journal_nr` int(11) NOT NULL,
  `descr` varchar(200) NOT NULL,
  `amt_def_cur` decimal(10,2) NOT NULL,
  `curr_code` varchar(10) DEFAULT NULL,
  `curr_code_extra` varchar(10) DEFAULT NULL,
  `exch_rate` float DEFAULT NULL,
  `exch_rate_2` float DEFAULT NULL,
  `exch_rate3` float DEFAULT NULL,
  `amt_cur` decimal(10,2) DEFAULT NULL,
  `entry_nr_fin` int(11) NOT NULL,
  `posting_nr_journal` int(11) NOT NULL,
  `XXXpost_nr_2` int(11) NOT NULL,
  `check_number` int(11) NOT NULL,
  `closing_transac` int(11) NOT NULL,
  `revalue_transact` int(11) NOT NULL,
  `match_inv` int(11) NOT NULL,
  `match_trs` int(11) NOT NULL,
  `rev_entry` int(11) NOT NULL,
  `seq_nr_ledger` int(11) NOT NULL,
  `pay_condition` int(11) NOT NULL,
  `mcode1` varchar(50) NOT NULL,
  `mcode2` varchar(50) NOT NULL,
  `mcode3` varchar(50) NOT NULL,
  `mcode4` varchar(50) NOT NULL,
  `mcode5` varchar(50) NOT NULL,
  `match_inv_type` int(11) NOT NULL,
  `time_lc` int(11) NOT NULL,
  `date_lc` date NOT NULL,
  `euserid_lc` varchar(20) NOT NULL,
  `type_lc` char(2) DEFAULT NULL,
  `source_lc` varchar(20) NOT NULL,
  `seq_nr_5` int(11) NOT NULL,
  `line_nr` int(11) NOT NULL,
  `bank_acc_nr` varchar(20) NOT NULL,
  `curr_code_bank_acc_nr` varchar(20) NOT NULL,
  `posting_nr` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Debtor_Nummers`
--

CREATE TABLE `Debtor_Nummers` (
  `Id` int(11) NOT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `ExportHistory`
--

CREATE TABLE `ExportHistory` (
  `Administratieid` int(11) NOT NULL DEFAULT '0',
  `Orderregelnummer` bigint(20) unsigned NOT NULL DEFAULT '0',
  `Ordernummer` bigint(20) NOT NULL DEFAULT '0',
  `DT` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Batchid` int(11) NOT NULL DEFAULT '0',
  `Exactid` int(11) NOT NULL DEFAULT '0',
  `Klantid` int(11) DEFAULT NULL,
  `Exportregel` text NOT NULL,
  `Volgnummer` int(11) DEFAULT NULL,
  KEY `Ordernummer` (`Ordernummer`),
  KEY `DT` (`DT`),
  KEY `Orderregelnummer` (`Orderregelnummer`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=COMPRESSED;

--
-- Temporary table structure for view `ExportView`
--

/*!50001 DROP VIEW IF EXISTS `ExportView`*/;
/*!50001 CREATE TABLE `ExportView` (
  `Administratieid` tinyint NOT NULL,
  `Orderregelnummer` tinyint NOT NULL,
  `Ordernummer` tinyint NOT NULL,
  `Batchid` tinyint NOT NULL,
  `Exactid` tinyint NOT NULL,
  `Klantid` tinyint NOT NULL,
  `ArtikelCode` tinyint NOT NULL,
  `Aantal` tinyint NOT NULL,
  `Prijs` tinyint NOT NULL,
  `Korting` tinyint NOT NULL,
  `Backorder` tinyint NOT NULL,
  `BackorderReden` tinyint NOT NULL,
  `Bestellingid` tinyint NOT NULL,
  `Betaalwijze` tinyint NOT NULL,
  `Omschrijving` tinyint NOT NULL,
  `Rekeningnummer` tinyint NOT NULL,
  `Initialen` tinyint NOT NULL,
  `DT` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Facturen`
--

CREATE TABLE `Facturen` (
  `Admnr` int(11) NOT NULL,
  `FactuurID` int(11) NOT NULL DEFAULT '0',
  `OrderID` int(11) NOT NULL DEFAULT '0',
  `Debtor` int(11) NOT NULL,
  `InvoiceDebtor` int(11) NOT NULL,
  `DT` date DEFAULT NULL,
  `Bedrag` decimal(8,2) DEFAULT NULL,
  `OpenBedrag` decimal(8,2) DEFAULT NULL,
  `Status` enum('nieuw','open','betaald') DEFAULT NULL,
  `LaatsteHerinnering` datetime DEFAULT '0000-00-00 00:00:00',
  `AantalHerinneringen` int(11) DEFAULT '0',
  `PayMethod` int(11) DEFAULT '0',
  `PayCondition` int(11) DEFAULT '14',
  `VervalDatum` date DEFAULT NULL,
  `AantalPosten` int(11) DEFAULT '0',
  `DTSync` datetime DEFAULT NULL,
  `PDF` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Admnr`,`FactuurID`),
  KEY `DT` (`DT`),
  KEY `OrderID` (`OrderID`),
  KEY `Admnr` (`Admnr`,`Debtor`,`Status`),
  KEY `NewIndex1` (`FactuurID`),
  KEY `Status` (`Status`,`Admnr`),
  KEY `InvoiceDebtor` (`InvoiceDebtor`),
  KEY `Debtor` (`Debtor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `FactuurHerinneringen`
--

CREATE TABLE `FactuurHerinneringen` (
  `Admnr` int(11) NOT NULL,
  `FactuurID` int(11) NOT NULL,
  `HerinneringNiveau` int(11) NOT NULL DEFAULT '0',
  `HerinneringDT` date DEFAULT NULL,
  `Mail_1` date DEFAULT NULL,
  `Brief_2` date DEFAULT NULL,
  `Mail_3` date DEFAULT NULL,
  `Brief_4` date DEFAULT NULL,
  `Mail_5` date DEFAULT NULL,
  `Brief_6` date DEFAULT NULL,
  `EDR` date DEFAULT NULL,
  PRIMARY KEY (`Admnr`,`FactuurID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `FactuurNummers`
--

CREATE TABLE `FactuurNummers` (
  `admnr` int(11) NOT NULL,
  `factuurid` decimal(10,0) NOT NULL,
  `exactid` int(11) DEFAULT NULL,
  PRIMARY KEY (`admnr`,`factuurid`),
  KEY `factuurid` (`factuurid`),
  KEY `exactid` (`exactid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `FactuurRegels`
--

CREATE TABLE `FactuurRegels` (
  `Admnr` smallint(3) unsigned NOT NULL,
  `FactuurID` int(8) unsigned NOT NULL,
  `LineNr` tinyint(3) unsigned NOT NULL,
  `Omschrijving` tinytext NOT NULL,
  `Aantal` int(11) NOT NULL,
  `Ean` varchar(13) NOT NULL,
  `Prijs` decimal(13,2) NOT NULL,
  `BTWCode` char(1) NOT NULL,
  `KortingPercentage` smallint(4) NOT NULL,
  PRIMARY KEY (`Admnr`,`FactuurID`,`LineNr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `FactuurVolgnummers`
--

CREATE TABLE `FactuurVolgnummers` (
  `admnr` int(11) NOT NULL,
  `volgnummer` int(11) NOT NULL,
  PRIMARY KEY (`admnr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `HandmatigeVolgnummers`
--

CREATE TABLE `HandmatigeVolgnummers` (
  `admnr` int(11) NOT NULL,
  `volgnummer` int(11) NOT NULL,
  PRIMARY KEY (`admnr`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

--
-- Temporary table structure for view `Herinneringen_Alles_Voor_Klant`
--

/*!50001 DROP VIEW IF EXISTS `Herinneringen_Alles_Voor_Klant`*/;
/*!50001 CREATE TABLE `Herinneringen_Alles_Voor_Klant` (
  `Debtor` tinyint NOT NULL,
  `FactuurId` tinyint NOT NULL,
  `FactuurDatum` tinyint NOT NULL,
  `BetaalTermijn` tinyint NOT NULL,
  `VervalDatum` tinyint NOT NULL,
  `Vervallen` tinyint NOT NULL,
  `HerinneringNiveau` tinyint NOT NULL,
  `LaatsteHerinnering` tinyint NOT NULL,
  `Mail_1` tinyint NOT NULL,
  `Brief_2` tinyint NOT NULL,
  `Mail_3` tinyint NOT NULL,
  `Brief_4` tinyint NOT NULL,
  `Mail_5` tinyint NOT NULL,
  `Brief_6` tinyint NOT NULL,
  `EDR` tinyint NOT NULL,
  `OrigineelBedrag` tinyint NOT NULL,
  `OpenBedrag` tinyint NOT NULL,
  `AantalPosten` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `Template` tinyint NOT NULL,
  `EmailAdres` tinyint NOT NULL,
  `Aanmanen` tinyint NOT NULL,
  `FactuurBedrijfsnaam` tinyint NOT NULL,
  `FactuurBedrijfsnaam2` tinyint NOT NULL,
  `FactuurAfdeling` tinyint NOT NULL,
  `FactuurGeslacht` tinyint NOT NULL,
  `FactuurInitialen` tinyint NOT NULL,
  `FactuurAchternaam` tinyint NOT NULL,
  `FactuurStraatnaam` tinyint NOT NULL,
  `FactuurHuisnummer` tinyint NOT NULL,
  `FactuurHuisnummerToevoeging` tinyint NOT NULL,
  `FactuurPostcode` tinyint NOT NULL,
  `FactuurPlaatsnaam` tinyint NOT NULL,
  `FactuurLand` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Herinneringen_EDR_Bedrijven`
--

/*!50001 DROP VIEW IF EXISTS `Herinneringen_EDR_Bedrijven`*/;
/*!50001 CREATE TABLE `Herinneringen_EDR_Bedrijven` (
  `Referentie` tinyint NOT NULL,
  `Bedrijfsnaam` tinyint NOT NULL,
  `Bedrijfsnaam2` tinyint NOT NULL,
  `Afdeling` tinyint NOT NULL,
  `Voorletters` tinyint NOT NULL,
  `Tussenvoegsel` tinyint NOT NULL,
  `Achternaam` tinyint NOT NULL,
  `Geslacht` tinyint NOT NULL,
  `GeboorteDatum` tinyint NOT NULL,
  `Telefoon` tinyint NOT NULL,
  `Fax` tinyint NOT NULL,
  `Mobiel` tinyint NOT NULL,
  `Mail` tinyint NOT NULL,
  `RekeningNr` tinyint NOT NULL,
  `Straat` tinyint NOT NULL,
  `Huisnr` tinyint NOT NULL,
  `Toevoeging` tinyint NOT NULL,
  `PC` tinyint NOT NULL,
  `Plaats` tinyint NOT NULL,
  `Factuur` tinyint NOT NULL,
  `RenteDatum` tinyint NOT NULL,
  `FactuurBedrag` tinyint NOT NULL,
  `Betaald` tinyint NOT NULL,
  `Saldo` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Herinneringen_EDR_Personen`
--

/*!50001 DROP VIEW IF EXISTS `Herinneringen_EDR_Personen`*/;
/*!50001 CREATE TABLE `Herinneringen_EDR_Personen` (
  `Referentie` tinyint NOT NULL,
  `Voorletters` tinyint NOT NULL,
  `Tussenvoegsel` tinyint NOT NULL,
  `Achternaam` tinyint NOT NULL,
  `Geslacht` tinyint NOT NULL,
  `GeboorteDatum` tinyint NOT NULL,
  `Telefoon` tinyint NOT NULL,
  `Fax` tinyint NOT NULL,
  `Mobiel` tinyint NOT NULL,
  `Mail` tinyint NOT NULL,
  `RekeningNr` tinyint NOT NULL,
  `Straat` tinyint NOT NULL,
  `Huisnr` tinyint NOT NULL,
  `Toevoeging` tinyint NOT NULL,
  `PC` tinyint NOT NULL,
  `Plaats` tinyint NOT NULL,
  `Factuur` tinyint NOT NULL,
  `RenteDatum` tinyint NOT NULL,
  `FactuurBedrag` tinyint NOT NULL,
  `Betaald` tinyint NOT NULL,
  `Saldo` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Herinneringen_Klanten`
--

/*!50001 DROP VIEW IF EXISTS `Herinneringen_Klanten`*/;
/*!50001 CREATE TABLE `Herinneringen_Klanten` (
  `Template` tinyint NOT NULL,
  `Debtor` tinyint NOT NULL,
  `AantalFacturen` tinyint NOT NULL,
  `OudsteFactuur` tinyint NOT NULL,
  `MaxNiveau` tinyint NOT NULL,
  `MinNiveau` tinyint NOT NULL,
  `LaatsteHerinnering` tinyint NOT NULL,
  `OrigineelBedrag` tinyint NOT NULL,
  `OpenBedrag` tinyint NOT NULL,
  `EmailAdres` tinyint NOT NULL,
  `Facturen` tinyint NOT NULL,
  `FactuurBedrijfsnaam` tinyint NOT NULL,
  `FactuurBedrijfsnaam2` tinyint NOT NULL,
  `FactuurAfdeling` tinyint NOT NULL,
  `FactuurGeslacht` tinyint NOT NULL,
  `FactuurInitialen` tinyint NOT NULL,
  `FactuurAchternaam` tinyint NOT NULL,
  `FactuurStraatnaam` tinyint NOT NULL,
  `FactuurHuisnummer` tinyint NOT NULL,
  `FactuurHuisnummerToevoeging` tinyint NOT NULL,
  `FactuurPostcode` tinyint NOT NULL,
  `FactuurPlaatsnaam` tinyint NOT NULL,
  `FactuurLand` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Herinneringen_Open_Voor_Klant`
--

/*!50001 DROP VIEW IF EXISTS `Herinneringen_Open_Voor_Klant`*/;
/*!50001 CREATE TABLE `Herinneringen_Open_Voor_Klant` (
  `Debtor` tinyint NOT NULL,
  `FactuurId` tinyint NOT NULL,
  `FactuurDatum` tinyint NOT NULL,
  `BetaalTermijn` tinyint NOT NULL,
  `VervalDatum` tinyint NOT NULL,
  `HerinneringNiveau` tinyint NOT NULL,
  `LaatsteHerinnering` tinyint NOT NULL,
  `Mail_1` tinyint NOT NULL,
  `Brief_2` tinyint NOT NULL,
  `Mail_3` tinyint NOT NULL,
  `Brief_4` tinyint NOT NULL,
  `Mail_5` tinyint NOT NULL,
  `Brief_6` tinyint NOT NULL,
  `EDR` tinyint NOT NULL,
  `OrigineelBedrag` tinyint NOT NULL,
  `OpenBedrag` tinyint NOT NULL,
  `AantalPosten` tinyint NOT NULL,
  `Template` tinyint NOT NULL,
  `EmailAdres` tinyint NOT NULL,
  `Aanmanen` tinyint NOT NULL,
  `FactuurBedrijfsnaam` tinyint NOT NULL,
  `FactuurBedrijfsnaam2` tinyint NOT NULL,
  `FactuurAfdeling` tinyint NOT NULL,
  `FactuurGeslacht` tinyint NOT NULL,
  `FactuurInitialen` tinyint NOT NULL,
  `FactuurAchternaam` tinyint NOT NULL,
  `FactuurStraatnaam` tinyint NOT NULL,
  `FactuurHuisnummer` tinyint NOT NULL,
  `FactuurHuisnummerToevoeging` tinyint NOT NULL,
  `FactuurPostcode` tinyint NOT NULL,
  `FactuurPlaatsnaam` tinyint NOT NULL,
  `FactuurLand` tinyint NOT NULL,
  `FactuurTelefoonnummer` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `HerinneringsTeksten`
--

CREATE TABLE `HerinneringsTeksten` (
  `Niveau` int(11) NOT NULL,
  `Meervoud` int(11) NOT NULL DEFAULT '0',
  `Email` int(11) NOT NULL,
  `Tekst` mediumtext,
  PRIMARY KEY (`Niveau`,`Meervoud`,`Email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `IBANConversie`
--

CREATE TABLE `IBANConversie` (
  `Rekeningnummer` varchar(20) NOT NULL,
  `IBAN` char(18) DEFAULT NULL,
  `BIC` char(8) DEFAULT NULL,
  `Geldig` tinyint(1) DEFAULT '0',
  UNIQUE KEY `Rekeningnummer` (`Rekeningnummer`),
  UNIQUE KEY `IBAN` (`IBAN`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Kenmerken`
--

CREATE TABLE `Kenmerken` (
  `Admnr` int(11) NOT NULL,
  `Exactid` int(11) NOT NULL,
  `Code` char(4) NOT NULL,
  `DT` datetime DEFAULT NULL,
  `Status` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Admnr`,`Exactid`,`Code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Log`
--

CREATE TABLE `Log` (
  `Administratienr` int(11) DEFAULT NULL,
  `Ordernummer` int(11) DEFAULT NULL,
  `Orderregelnummer` int(11) DEFAULT NULL,
  `KlantID` int(11) DEFAULT NULL,
  `ExactID` int(11) DEFAULT NULL,
  `LogType` varchar(10) DEFAULT NULL,
  `Regel` text,
  `DT` datetime DEFAULT NULL,
  KEY `Administratienr` (`Administratienr`,`Ordernummer`),
  KEY `Administratienr_2` (`Administratienr`,`Orderregelnummer`),
  KEY `KlantID` (`KlantID`),
  KEY `ExactID` (`ExactID`),
  KEY `DT` (`DT`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Rela`
--

CREATE TABLE `Rela` (
  `Debiteurnummer` int(11) DEFAULT NULL,
  `Exactid` bigint(11) NOT NULL DEFAULT '0',
  `Administratienummer` int(11) NOT NULL DEFAULT '0',
  `Geslacht` char(1) DEFAULT NULL,
  `Voorletters` varchar(10) DEFAULT NULL,
  `Achternaam` varchar(30) DEFAULT NULL,
  `Straatnaam` varchar(30) DEFAULT NULL,
  `Huisnummer` varchar(9) DEFAULT NULL,
  `Huisnummertoevoeging` varchar(6) DEFAULT NULL,
  `Postcode` varchar(8) DEFAULT NULL,
  `Plaatsnaam` varchar(30) DEFAULT NULL,
  `Telefoon` varchar(15) DEFAULT NULL,
  `Fax` varchar(15) DEFAULT NULL,
  `Mobiel` varchar(15) DEFAULT NULL,
  `Bedrijfsnaam` varchar(40) DEFAULT NULL,
  `Bedrijfsnaam2` varchar(40) DEFAULT NULL,
  `Afdeling` varchar(40) DEFAULT NULL,
  `Herkomst` varchar(6) DEFAULT NULL,
  `Herkomstinitieel` varchar(6) DEFAULT NULL,
  `Mailcode` varchar(6) DEFAULT NULL,
  `Mailen` char(3) DEFAULT NULL,
  `E-mailen` char(3) DEFAULT NULL,
  `Blokkeren` char(3) DEFAULT NULL,
  `Reden` varchar(6) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  `Factuurdebiteur` int(11) DEFAULT NULL,
  `DTInvoer` datetime DEFAULT NULL,
  `DTGewijzigd` datetime DEFAULT NULL,
  `Authorisatie` tinyint(4) DEFAULT '0',
  `Locked` tinyint(4) DEFAULT '0',
  `DTLock` datetime DEFAULT NULL,
  PRIMARY KEY (`Exactid`,`Administratienummer`),
  KEY `Postcode` (`Postcode`),
  KEY `Huisnummer` (`Huisnummer`),
  KEY `Plaatsnaam` (`Plaatsnaam`),
  KEY `Achternaam` (`Achternaam`),
  KEY `Email` (`Email`),
  KEY `Administratienummer` (`Debiteurnummer`,`Administratienummer`,`Authorisatie`,`Locked`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `Rela_Nummers`
--

CREATE TABLE `Rela_Nummers` (
  `Id` int(11) NOT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `VerwijderdeKlanten`
--

CREATE TABLE `VerwijderdeKlanten` (
  `Administratienummer` int(11) NOT NULL DEFAULT '0',
  `Klantid` int(11) DEFAULT NULL,
  `Exactid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`Administratienummer`,`Exactid`),
  KEY `Klantid` (`Klantid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `_Aanmaningen`
--

CREATE TABLE `_Aanmaningen` (
  `aanmanid` int(11) NOT NULL AUTO_INCREMENT,
  `dt` datetime DEFAULT NULL,
  `dtposten` datetime DEFAULT NULL,
  `admnr` int(11) NOT NULL,
  PRIMARY KEY (`aanmanid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `_Betalingen`
--

CREATE TABLE `_Betalingen` (
  `admnr` int(11) NOT NULL,
  `volgnr` int(11) NOT NULL,
  `debtor` int(11) DEFAULT NULL,
  `factuurid` int(11) DEFAULT NULL,
  `dt` date DEFAULT NULL,
  `bedrag` decimal(7,2) DEFAULT NULL,
  PRIMARY KEY (`admnr`,`volgnr`),
  KEY `debtor` (`debtor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `exact_lsisl`
--

CREATE TABLE `exact_lsisl` (
  `adm_nr` int(11) NOT NULL,
  `seqnr_lsihl` bigint(20) DEFAULT NULL,
  `invoice_nr` bigint(20) NOT NULL,
  `linenr_lsisl` bigint(20) NOT NULL,
  `item_code` char(15) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `amt_inc_vat_inc_disc` decimal(7,2) DEFAULT NULL,
  `userid_cr` char(4) DEFAULT NULL,
  PRIMARY KEY (`adm_nr`,`invoice_nr`,`linenr_lsisl`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC;

--
-- Dumping routines for database 'ExactKoppeling'
--
/*!50003 DROP FUNCTION IF EXISTS `match_factuurregels` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` FUNCTION `match_factuurregels`( BID INT, FID INT ) RETURNS int(11)
    READS SQL DATA
BEGIN
	DECLARE FRegels INT;
	DECLARE ORegels INT;
	DECLARE BRegels INT;
	
	
	SELECT COUNT(*) INTO BRegels FROM Managementboek_Klanten.Bestellingen B LEFT JOIN ExactKoppeling.FactuurRegels R ON ( R.Aantal = B.Aantal AND R.Ean = B.Ean AND R.Admnr = 709 )
	WHERE  R.FactuurID = FID AND B.BestellingId = BID AND R.Ean NOT IN ('PORTO','P','PI');
	
	SELECT COUNT(*) INTO ORegels FROM Managementboek_Klanten.Bestellingen B  WHERE  B.BestellingId = BID AND B.Ean NOT IN ( 'PORTO','P','PI' );
	RETURN ( ORegels = BRegels );
    END ;;
DELIMITER ;

--
-- Current Database: `Feed_Nielsen`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Feed_Nielsen` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Feed_Nielsen`;

--
-- Table structure for table `Boeken`
--

CREATE TABLE `Boeken` (
  `ISBN13` char(13) NOT NULL,
  `TL` tinytext,
  `CR1` char(3) DEFAULT NULL,
  `CRT1` varchar(40) DEFAULT NULL,
  `CCI1` char(1) DEFAULT NULL,
  `ICKN1` tinytext,
  `CR2` char(3) DEFAULT NULL,
  `CRT2` varchar(40) DEFAULT NULL,
  `CCI2` char(1) DEFAULT NULL,
  `ICFN2` tinytext,
  `ICKN2` tinytext,
  `CR3` char(3) DEFAULT NULL,
  `CRT3` varchar(40) DEFAULT NULL,
  `CCI3` char(1) DEFAULT NULL,
  `ICFN3` tinytext,
  `ICKN3` tinytext,
  `HMM` char(4) DEFAULT NULL,
  `WMM` varchar(5) DEFAULT NULL,
  `SMM` char(4) DEFAULT NULL,
  `WG` varchar(7) DEFAULT NULL,
  `EDSS` tinytext,
  `PFC` char(2) DEFAULT NULL,
  `PFCT` varchar(33) DEFAULT NULL,
  `PFD1` char(4) DEFAULT NULL,
  `PFDT1` varchar(33) DEFAULT NULL,
  `PFD2` char(4) DEFAULT NULL,
  `PFDT2` char(25) DEFAULT NULL,
  `IMPN` tinytext,
  `IMPID` varchar(19) DEFAULT NULL,
  `PUBN` tinytext,
  `PUBID` varchar(19) DEFAULT NULL,
  `COP` varchar(39) DEFAULT NULL,
  `LS` tinytext,
  `NAC1` char(2) DEFAULT NULL,
  `NAT1` varchar(34) DEFAULT NULL,
  `DEWS1` char(5) DEFAULT NULL,
  `DEWEY1` tinytext,
  `BISACSC1` char(10) DEFAULT NULL,
  `BISACC1` char(9) DEFAULT NULL,
  `BISACT1` tinytext,
  `BISACSC2` char(10) DEFAULT NULL,
  `BISACC2` char(9) DEFAULT NULL,
  `BISACT2` tinytext,
  `BIC2SC1` varchar(6) DEFAULT NULL,
  `BIC2ST1` tinytext,
  `BIC2SC2` varchar(6) DEFAULT NULL,
  `BIC2ST2` tinytext,
  `PUBPD` int(8) unsigned DEFAULT NULL,
  `PUBSC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PUBST` varchar(31) DEFAULT NULL,
  `USDCCPRA` char(2) DEFAULT NULL,
  `USDCCPRC` char(3) DEFAULT NULL,
  `USDCCPRRRP` decimal(10,2) DEFAULT NULL,
  `USDCCPRTOP` tinyint(1) unsigned DEFAULT NULL,
  `USDCCPRRRPLT` decimal(10,2) unsigned DEFAULT NULL,
  `USDCCPRPN` char(21) DEFAULT NULL,
  `USNBDAA` char(2) DEFAULT NULL,
  `USNBDPAC` tinyint(2) unsigned DEFAULT NULL,
  `USNBDPAT` varchar(37) DEFAULT NULL,
  `USADN1` tinytext,
  `EAN` char(13) DEFAULT NULL,
  `ICFN1` tinytext,
  `EPT` varchar(35) DEFAULT NULL,
  `EPTC` tinyint(3) unsigned zerofill DEFAULT NULL,
  `EPF` varchar(56) DEFAULT NULL,
  `EPFC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `EPFS` tinytext,
  `NBDSD` text,
  `NBDLD` text,
  `PWU1` tinytext,
  `PWTC1` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PWTT1` varchar(62) DEFAULT NULL,
  `PUBAIS13` char(13) DEFAULT NULL,
  `GBPCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `GBPCCPTD` varchar(37) DEFAULT NULL,
  `GBPCCPRA` char(3) DEFAULT NULL,
  `GBPCCPRC` char(3) DEFAULT NULL,
  `GBPCCPRRRP` decimal(10,2) unsigned DEFAULT NULL,
  `GBPCCPRPN` varchar(64) DEFAULT NULL,
  `USDCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `USDCCPTD` varchar(37) DEFAULT NULL,
  `EURCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `EURCCPTD` varchar(37) DEFAULT NULL,
  `EURCCPRA` char(3) DEFAULT NULL,
  `EURCCPRC` char(3) DEFAULT NULL,
  `EURCCPRRRP` decimal(10,2) DEFAULT NULL,
  `EURCCPRPN` varchar(64) DEFAULT NULL,
  `NBDTOC` mediumtext,
  `BIC2QC1` char(10) DEFAULT NULL,
  `BIC2QC2` char(10) DEFAULT NULL,
  `BIC2QC3` char(10) DEFAULT NULL,
  `BIC2QT1` tinytext,
  `BIC2QT2` tinytext,
  `BIC2QT3` tinytext,
  `BIC2SC3` char(10) DEFAULT NULL,
  `BIC2ST3` tinytext,
  `BISACC3` char(10) DEFAULT NULL,
  `BISACSC3` char(10) DEFAULT NULL,
  `BISACT3` tinytext,
  `CRT10` char(25) DEFAULT NULL,
  `CRT4` char(27) DEFAULT NULL,
  `CRT5` char(27) DEFAULT NULL,
  `CRT6` char(27) DEFAULT NULL,
  `CRT7` char(27) DEFAULT NULL,
  `CRT8` char(22) DEFAULT NULL,
  `CRT9` char(22) DEFAULT NULL,
  `EPBIS13` char(13) DEFAULT NULL,
  `EPSS` char(15) DEFAULT NULL,
  `EURADI1` mediumint(6) unsigned DEFAULT NULL,
  `EURADI2` mediumint(6) unsigned DEFAULT NULL,
  `EURADI3` mediumint(6) unsigned DEFAULT NULL,
  `EURADN1` tinytext,
  `EURADN2` tinytext,
  `EURADN3` tinytext,
  `EURCCPRRRPLT` decimal(6,2) unsigned DEFAULT NULL,
  `EURCCPRTOP` tinyint(1) unsigned DEFAULT NULL,
  `EURNBDAA` char(3) DEFAULT NULL,
  `EURNBDPAC` tinyint(2) unsigned DEFAULT NULL,
  `EURNBDPAT` tinytext,
  `EURNBDPQ` char(4) DEFAULT NULL,
  `GBPCCPRRRPLT` decimal(6,2) unsigned DEFAULT NULL,
  `GBPCCPRTOP` smallint(1) unsigned DEFAULT NULL,
  `ICAFF1` tinytext,
  `ICAFF2` tinytext,
  `ICAFF3` tinytext,
  `ICCY1` tinytext,
  `ICCY2` tinytext,
  `ICCY3` tinytext,
  `ICKNP1` tinytext,
  `ICKNS1` tinytext,
  `ICKNS10` tinytext,
  `ICKNS2` tinytext,
  `ICKNS3` tinytext,
  `ICKNS4` tinytext,
  `ICKNS5` tinytext,
  `ICKNS6` tinytext,
  `ICLAN1` tinytext,
  `ICLAN10` tinytext,
  `ICLAN2` tinytext,
  `ICLAN3` tinytext,
  `ICNAK1` tinytext,
  `ICNAK2` tinytext,
  `ICNAK3` tinytext,
  `ICPP1` tinytext,
  `ICPP2` tinytext,
  `ICPP3` tinytext,
  `ICTAN1` tinytext,
  `ICTAN2` tinytext,
  `ICTAN3` tinytext,
  `ICTBN1` tinytext,
  `ICTBN2` tinytext,
  `ICTBN3` tinytext,
  `ISSN` tinytext,
  `LA` tinytext,
  `MOPD` int(8) unsigned DEFAULT NULL,
  `NAC10` tinytext,
  `NAC2` char(2) DEFAULT NULL,
  `NAC3` char(2) DEFAULT NULL,
  `NAC4` char(2) DEFAULT NULL,
  `NAC5` char(2) DEFAULT NULL,
  `NAC6` char(2) DEFAULT NULL,
  `NAC7` char(2) DEFAULT NULL,
  `NAC8` char(2) DEFAULT NULL,
  `NAC9` char(1) DEFAULT NULL,
  `NAT10` char(10) DEFAULT NULL,
  `NAT2` varchar(50) DEFAULT NULL,
  `NAT3` varchar(50) DEFAULT NULL,
  `NAT4` varchar(50) DEFAULT NULL,
  `NAT5` varchar(50) DEFAULT NULL,
  `NAT6` varchar(50) DEFAULT NULL,
  `NAT7` varchar(50) DEFAULT NULL,
  `NAT8` varchar(50) DEFAULT NULL,
  `NAT9` varchar(50) DEFAULT NULL,
  `NWS` tinytext,
  `PAGNUM` int(11) DEFAULT NULL,
  `PFD3` char(4) DEFAULT NULL,
  `PFD4` char(4) DEFAULT NULL,
  `PFDT3` char(24) DEFAULT NULL,
  `PFDT4` char(24) DEFAULT NULL,
  `POP` varchar(32) DEFAULT NULL,
  `PS1` tinytext,
  `PT1` tinytext,
  `PT2` tinytext,
  `PTS` tinytext,
  `PVNO1` tinytext,
  `PVNO2` tinytext,
  `PWTC2` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PWTC3` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PWTT2` tinytext,
  `PWTT3` tinytext,
  `PWU2` tinytext,
  `PWU3` tinytext,
  `REPBIS13` char(13) DEFAULT NULL,
  `REPIS13` char(13) DEFAULT NULL,
  `SLC` char(3) DEFAULT NULL,
  `SLT` varchar(30) DEFAULT NULL,
  `SN` tinytext,
  `ST` tinytext,
  `UKADI1` mediumint(5) unsigned DEFAULT NULL,
  `UKADI2` mediumint(5) unsigned DEFAULT NULL,
  `UKADN1` tinytext,
  `UKADN2` tinytext,
  `UKNBDAA` char(2) DEFAULT NULL,
  `UKNBDEAD` int(8) unsigned DEFAULT NULL,
  `UKNBDOT` char(2) DEFAULT NULL,
  `UKNBDPAC` tinyint(2) unsigned DEFAULT NULL,
  `UKNBDPAT` tinytext,
  `UKNBDPQ` char(4) DEFAULT NULL,
  `USADI1` tinytext,
  `USADI2` tinytext,
  `USADI3` mediumint(6) unsigned DEFAULT NULL,
  `USADN2` tinytext,
  `USADN3` tinytext,
  `USNBDPQ` char(2) DEFAULT NULL,
  `WSLREXUK` char(7) DEFAULT NULL,
  `WSLRUK` tinytext,
  `YS` tinytext,
  `GBPCCPRDC` varchar(25) DEFAULT NULL,
  `EURCCPRDC` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`ISBN13`),
  KEY `USNBDPAC` (`USNBDPAC`),
  KEY `PUBN` (`PUBN`(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `BoekenDeleted`
--

CREATE TABLE `BoekenDeleted` (
  `ISBN13` char(13) NOT NULL,
  `TL` tinytext,
  `CR1` char(3) DEFAULT NULL,
  `CRT1` varchar(40) DEFAULT NULL,
  `CCI1` char(1) DEFAULT NULL,
  `ICKN1` tinytext,
  `CR2` char(3) DEFAULT NULL,
  `CRT2` varchar(40) DEFAULT NULL,
  `CCI2` char(1) DEFAULT NULL,
  `ICFN2` tinytext,
  `ICKN2` tinytext,
  `CR3` char(3) DEFAULT NULL,
  `CRT3` varchar(40) DEFAULT NULL,
  `CCI3` char(1) DEFAULT NULL,
  `ICFN3` tinytext,
  `ICKN3` tinytext,
  `HMM` char(4) DEFAULT NULL,
  `WMM` varchar(5) DEFAULT NULL,
  `SMM` char(4) DEFAULT NULL,
  `WG` varchar(7) DEFAULT NULL,
  `EDSS` tinytext,
  `PFC` char(2) DEFAULT NULL,
  `PFCT` varchar(33) DEFAULT NULL,
  `PFD1` char(4) DEFAULT NULL,
  `PFDT1` varchar(33) DEFAULT NULL,
  `PFD2` char(4) DEFAULT NULL,
  `PFDT2` char(25) DEFAULT NULL,
  `IMPN` tinytext,
  `IMPID` varchar(19) DEFAULT NULL,
  `PUBN` varchar(255) DEFAULT NULL,
  `PUBID` varchar(19) DEFAULT NULL,
  `COP` varchar(39) DEFAULT NULL,
  `LS` varchar(107) DEFAULT NULL,
  `NAC1` char(2) DEFAULT NULL,
  `NAT1` varchar(34) DEFAULT NULL,
  `DEWS1` char(5) DEFAULT NULL,
  `DEWEY1` tinytext,
  `BISACSC1` char(10) DEFAULT NULL,
  `BISACC1` char(9) DEFAULT NULL,
  `BISACT1` tinytext,
  `BISACSC2` char(10) DEFAULT NULL,
  `BISACC2` char(9) DEFAULT NULL,
  `BISACT2` tinytext,
  `BIC2SC1` varchar(6) DEFAULT NULL,
  `BIC2ST1` tinytext,
  `BIC2SC2` varchar(6) DEFAULT NULL,
  `BIC2ST2` tinytext,
  `PUBPD` int(8) unsigned DEFAULT NULL,
  `PUBSC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PUBST` varchar(31) DEFAULT NULL,
  `USDCCPRA` char(2) DEFAULT NULL,
  `USDCCPRC` char(3) DEFAULT NULL,
  `USDCCPRRRP` decimal(10,2) DEFAULT NULL,
  `USDCCPRTOP` tinyint(1) unsigned DEFAULT NULL,
  `USDCCPRRRPLT` decimal(10,2) unsigned DEFAULT NULL,
  `USDCCPRPN` char(21) DEFAULT NULL,
  `USNBDAA` char(2) DEFAULT NULL,
  `USNBDPAC` tinyint(2) unsigned DEFAULT NULL,
  `USNBDPAT` varchar(37) DEFAULT NULL,
  `USADN1` varchar(100) DEFAULT NULL,
  `EAN` char(13) DEFAULT NULL,
  `ICFN1` tinytext,
  `EPT` varchar(35) DEFAULT NULL,
  `EPTC` tinyint(3) unsigned zerofill DEFAULT NULL,
  `EPF` varchar(56) DEFAULT NULL,
  `EPFC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `EPFS` varchar(234) DEFAULT NULL,
  `NBDSD` text,
  `NBDLD` text,
  `PWU1` varchar(184) DEFAULT NULL,
  `PWTC1` tinyint(2) unsigned zerofill DEFAULT NULL,
  `PWTT1` varchar(62) DEFAULT NULL,
  `PUBAIS13` char(13) DEFAULT NULL,
  `GBPCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `GBPCCPTD` varchar(37) DEFAULT NULL,
  `GBPCCPRA` char(3) DEFAULT NULL,
  `GBPCCPRC` char(3) DEFAULT NULL,
  `GBPCCPRRRP` decimal(10,2) unsigned DEFAULT NULL,
  `GBPCCPRPN` varchar(64) DEFAULT NULL,
  `USDCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `USDCCPTD` varchar(37) DEFAULT NULL,
  `EURCCPTC` tinyint(2) unsigned zerofill DEFAULT NULL,
  `EURCCPTD` varchar(37) DEFAULT NULL,
  `EURCCPRA` char(3) DEFAULT NULL,
  `EURCCPRC` char(3) DEFAULT NULL,
  `EURCCPRRRP` decimal(10,2) DEFAULT NULL,
  `EURCCPRPN` varchar(64) DEFAULT NULL,
  `NBDTOC` mediumtext,
  PRIMARY KEY (`ISBN13`),
  KEY `PUBN` (`PUBN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `BoekenWebsite`
--

/*!50001 DROP VIEW IF EXISTS `BoekenWebsite`*/;
/*!50001 CREATE TABLE `BoekenWebsite` (
  `ISBN13` tinyint NOT NULL,
  `TL` tinyint NOT NULL,
  `CR1` tinyint NOT NULL,
  `CRT1` tinyint NOT NULL,
  `CCI1` tinyint NOT NULL,
  `ICKN1` tinyint NOT NULL,
  `CR2` tinyint NOT NULL,
  `CRT2` tinyint NOT NULL,
  `CCI2` tinyint NOT NULL,
  `ICFN2` tinyint NOT NULL,
  `ICKN2` tinyint NOT NULL,
  `CR3` tinyint NOT NULL,
  `CRT3` tinyint NOT NULL,
  `CCI3` tinyint NOT NULL,
  `ICFN3` tinyint NOT NULL,
  `ICKN3` tinyint NOT NULL,
  `HMM` tinyint NOT NULL,
  `WMM` tinyint NOT NULL,
  `SMM` tinyint NOT NULL,
  `WG` tinyint NOT NULL,
  `EDSS` tinyint NOT NULL,
  `PFC` tinyint NOT NULL,
  `PFCT` tinyint NOT NULL,
  `PFD1` tinyint NOT NULL,
  `PFDT1` tinyint NOT NULL,
  `PFD2` tinyint NOT NULL,
  `PFDT2` tinyint NOT NULL,
  `IMPN` tinyint NOT NULL,
  `IMPID` tinyint NOT NULL,
  `PUBN` tinyint NOT NULL,
  `PUBID` tinyint NOT NULL,
  `COP` tinyint NOT NULL,
  `LS` tinyint NOT NULL,
  `NAC1` tinyint NOT NULL,
  `NAT1` tinyint NOT NULL,
  `DEWS1` tinyint NOT NULL,
  `DEWEY1` tinyint NOT NULL,
  `BISACSC1` tinyint NOT NULL,
  `BISACC1` tinyint NOT NULL,
  `BISACT1` tinyint NOT NULL,
  `BISACSC2` tinyint NOT NULL,
  `BISACC2` tinyint NOT NULL,
  `BISACT2` tinyint NOT NULL,
  `BIC2SC1` tinyint NOT NULL,
  `BIC2ST1` tinyint NOT NULL,
  `BIC2SC2` tinyint NOT NULL,
  `BIC2ST2` tinyint NOT NULL,
  `PUBPD` tinyint NOT NULL,
  `PUBSC` tinyint NOT NULL,
  `PUBST` tinyint NOT NULL,
  `USDCCPRA` tinyint NOT NULL,
  `USDCCPRC` tinyint NOT NULL,
  `USDCCPRRRP` tinyint NOT NULL,
  `USDCCPRTOP` tinyint NOT NULL,
  `USDCCPRRRPLT` tinyint NOT NULL,
  `USDCCPRPN` tinyint NOT NULL,
  `USNBDAA` tinyint NOT NULL,
  `USNBDPAC` tinyint NOT NULL,
  `USNBDPAT` tinyint NOT NULL,
  `USADN1` tinyint NOT NULL,
  `EAN` tinyint NOT NULL,
  `ICFN1` tinyint NOT NULL,
  `EPT` tinyint NOT NULL,
  `EPTC` tinyint NOT NULL,
  `EPF` tinyint NOT NULL,
  `EPFC` tinyint NOT NULL,
  `EPFS` tinyint NOT NULL,
  `NBDSD` tinyint NOT NULL,
  `NBDLD` tinyint NOT NULL,
  `PWU1` tinyint NOT NULL,
  `PWTC1` tinyint NOT NULL,
  `PWTT1` tinyint NOT NULL,
  `PUBAIS13` tinyint NOT NULL,
  `GBPCCPTC` tinyint NOT NULL,
  `GBPCCPTD` tinyint NOT NULL,
  `GBPCCPRA` tinyint NOT NULL,
  `GBPCCPRC` tinyint NOT NULL,
  `GBPCCPRRRP` tinyint NOT NULL,
  `GBPCCPRPN` tinyint NOT NULL,
  `USDCCPTC` tinyint NOT NULL,
  `USDCCPTD` tinyint NOT NULL,
  `EURCCPTC` tinyint NOT NULL,
  `EURCCPTD` tinyint NOT NULL,
  `EURCCPRA` tinyint NOT NULL,
  `EURCCPRC` tinyint NOT NULL,
  `EURCCPRRRP` tinyint NOT NULL,
  `EURCCPRPN` tinyint NOT NULL,
  `NBDTOC` tinyint NOT NULL,
  `BIC2QC1` tinyint NOT NULL,
  `BIC2QC2` tinyint NOT NULL,
  `BIC2QC3` tinyint NOT NULL,
  `BIC2QT1` tinyint NOT NULL,
  `BIC2QT2` tinyint NOT NULL,
  `BIC2QT3` tinyint NOT NULL,
  `BIC2SC3` tinyint NOT NULL,
  `BIC2ST3` tinyint NOT NULL,
  `BISACC3` tinyint NOT NULL,
  `BISACSC3` tinyint NOT NULL,
  `BISACT3` tinyint NOT NULL,
  `CRT10` tinyint NOT NULL,
  `CRT4` tinyint NOT NULL,
  `CRT5` tinyint NOT NULL,
  `CRT6` tinyint NOT NULL,
  `CRT7` tinyint NOT NULL,
  `CRT8` tinyint NOT NULL,
  `CRT9` tinyint NOT NULL,
  `EPBIS13` tinyint NOT NULL,
  `EPSS` tinyint NOT NULL,
  `EURADI1` tinyint NOT NULL,
  `EURADI2` tinyint NOT NULL,
  `EURADI3` tinyint NOT NULL,
  `EURADN1` tinyint NOT NULL,
  `EURADN2` tinyint NOT NULL,
  `EURADN3` tinyint NOT NULL,
  `EURCCPRRRPLT` tinyint NOT NULL,
  `EURCCPRTOP` tinyint NOT NULL,
  `EURNBDAA` tinyint NOT NULL,
  `EURNBDPAC` tinyint NOT NULL,
  `EURNBDPAT` tinyint NOT NULL,
  `EURNBDPQ` tinyint NOT NULL,
  `GBPCCPRRRPLT` tinyint NOT NULL,
  `GBPCCPRTOP` tinyint NOT NULL,
  `ICAFF1` tinyint NOT NULL,
  `ICAFF2` tinyint NOT NULL,
  `ICAFF3` tinyint NOT NULL,
  `ICCY1` tinyint NOT NULL,
  `ICCY2` tinyint NOT NULL,
  `ICCY3` tinyint NOT NULL,
  `ICKNP1` tinyint NOT NULL,
  `ICKNS1` tinyint NOT NULL,
  `ICKNS10` tinyint NOT NULL,
  `ICKNS2` tinyint NOT NULL,
  `ICKNS3` tinyint NOT NULL,
  `ICKNS4` tinyint NOT NULL,
  `ICKNS5` tinyint NOT NULL,
  `ICKNS6` tinyint NOT NULL,
  `ICLAN1` tinyint NOT NULL,
  `ICLAN10` tinyint NOT NULL,
  `ICLAN2` tinyint NOT NULL,
  `ICLAN3` tinyint NOT NULL,
  `ICNAK1` tinyint NOT NULL,
  `ICNAK2` tinyint NOT NULL,
  `ICNAK3` tinyint NOT NULL,
  `ICPP1` tinyint NOT NULL,
  `ICPP2` tinyint NOT NULL,
  `ICPP3` tinyint NOT NULL,
  `ICTAN1` tinyint NOT NULL,
  `ICTAN2` tinyint NOT NULL,
  `ICTAN3` tinyint NOT NULL,
  `ICTBN1` tinyint NOT NULL,
  `ICTBN2` tinyint NOT NULL,
  `ICTBN3` tinyint NOT NULL,
  `ISSN` tinyint NOT NULL,
  `LA` tinyint NOT NULL,
  `MOPD` tinyint NOT NULL,
  `NAC10` tinyint NOT NULL,
  `NAC2` tinyint NOT NULL,
  `NAC3` tinyint NOT NULL,
  `NAC4` tinyint NOT NULL,
  `NAC5` tinyint NOT NULL,
  `NAC6` tinyint NOT NULL,
  `NAC7` tinyint NOT NULL,
  `NAC8` tinyint NOT NULL,
  `NAC9` tinyint NOT NULL,
  `NAT10` tinyint NOT NULL,
  `NAT2` tinyint NOT NULL,
  `NAT3` tinyint NOT NULL,
  `NAT4` tinyint NOT NULL,
  `NAT5` tinyint NOT NULL,
  `NAT6` tinyint NOT NULL,
  `NAT7` tinyint NOT NULL,
  `NAT8` tinyint NOT NULL,
  `NAT9` tinyint NOT NULL,
  `NWS` tinyint NOT NULL,
  `PAGNUM` tinyint NOT NULL,
  `PFD3` tinyint NOT NULL,
  `PFD4` tinyint NOT NULL,
  `PFDT3` tinyint NOT NULL,
  `PFDT4` tinyint NOT NULL,
  `POP` tinyint NOT NULL,
  `PS1` tinyint NOT NULL,
  `PT1` tinyint NOT NULL,
  `PT2` tinyint NOT NULL,
  `PTS` tinyint NOT NULL,
  `PVNO1` tinyint NOT NULL,
  `PVNO2` tinyint NOT NULL,
  `PWTC2` tinyint NOT NULL,
  `PWTC3` tinyint NOT NULL,
  `PWTT2` tinyint NOT NULL,
  `PWTT3` tinyint NOT NULL,
  `PWU2` tinyint NOT NULL,
  `PWU3` tinyint NOT NULL,
  `REPBIS13` tinyint NOT NULL,
  `REPIS13` tinyint NOT NULL,
  `SLC` tinyint NOT NULL,
  `SLT` tinyint NOT NULL,
  `SN` tinyint NOT NULL,
  `ST` tinyint NOT NULL,
  `UKADI1` tinyint NOT NULL,
  `UKADI2` tinyint NOT NULL,
  `UKADN1` tinyint NOT NULL,
  `UKADN2` tinyint NOT NULL,
  `UKNBDAA` tinyint NOT NULL,
  `UKNBDEAD` tinyint NOT NULL,
  `UKNBDOT` tinyint NOT NULL,
  `UKNBDPAC` tinyint NOT NULL,
  `UKNBDPAT` tinyint NOT NULL,
  `UKNBDPQ` tinyint NOT NULL,
  `USADI1` tinyint NOT NULL,
  `USADI2` tinyint NOT NULL,
  `USADI3` tinyint NOT NULL,
  `USADN2` tinyint NOT NULL,
  `USADN3` tinyint NOT NULL,
  `USNBDPQ` tinyint NOT NULL,
  `WSLREXUK` tinyint NOT NULL,
  `WSLRUK` tinyint NOT NULL,
  `YS` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `BoekenWebsiteGefilterd`
--

/*!50001 DROP VIEW IF EXISTS `BoekenWebsiteGefilterd`*/;
/*!50001 CREATE TABLE `BoekenWebsiteGefilterd` (
  `ISBN13` tinyint NOT NULL,
  `TL` tinyint NOT NULL,
  `CR1` tinyint NOT NULL,
  `CRT1` tinyint NOT NULL,
  `CCI1` tinyint NOT NULL,
  `ICKN1` tinyint NOT NULL,
  `CR2` tinyint NOT NULL,
  `CRT2` tinyint NOT NULL,
  `CCI2` tinyint NOT NULL,
  `ICFN2` tinyint NOT NULL,
  `ICKN2` tinyint NOT NULL,
  `CR3` tinyint NOT NULL,
  `CRT3` tinyint NOT NULL,
  `CCI3` tinyint NOT NULL,
  `ICFN3` tinyint NOT NULL,
  `ICKN3` tinyint NOT NULL,
  `HMM` tinyint NOT NULL,
  `WMM` tinyint NOT NULL,
  `SMM` tinyint NOT NULL,
  `WG` tinyint NOT NULL,
  `EDSS` tinyint NOT NULL,
  `PFC` tinyint NOT NULL,
  `PFCT` tinyint NOT NULL,
  `PFD1` tinyint NOT NULL,
  `PFDT1` tinyint NOT NULL,
  `PFD2` tinyint NOT NULL,
  `PFDT2` tinyint NOT NULL,
  `IMPN` tinyint NOT NULL,
  `IMPID` tinyint NOT NULL,
  `PUBN` tinyint NOT NULL,
  `PUBID` tinyint NOT NULL,
  `COP` tinyint NOT NULL,
  `LS` tinyint NOT NULL,
  `NAC1` tinyint NOT NULL,
  `NAT1` tinyint NOT NULL,
  `DEWS1` tinyint NOT NULL,
  `DEWEY1` tinyint NOT NULL,
  `BISACSC1` tinyint NOT NULL,
  `BISACC1` tinyint NOT NULL,
  `BISACT1` tinyint NOT NULL,
  `BISACSC2` tinyint NOT NULL,
  `BISACC2` tinyint NOT NULL,
  `BISACT2` tinyint NOT NULL,
  `BIC2SC1` tinyint NOT NULL,
  `BIC2ST1` tinyint NOT NULL,
  `BIC2SC2` tinyint NOT NULL,
  `BIC2ST2` tinyint NOT NULL,
  `PUBPD` tinyint NOT NULL,
  `PUBSC` tinyint NOT NULL,
  `PUBST` tinyint NOT NULL,
  `USDCCPRA` tinyint NOT NULL,
  `USDCCPRC` tinyint NOT NULL,
  `USDCCPRRRP` tinyint NOT NULL,
  `USDCCPRTOP` tinyint NOT NULL,
  `USDCCPRRRPLT` tinyint NOT NULL,
  `USDCCPRPN` tinyint NOT NULL,
  `USNBDAA` tinyint NOT NULL,
  `USNBDPAC` tinyint NOT NULL,
  `USNBDPAT` tinyint NOT NULL,
  `USADN1` tinyint NOT NULL,
  `EAN` tinyint NOT NULL,
  `ICFN1` tinyint NOT NULL,
  `EPT` tinyint NOT NULL,
  `EPTC` tinyint NOT NULL,
  `EPF` tinyint NOT NULL,
  `EPFC` tinyint NOT NULL,
  `EPFS` tinyint NOT NULL,
  `NBDSD` tinyint NOT NULL,
  `NBDLD` tinyint NOT NULL,
  `PWU1` tinyint NOT NULL,
  `PWTC1` tinyint NOT NULL,
  `PWTT1` tinyint NOT NULL,
  `PUBAIS13` tinyint NOT NULL,
  `GBPCCPTC` tinyint NOT NULL,
  `GBPCCPTD` tinyint NOT NULL,
  `GBPCCPRA` tinyint NOT NULL,
  `GBPCCPRC` tinyint NOT NULL,
  `GBPCCPRRRP` tinyint NOT NULL,
  `GBPCCPRPN` tinyint NOT NULL,
  `USDCCPTC` tinyint NOT NULL,
  `USDCCPTD` tinyint NOT NULL,
  `EURCCPTC` tinyint NOT NULL,
  `EURCCPTD` tinyint NOT NULL,
  `EURCCPRA` tinyint NOT NULL,
  `EURCCPRC` tinyint NOT NULL,
  `EURCCPRRRP` tinyint NOT NULL,
  `EURCCPRPN` tinyint NOT NULL,
  `NBDTOC` tinyint NOT NULL,
  `BIC2QC1` tinyint NOT NULL,
  `BIC2QC2` tinyint NOT NULL,
  `BIC2QC3` tinyint NOT NULL,
  `BIC2QT1` tinyint NOT NULL,
  `BIC2QT2` tinyint NOT NULL,
  `BIC2QT3` tinyint NOT NULL,
  `BIC2SC3` tinyint NOT NULL,
  `BIC2ST3` tinyint NOT NULL,
  `BISACC3` tinyint NOT NULL,
  `BISACSC3` tinyint NOT NULL,
  `BISACT3` tinyint NOT NULL,
  `CRT10` tinyint NOT NULL,
  `CRT4` tinyint NOT NULL,
  `CRT5` tinyint NOT NULL,
  `CRT6` tinyint NOT NULL,
  `CRT7` tinyint NOT NULL,
  `CRT8` tinyint NOT NULL,
  `CRT9` tinyint NOT NULL,
  `EPBIS13` tinyint NOT NULL,
  `EPSS` tinyint NOT NULL,
  `EURADI1` tinyint NOT NULL,
  `EURADI2` tinyint NOT NULL,
  `EURADI3` tinyint NOT NULL,
  `EURADN1` tinyint NOT NULL,
  `EURADN2` tinyint NOT NULL,
  `EURADN3` tinyint NOT NULL,
  `EURCCPRRRPLT` tinyint NOT NULL,
  `EURCCPRTOP` tinyint NOT NULL,
  `EURNBDAA` tinyint NOT NULL,
  `EURNBDPAC` tinyint NOT NULL,
  `EURNBDPAT` tinyint NOT NULL,
  `EURNBDPQ` tinyint NOT NULL,
  `GBPCCPRRRPLT` tinyint NOT NULL,
  `GBPCCPRTOP` tinyint NOT NULL,
  `ICAFF1` tinyint NOT NULL,
  `ICAFF2` tinyint NOT NULL,
  `ICAFF3` tinyint NOT NULL,
  `ICCY1` tinyint NOT NULL,
  `ICCY2` tinyint NOT NULL,
  `ICCY3` tinyint NOT NULL,
  `ICKNP1` tinyint NOT NULL,
  `ICKNS1` tinyint NOT NULL,
  `ICKNS10` tinyint NOT NULL,
  `ICKNS2` tinyint NOT NULL,
  `ICKNS3` tinyint NOT NULL,
  `ICKNS4` tinyint NOT NULL,
  `ICKNS5` tinyint NOT NULL,
  `ICKNS6` tinyint NOT NULL,
  `ICLAN1` tinyint NOT NULL,
  `ICLAN10` tinyint NOT NULL,
  `ICLAN2` tinyint NOT NULL,
  `ICLAN3` tinyint NOT NULL,
  `ICNAK1` tinyint NOT NULL,
  `ICNAK2` tinyint NOT NULL,
  `ICNAK3` tinyint NOT NULL,
  `ICPP1` tinyint NOT NULL,
  `ICPP2` tinyint NOT NULL,
  `ICPP3` tinyint NOT NULL,
  `ICTAN1` tinyint NOT NULL,
  `ICTAN2` tinyint NOT NULL,
  `ICTAN3` tinyint NOT NULL,
  `ICTBN1` tinyint NOT NULL,
  `ICTBN2` tinyint NOT NULL,
  `ICTBN3` tinyint NOT NULL,
  `ISSN` tinyint NOT NULL,
  `LA` tinyint NOT NULL,
  `MOPD` tinyint NOT NULL,
  `NAC10` tinyint NOT NULL,
  `NAC2` tinyint NOT NULL,
  `NAC3` tinyint NOT NULL,
  `NAC4` tinyint NOT NULL,
  `NAC5` tinyint NOT NULL,
  `NAC6` tinyint NOT NULL,
  `NAC7` tinyint NOT NULL,
  `NAC8` tinyint NOT NULL,
  `NAC9` tinyint NOT NULL,
  `NAT10` tinyint NOT NULL,
  `NAT2` tinyint NOT NULL,
  `NAT3` tinyint NOT NULL,
  `NAT4` tinyint NOT NULL,
  `NAT5` tinyint NOT NULL,
  `NAT6` tinyint NOT NULL,
  `NAT7` tinyint NOT NULL,
  `NAT8` tinyint NOT NULL,
  `NAT9` tinyint NOT NULL,
  `NWS` tinyint NOT NULL,
  `PAGNUM` tinyint NOT NULL,
  `PFD3` tinyint NOT NULL,
  `PFD4` tinyint NOT NULL,
  `PFDT3` tinyint NOT NULL,
  `PFDT4` tinyint NOT NULL,
  `POP` tinyint NOT NULL,
  `PS1` tinyint NOT NULL,
  `PT1` tinyint NOT NULL,
  `PT2` tinyint NOT NULL,
  `PTS` tinyint NOT NULL,
  `PVNO1` tinyint NOT NULL,
  `PVNO2` tinyint NOT NULL,
  `PWTC2` tinyint NOT NULL,
  `PWTC3` tinyint NOT NULL,
  `PWTT2` tinyint NOT NULL,
  `PWTT3` tinyint NOT NULL,
  `PWU2` tinyint NOT NULL,
  `PWU3` tinyint NOT NULL,
  `REPBIS13` tinyint NOT NULL,
  `REPIS13` tinyint NOT NULL,
  `SLC` tinyint NOT NULL,
  `SLT` tinyint NOT NULL,
  `SN` tinyint NOT NULL,
  `ST` tinyint NOT NULL,
  `UKADI1` tinyint NOT NULL,
  `UKADI2` tinyint NOT NULL,
  `UKADN1` tinyint NOT NULL,
  `UKADN2` tinyint NOT NULL,
  `UKNBDAA` tinyint NOT NULL,
  `UKNBDEAD` tinyint NOT NULL,
  `UKNBDOT` tinyint NOT NULL,
  `UKNBDPAC` tinyint NOT NULL,
  `UKNBDPAT` tinyint NOT NULL,
  `UKNBDPQ` tinyint NOT NULL,
  `USADI1` tinyint NOT NULL,
  `USADI2` tinyint NOT NULL,
  `USADI3` tinyint NOT NULL,
  `USADN2` tinyint NOT NULL,
  `USADN3` tinyint NOT NULL,
  `USNBDPQ` tinyint NOT NULL,
  `WSLREXUK` tinyint NOT NULL,
  `WSLRUK` tinyint NOT NULL,
  `YS` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Klantnummer` tinyint NOT NULL,
  `Naamuitgever` tinyint NOT NULL,
  `Omschrijving` tinyint NOT NULL,
  `Adres` tinyint NOT NULL,
  `Postcode` tinyint NOT NULL,
  `Woonplaats` tinyint NOT NULL,
  `Telefoon` tinyint NOT NULL,
  `Fax` tinyint NOT NULL,
  `Email` tinyint NOT NULL,
  `Contactpersoon` tinyint NOT NULL,
  `Kortingmp_a` tinyint NOT NULL,
  `Kortingmp_s` tinyint NOT NULL,
  `Kortingmp_w` tinyint NOT NULL,
  `Kortingmp_o` tinyint NOT NULL,
  `Kortingmp_g` tinyint NOT NULL,
  `Kortingmp_e` tinyint NOT NULL,
  `Kortingmp_NCOI` tinyint NOT NULL,
  `Magazijnlocatienummer` tinyint NOT NULL,
  `Magazijnlocatienummerbulk` tinyint NOT NULL,
  `Magazijnlocatienummercom` tinyint NOT NULL,
  `Magazijnlocatienummercombulk` tinyint NOT NULL,
  `Verborgen` tinyint NOT NULL,
  `Crediteurnummer` tinyint NOT NULL,
  `BestelpuntID` tinyint NOT NULL,
  `BestelwijzeID` tinyint NOT NULL,
  `NCOIBestelpuntID` tinyint NOT NULL,
  `Minimalebestelhoeveelheid` tinyint NOT NULL,
  `Feed` tinyint NOT NULL,
  `Aanhef` tinyint NOT NULL,
  `Afsluiting` tinyint NOT NULL,
  `Emailvoorvragen` tinyint NOT NULL,
  `Afspraak` tinyint NOT NULL,
  `Ruzie` tinyint NOT NULL,
  `MagONE` tinyint NOT NULL,
  `Retourneer_min` tinyint NOT NULL,
  `Retourneer_max` tinyint NOT NULL,
  `Email_ebook` tinyint NOT NULL,
  `Automatisch_rapporteren` tinyint NOT NULL,
  `Rapportageviacb` tinyint NOT NULL,
  `Uitgevers_rapportagevanaf` tinyint NOT NULL,
  `Uitgevers_levertijd` tinyint NOT NULL,
  `Email_abo_bestellen` tinyint NOT NULL,
  `Email_abo_reclameren` tinyint NOT NULL,
  `Abo_aanhef` tinyint NOT NULL,
  `Abo_afsluiting` tinyint NOT NULL,
  `Abo_korting` tinyint NOT NULL,
  `Abo_klantnummer_mainpress` tinyint NOT NULL,
  `_Value` tinyint NOT NULL,
  `_Description` tinyint NOT NULL,
  `rubriek` tinyint NOT NULL,
  `rubriekman` tinyint NOT NULL,
  `rubriekcom` tinyint NOT NULL,
  `rubriekjur` tinyint NOT NULL,
  `rubriekalg` tinyint NOT NULL,
  `website` tinyint NOT NULL,
  `NUR` tinyint NOT NULL,
  `extra_check` tinyint NOT NULL,
  `plts` tinyint NOT NULL,
  `level_0` tinyint NOT NULL,
  `level_1` tinyint NOT NULL,
  `level_2` tinyint NOT NULL,
  `level_3` tinyint NOT NULL,
  `level_4` tinyint NOT NULL,
  `level_5` tinyint NOT NULL,
  `level_6` tinyint NOT NULL,
  `in_feed` tinyint NOT NULL,
  `ranking` tinyint NOT NULL,
  `JuridicaCode` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `NielsenBestelpunten`
--

CREATE TABLE `NielsenBestelpunten` (
  `NaamUitgever` varchar(255) NOT NULL COMMENT 'Nielsen uitgevernaam',
  `UitgeverId` int(11) DEFAULT NULL,
  PRIMARY KEY (`NaamUitgever`),
  KEY `UitgeverId` (`UitgeverId`),
  CONSTRAINT `NielsenBestelpunten_ibfk_1` FOREIGN KEY (`UitgeverId`) REFERENCES `Manpo`.`Uitgevers` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `NielsenBindwijze`
--

CREATE TABLE `NielsenBindwijze` (
  `NielsenBindwijze` char(2) NOT NULL,
  PRIMARY KEY (`NielsenBindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `NielsenRubrieken`
--

CREATE TABLE `NielsenRubrieken` (
  `NielsenRubriek` varchar(255) NOT NULL,
  PRIMARY KEY (`NielsenRubriek`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping routines for database 'Feed_Nielsen'
--

--
-- Current Database: `Feeds`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Feeds` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Feeds`;

--
-- Temporary table structure for view `BIC1_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `BIC1_gefilterd`*/;
/*!50001 CREATE TABLE `BIC1_gefilterd` (
  `BIC1` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `BIC_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `BIC_gefilterd`*/;
/*!50001 CREATE TABLE `BIC_gefilterd` (
  `BIC` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `BISAC_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `BISAC_gefilterd`*/;
/*!50001 CREATE TABLE `BISAC_gefilterd` (
  `BISAC` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `BestelpuntKoppeling`
--

CREATE TABLE `BestelpuntKoppeling` (
  `FeedUitgever` varchar(255) NOT NULL,
  `UitgeverID` int(11) DEFAULT NULL,
  PRIMARY KEY (`FeedUitgever`),
  KEY `UitgeverID` (`UitgeverID`),
  CONSTRAINT `BestelpuntKoppeling_ibfk_1` FOREIGN KEY (`UitgeverID`) REFERENCES `Manpo`.`Uitgevers` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Bindwijze`
--

CREATE TABLE `Bindwijze` (
  `Bindwijze` char(50) NOT NULL,
  `Btwcode` char(1) NOT NULL DEFAULT '4',
  `Artgroepid` int(11) NOT NULL,
  `Unspsc` char(50) DEFAULT NULL,
  `Productsoort` char(50) DEFAULT NULL,
  `Isgewist` int(11) DEFAULT NULL,
  `Zichtbaar` tinyint(1) NOT NULL DEFAULT '0',
  `BoekStatus` int(11) DEFAULT NULL,
  `Porto` smallint(6) DEFAULT NULL,
  `Evenement` smallint(6) DEFAULT NULL,
  `Download` smallint(6) DEFAULT NULL,
  `Voorraadartikel` smallint(6) DEFAULT NULL,
  `Inpakken` smallint(6) DEFAULT NULL,
  `Ideal` smallint(6) DEFAULT NULL,
  `Socialdrm` smallint(6) DEFAULT NULL,
  `Bindwijze_unspsc` char(50) DEFAULT NULL,
  `Bindwijze_productsoort` char(50) DEFAULT NULL,
  `Bindwijze_porto` smallint(6) DEFAULT NULL,
  `Bindwijze_evenement` smallint(6) DEFAULT NULL,
  `Bindwijze_download` smallint(6) DEFAULT NULL,
  `Bindwijze_voorraadartikel` smallint(6) DEFAULT NULL,
  `Bindwijze_inpakken` smallint(6) DEFAULT NULL,
  `Bindwijze_ideal` smallint(6) DEFAULT NULL,
  `Bindwijze_socialdrm` smallint(6) DEFAULT NULL,
  `Bindwijze_url` char(50) DEFAULT NULL,
  `Bindwijze_producttype` char(100) DEFAULT NULL,
  `Bindwijze_lidwoord` char(20) DEFAULT NULL,
  `Bindwijze_enkelvoud` char(100) DEFAULT NULL,
  `Bindwijze_meervoud` char(100) DEFAULT NULL,
  `Bindwijze_grootboekrekening` int(11) DEFAULT NULL,
  `Bindwijze_vertaling` char(50) DEFAULT NULL,
  `Bindwijze_leesid` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `BoekAuteurs`
--

CREATE TABLE `BoekAuteurs` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `AuteurPositie` int(11) NOT NULL DEFAULT '0',
  `AuteurVolledigenaam` varchar(255) NOT NULL,
  `AuteurVoornaam` varchar(255) DEFAULT NULL,
  `AuteurTussenvoegsels` varchar(255) DEFAULT NULL,
  `AuteurAchternaam` varchar(255) DEFAULT NULL,
  `AuteurBio` text,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ean`,`FeedCode`,`AuteurPositie`,`AuteurVolledigenaam`),
  UNIQUE KEY `Ean` (`Ean`,`AuteurVolledigenaam`),
  KEY `AuteurVolledigenaam` (`AuteurVolledigenaam`,`Ean`,`AuteurPositie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `BoekAuteursGardners`
--

CREATE TABLE `BoekAuteursGardners` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `AuteurPositie` int(11) NOT NULL DEFAULT '0',
  `AuteurVolledigenaam` varchar(255) NOT NULL,
  `AuteurVoornaam` varchar(255) DEFAULT NULL,
  `AuteurTussenvoegsels` varchar(255) DEFAULT NULL,
  `AuteurAchternaam` varchar(255) DEFAULT NULL,
  `AuteurBio` text,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`,`AuteurPositie`,`AuteurVolledigenaam`),
  UNIQUE KEY `Ean` (`Ean`,`AuteurVolledigenaam`),
  KEY `AuteurVolledigenaam` (`AuteurVolledigenaam`,`Ean`,`AuteurPositie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `BoekFeedcodes`
--

CREATE TABLE `BoekFeedcodes` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(100) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekInkoopFeed`
--

CREATE TABLE `BoekInkoopFeed` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(8) DEFAULT NULL,
  `Valuta` char(4) DEFAULT NULL,
  `Listprice` decimal(7,2) DEFAULT NULL,
  `VasteEuroPrijs` decimal(7,2) DEFAULT NULL,
  `AanbiedingsEuroPrijs` decimal(7,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(7,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(7,2) DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Discountcode` char(20) DEFAULT NULL,
  `Levertijd` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekRubrieken`
--

CREATE TABLE `BoekRubrieken` (
  `Ean` char(13) NOT NULL,
  `Website` enum('Managementboek','Computerboek','Juridischboek','Comcol') NOT NULL,
  `Volgorde` int(11) unsigned NOT NULL,
  `Rubriek` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Ean`,`Website`,`Volgorde`),
  KEY `Website` (`Website`,`Rubriek`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekRubrieken2`
--

CREATE TABLE `BoekRubrieken2` (
  `Ean` char(13) NOT NULL,
  `RubriekType` char(5) NOT NULL,
  `RubriekCode` varchar(100) NOT NULL,
  `rubriekalg` varchar(100) DEFAULT NULL,
  `rubriekcom` varchar(100) DEFAULT NULL,
  `rubriekjur` varchar(100) DEFAULT NULL,
  `rubriekman` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`Ean`,`RubriekType`,`RubriekCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Boek_Rubrieken_plat`
--

CREATE TABLE `Boek_Rubrieken_plat` (
  `Ean` char(13) NOT NULL,
  `Rubriek` varchar(255) DEFAULT NULL,
  `RubriekMan` varchar(255) DEFAULT NULL,
  `RubriekCom` varchar(255) DEFAULT NULL,
  `RubriekJur` varchar(255) DEFAULT NULL,
  `RubriekAlg` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Temporary table structure for view `Boek_met_auteur`
--

/*!50001 DROP VIEW IF EXISTS `Boek_met_auteur`*/;
/*!50001 CREATE TABLE `Boek_met_auteur` (
  `FeedCode` tinyint NOT NULL,
  `Ean` tinyint NOT NULL,
  `NaamUitgever` tinyint NOT NULL,
  `Imprint` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `UitgeverFeedId` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `ReeksnummerTxt` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `onixbindwijze` tinyint NOT NULL,
  `InclusiefProdukt` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Abstract` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `Uitverkochtdatum` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatusTxt` tinyint NOT NULL,
  `ProductAvailabilityTxt` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `ebook` tinyint NOT NULL,
  `eanebook` tinyint NOT NULL,
  `InkoopKorting` tinyint NOT NULL,
  `CoverURL` tinyint NOT NULL,
  `BackcoverURL` tinyint NOT NULL,
  `PDFURL` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `InAssortiment` tinyint NOT NULL,
  `BestandsGrootte` tinyint NOT NULL,
  `TIMESTAMP` tinyint NOT NULL,
  `Auteur` tinyint NOT NULL,
  `AuteurVoornaam` tinyint NOT NULL,
  `AuteurTussenvoegsels` tinyint NOT NULL,
  `AuteurAchternaam` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Boekbic`
--

CREATE TABLE `Boekbic` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BIC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Ean`,`FeedCode`,`BIC`,`id`),
  UNIQUE KEY `FeedCode` (`Ean`,`FeedCode`,`BIC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`,`FeedCode`),
  KEY `BIC` (`BIC`)
) ENGINE=InnoDB AUTO_INCREMENT=132571589 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Boekbicgardners`
--

CREATE TABLE `Boekbicgardners` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BIC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`FeedCode`,`Ean`,`BIC`,`id`),
  UNIQUE KEY `FeedCode` (`FeedCode`,`Ean`,`BIC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`,`FeedCode`),
  KEY `BIC` (`BIC`)
) ENGINE=InnoDB AUTO_INCREMENT=23002267 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Boekbisac`
--

CREATE TABLE `Boekbisac` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BISAC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Ean`,`FeedCode`,`BISAC`,`id`),
  KEY `BISAC` (`BISAC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB AUTO_INCREMENT=52519485 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Boekbreadcrumb`
--

CREATE TABLE `Boekbreadcrumb` (
  `Ean` char(13) NOT NULL,
  `CrumbPosition` int(11) NOT NULL,
  `CrumbName` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`Ean`,`CrumbPosition`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Boeken`
--

CREATE TABLE `Boeken` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(150) DEFAULT NULL,
  `CommercieleImprint` varchar(150) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL DEFAULT 'paperback' COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL DEFAULT '',
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(20) DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `CBstatus` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `PublishingStatus` tinyint(2) DEFAULT '0' COMMENT 'Zie ONIX',
  `ProductAvailability` char(3) DEFAULT NULL,
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) DEFAULT NULL,
  `eanebook` char(13) DEFAULT NULL,
  `InkoopKorting` tinyint(4) DEFAULT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ean`,`FeedCode`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `BoekenInSiteView`
--

CREATE TABLE `BoekenInSiteView` (
  `Ean` char(13) NOT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Boeken_gardners`
--

CREATE TABLE `Boeken_gardners` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(50) DEFAULT NULL,
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL,
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(2) DEFAULT 'EN',
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `CBstatus` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `PublishingStatus` tinyint(2) DEFAULT '0' COMMENT 'Zie ONIX',
  `ProductAvailability` char(3) DEFAULT NULL COMMENT 'Zie ONIX',
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) NOT NULL,
  `eanebook` char(13) NOT NULL,
  `InkoopKorting` tinyint(4) NOT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`),
  CONSTRAINT `Boeken_gardners_ibfk_1` FOREIGN KEY (`FeedCode`) REFERENCES `Feeds` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Temporary table structure for view `Boeken_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `Boeken_gefilterd`*/;
/*!50001 CREATE TABLE `Boeken_gefilterd` (
  `Ean` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Cover` tinyint NOT NULL,
  `Backcover` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `RubriekMan` tinyint NOT NULL,
  `RubriekCom` tinyint NOT NULL,
  `RubriekJur` tinyint NOT NULL,
  `RubriekAlg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Boeken_gefilterd_table`
--

CREATE TABLE `Boeken_gefilterd_table` (
  `Ean` char(13) NOT NULL,
  `Uitgever` varchar(50) DEFAULT NULL,
  `UitgeverID` int(11) DEFAULT NULL,
  `Enanderen` smallint(6) NOT NULL DEFAULT '0',
  `Titel` varchar(255) NOT NULL DEFAULT '',
  `Ondertitel` varchar(255) DEFAULT NULL,
  `Naamserie` varchar(255) DEFAULT NULL,
  `Titelserie` varchar(255) DEFAULT NULL,
  `Reeksnummer` int(11) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL,
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(10) DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `ProductAvailability` char(3) DEFAULT NULL,
  `PublishingStatus` char(3) DEFAULT NULL,
  `CBstatus` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL,
  `KortingMP` decimal(5,2) NOT NULL,
  `Boekstatus` int(11) NOT NULL DEFAULT '1',
  `Cover` varchar(255) DEFAULT NULL,
  `Backcover` varchar(255) DEFAULT NULL,
  `PDF` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `Aanbiedingvanaf` date NOT NULL,
  `Aanbiedingtotenmet` date NOT NULL,
  `IsAanbieding` tinyint(4) DEFAULT NULL,
  `HuidigeEuroPrijs` decimal(6,2) DEFAULT NULL,
  `jaaruitgifte` int(4) DEFAULT NULL,
  `VastePrijs` decimal(6,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(6,2) DEFAULT NULL,
  `FeedCode` char(8) NOT NULL,
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `Rubriek` varchar(255) DEFAULT NULL,
  `Rubriekman` varchar(255) DEFAULT NULL,
  `Rubriekcom` varchar(255) DEFAULT NULL,
  `Rubriekjur` varchar(255) DEFAULT NULL,
  `Rubriekalg` varchar(255) DEFAULT NULL,
  UNIQUE KEY `i1` (`Ean`),
  KEY `i2` (`Uitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `NewIndex1` (`Bindwijze`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverID`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  CONSTRAINT `Boeken_gefilterd_table_ibfk_1` FOREIGN KEY (`UitgeverID`) REFERENCES `Manpo`.`Uitgevers` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Boeken_ips`
--

CREATE TABLE `Boeken_ips` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(50) DEFAULT NULL,
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL,
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(2) DEFAULT 'EN',
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `PublishingStatus` tinyint(2) DEFAULT NULL COMMENT 'Zie ONIX',
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailability` char(3) DEFAULT NULL COMMENT 'Zie ONIX',
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) NOT NULL,
  `eanebook` char(13) NOT NULL,
  `InkoopKorting` tinyint(4) NOT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CBstatus` varchar(50) DEFAULT NULL,
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Boeknur`
--

CREATE TABLE `Boeknur` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `NUR` char(3) NOT NULL,
  PRIMARY KEY (`Ean`,`FeedCode`,`NUR`),
  KEY `NUR` (`NUR`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Boekstatus`
--

CREATE TABLE `Boekstatus` (
  `PublishingStatus` tinyint(4) NOT NULL,
  `PublishingStatusTxt` char(50) DEFAULT NULL,
  `ProductAvailability` char(3) NOT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Boekstatus` tinyint(2) NOT NULL,
  `CBstatus` varchar(50) DEFAULT NULL,
  `levertijd` tinyint(2) NOT NULL DEFAULT '0',
  `hoeveel` int(11) DEFAULT '0',
  `cengage` tinyint(2) DEFAULT '0',
  `elsevier` tinyint(2) DEFAULT '0',
  `gardners` tinyint(2) DEFAULT '0',
  `mcgraw` tinyint(2) DEFAULT '0',
  `packt` tinyint(2) DEFAULT '0',
  `pearson` tinyint(2) DEFAULT '0',
  `springer` tinyint(2) DEFAULT '0',
  `tandf` tinyint(2) DEFAULT '0',
  `wiley` tinyint(2) DEFAULT '0',
  PRIMARY KEY (`PublishingStatus`,`ProductAvailability`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `ComColBoekenInfo`
--

/*!50001 DROP VIEW IF EXISTS `ComColBoekenInfo`*/;
/*!50001 CREATE TABLE `ComColBoekenInfo` (
  `Ean` tinyint NOT NULL,
  `titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `prijs` tinyint NOT NULL,
  `europrijs` tinyint NOT NULL,
  `abstract` tinyint NOT NULL,
  `samenvatting` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `NaamUitgever` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `isaanbieding` tinyint NOT NULL,
  `huidigeeuroprijs` tinyint NOT NULL,
  `aanbiedingvanaf` tinyint NOT NULL,
  `aanbiedingtotenmet` tinyint NOT NULL,
  `auteurs` tinyint NOT NULL,
  `boekstatus` tinyint NOT NULL,
  `bindwijze` tinyint NOT NULL,
  `image_url` tinyint NOT NULL,
  `publicatiedatum` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `uitgeverid` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `Magazijnlocatienummer` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `ComColTitels`
--

/*!50001 DROP VIEW IF EXISTS `ComColTitels`*/;
/*!50001 CREATE TABLE `ComColTitels` (
  `Code` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Auteur` tinyint NOT NULL,
  `Prijs` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `ActiePrijs` tinyint NOT NULL,
  `BriefCode` tinyint NOT NULL,
  `BackorderCode` tinyint NOT NULL,
  `ExactArtikel` tinyint NOT NULL,
  `BTWCode` tinyint NOT NULL,
  `ArtikelGroep` tinyint NOT NULL,
  `BoekSoort` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Magazijnsoort` tinyint NOT NULL,
  `Magazijnlocatienummer` tinyint NOT NULL,
  `NietInpakken` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `ComColURLs`
--

CREATE TABLE `ComColURLs` (
  `URL` varchar(255) NOT NULL,
  `Ean` char(13) DEFAULT NULL,
  PRIMARY KEY (`URL`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `ComColVoorraad`
--

CREATE TABLE `ComColVoorraad` (
  `EAN` char(13) NOT NULL DEFAULT '',
  `Voorraad` int(11) NOT NULL DEFAULT '0',
  `InManpo` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EAN`),
  KEY `InManpo` (`InManpo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `ComColZonderBestelpunt`
--

/*!50001 DROP VIEW IF EXISTS `ComColZonderBestelpunt`*/;
/*!50001 CREATE TABLE `ComColZonderBestelpunt` (
  `Ean` tinyint NOT NULL,
  `titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Prijs` tinyint NOT NULL,
  `EuroPrijs` tinyint NOT NULL,
  `abstract` tinyint NOT NULL,
  `samenvatting` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `NaamUitgever` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `isaanbieding` tinyint NOT NULL,
  `huidigeeuroprijs` tinyint NOT NULL,
  `aanbiedingvanaf` tinyint NOT NULL,
  `aanbiedingtotenmet` tinyint NOT NULL,
  `auteurs` tinyint NOT NULL,
  `boekstatus` tinyint NOT NULL,
  `bindwijze` tinyint NOT NULL,
  `image_url` tinyint NOT NULL,
  `publicatiedatum` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `uitgeverid` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `ComCol_Uitgevers`
--

/*!50001 DROP VIEW IF EXISTS `ComCol_Uitgevers`*/;
/*!50001 CREATE TABLE `ComCol_Uitgevers` (
  `NaamUitgever` tinyint NOT NULL,
  `Aantal` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Count_boeken_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `Count_boeken_gefilterd`*/;
/*!50001 CREATE TABLE `Count_boeken_gefilterd` (
  `Aantal` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `DagPrijzen`
--

CREATE TABLE `DagPrijzen` (
  `Ean` char(13) NOT NULL,
  `FeedCode` char(8) NOT NULL,
  `VastePrijs` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `InkoopPrijs` decimal(8,2) DEFAULT NULL,
  `Listprice` decimal(8,2) DEFAULT NULL,
  `Valuta` char(5) DEFAULT NULL,
  `kortingscode` char(12) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `DagPrijzen2`
--

CREATE TABLE `DagPrijzen2` (
  `Ean` char(13) NOT NULL,
  `FeedCode` char(8) NOT NULL,
  `VastePrijs` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `InkoopPrijs` decimal(8,2) DEFAULT NULL,
  `Listprice` decimal(8,2) DEFAULT NULL,
  `Valuta` char(5) DEFAULT NULL,
  `kortingscode` char(12) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `DagPrijzenExtended`
--

CREATE TABLE `DagPrijzenExtended` (
  `Ean` char(13) NOT NULL,
  `FeedCode_Verkoop` char(8) NOT NULL,
  `VastePrijs_Verkoop` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw_Verkoop` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs_Verkoop` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw_Verkoop` decimal(6,2) DEFAULT NULL,
  `Listprice_Verkoop` decimal(8,2) DEFAULT NULL,
  `Valuta_Verkoop` char(5) DEFAULT NULL,
  `Discountcode_Verkoop` char(12) DEFAULT NULL,
  `Discount_Verkoop` decimal(8,2) DEFAULT NULL,
  `InkoopPrijsEx_Verkoop` decimal(8,2) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus_Verkoop` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  `Boekstatus_Inkoop` tinyint(4) DEFAULT NULL,
  `FeedCode_Inkoop` char(8) DEFAULT NULL,
  `Listprice_Inkoop` decimal(8,2) DEFAULT NULL,
  `Discountcode_Inkoop` char(12) DEFAULT NULL,
  `Valuta_Inkoop` char(4) DEFAULT NULL,
  `Discount_Inkoop` decimal(5,2) DEFAULT NULL,
  `Wisselkoers_Inkoop` decimal(8,2) DEFAULT NULL,
  `Calculate_plus_Inkoop` decimal(8,2) DEFAULT NULL,
  `Calculate_times_Inkoop` decimal(8,2) DEFAULT NULL,
  `VastePrijs_Inkoop` decimal(8,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(8,2) DEFAULT NULL,
  `Manpo_Bestelpunt` int(11) DEFAULT NULL,
  `Manpo_KortingMP` decimal(5,2) DEFAULT NULL,
  `Manpo_InkoopPrijs` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode_Verkoop`),
  KEY `FeedCode_Inkoop` (`FeedCode_Inkoop`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `DagPrijzenFake`
--

CREATE TABLE `DagPrijzenFake` (
  `Ean` char(13) NOT NULL,
  `FeedCode` char(8) NOT NULL,
  `VastePrijs` decimal(6,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `InkoopPrijs` decimal(6,2) DEFAULT NULL,
  `IsAanbieding` tinyint(4) NOT NULL DEFAULT '0',
  `Aanbiedingvanaf` date NOT NULL,
  `Aanbiedingtotenmet` date NOT NULL,
  `BTWCode` char(1) NOT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Levertijd` int(11) NOT NULL DEFAULT '5',
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Temporary table structure for view `DagPrijzenFakeView`
--

/*!50001 DROP VIEW IF EXISTS `DagPrijzenFakeView`*/;
/*!50001 CREATE TABLE `DagPrijzenFakeView` (
  `Ean` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `PrijsExBtw` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `InkoopPrijs` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `BTWCode` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `DagPrijzen_test`
--

CREATE TABLE `DagPrijzen_test` (
  `Ean` char(13) NOT NULL,
  `FeedCode` char(8) NOT NULL,
  `VastePrijs` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `InkoopPrijs` decimal(8,2) DEFAULT NULL,
  `Listprice` decimal(8,2) DEFAULT NULL,
  `Valuta` char(5) DEFAULT NULL,
  `discountcode` char(30) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `DailyCurrency`
--

CREATE TABLE `DailyCurrency` (
  `USD` double NOT NULL,
  `GBP` double NOT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  KEY `ID` (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `DiscountMatrix`
--

CREATE TABLE `DiscountMatrix` (
  `discountcode` char(10) NOT NULL,
  `feedcode` varchar(8) NOT NULL,
  `valuta` varchar(20) NOT NULL,
  `original_valuta` varchar(20) DEFAULT NULL,
  `currencytoday` decimal(10,4) DEFAULT NULL,
  `product_discount_code` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `discount` decimal(5,2) DEFAULT NULL,
  `calculate_plus` decimal(10,4) DEFAULT NULL,
  `calculate_times` decimal(10,4) DEFAULT NULL,
  `vereist_rendement` decimal(5,2) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `currency_corrected` decimal(10,4) AS ( (ROUND( (1/currencytoday) ,3 ))) VIRTUAL,
  `geen_feed_update` tinyint(4) NOT NULL DEFAULT '0',
  `discountprioriteit` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`discountcode`,`feedcode`,`valuta`),
  KEY `valuta` (`valuta`),
  KEY `discountcode` (`discountcode`,`feedcode`,`original_valuta`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- Table structure for table `DiscountMatrix2`
--

CREATE TABLE `DiscountMatrix2` (
  `discountcode` char(10) NOT NULL,
  `feedcode` varchar(8) NOT NULL,
  `valuta` varchar(255) DEFAULT NULL,
  `original_valuta` varchar(255) DEFAULT NULL,
  `currencytoday` decimal(10,4) DEFAULT NULL,
  `product_discount_code` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `discount` decimal(4,1) DEFAULT NULL,
  `calculate_plus` decimal(10,4) DEFAULT NULL,
  `calculate_times` decimal(10,4) DEFAULT NULL,
  `vereist_rendement` decimal(5,2) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `currency_corrected` decimal(10,4) AS ( (ROUND( (1/currencytoday) ,3 ))) VIRTUAL,
  PRIMARY KEY (`discountcode`,`feedcode`),
  KEY `valuta` (`valuta`(191)),
  KEY `discountcode` (`discountcode`,`feedcode`,`original_valuta`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Eans_Gefilterd`
--

CREATE TABLE `Eans_Gefilterd` (
  `Ean` char(13) NOT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `ExactArtikelen`
--

/*!50001 DROP VIEW IF EXISTS `ExactArtikelen`*/;
/*!50001 CREATE TABLE `ExactArtikelen` (
  `Ean` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Achternaam` tinyint NOT NULL,
  `Prijs` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `ActiePrijs` tinyint NOT NULL,
  `BriefCode` tinyint NOT NULL,
  `BackorderCode` tinyint NOT NULL,
  `ExactArtikel` tinyint NOT NULL,
  `BTWCode` tinyint NOT NULL,
  `ArtikelGroep` tinyint NOT NULL,
  `Boeksoort` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `MagazijnSoort` tinyint NOT NULL,
  `Magazijnlocatienummer` tinyint NOT NULL,
  `NietInpakken` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `FAIL_Boeken_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `FAIL_Boeken_gefilterd`*/;
/*!50001 CREATE TABLE `FAIL_Boeken_gefilterd` (
  `Ean` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Cover` tinyint NOT NULL,
  `Backcover` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `FeedPrio`
--

CREATE TABLE `FeedPrio` (
  `Feedcode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `FeedPrio` int(1) NOT NULL,
  `VerkoopPrio` int(11) DEFAULT NULL,
  PRIMARY KEY (`Feedcode`),
  UNIQUE KEY `FeedPrio` (`FeedPrio`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Feed_Gardners_Boeken`
--

CREATE TABLE `Feed_Gardners_Boeken` (
  `Ean` char(13) NOT NULL,
  `titel` varchar(255) DEFAULT NULL,
  `ondertitel` varchar(255) DEFAULT NULL,
  `prijs` decimal(6,2) DEFAULT NULL,
  `titelserie` varchar(255) DEFAULT NULL,
  `reeksnummer` varchar(255) DEFAULT NULL,
  `samenvatting` mediumtext,
  `inhoudsopgave` mediumtext,
  `onixbindwijze` varchar(255) DEFAULT NULL,
  `aantalblz` varchar(255) DEFAULT NULL,
  `auteur1` varchar(255) DEFAULT NULL,
  `auteur2` varchar(255) DEFAULT NULL,
  `auteur3` varchar(255) DEFAULT NULL,
  `biccode` varchar(255) DEFAULT NULL,
  `taalvermelding` varchar(255) DEFAULT NULL,
  `naamuitgever` varchar(255) DEFAULT NULL,
  `herdrukdatum` varchar(255) DEFAULT NULL,
  `verschijningsdatum` varchar(255) DEFAULT NULL,
  `publishingstatus` varchar(20) DEFAULT NULL,
  `productavailability` varchar(20) DEFAULT NULL,
  `fysiek_boek` char(13) DEFAULT NULL,
  `eanebook` char(13) DEFAULT NULL,
  `vervangt` char(13) DEFAULT NULL,
  `vervangen_door` char(13) DEFAULT NULL,
  `ebook` char(13) DEFAULT NULL,
  `hoogte` int(11) DEFAULT NULL,
  `breedte` int(11) DEFAULT NULL,
  `dikte` int(11) DEFAULT NULL,
  `gewicht` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED COMMENT='bla';

--
-- Table structure for table `Feed_Gardners_Boeken_Tmp`
--

CREATE TABLE `Feed_Gardners_Boeken_Tmp` (
  `Ean` char(13) NOT NULL,
  `titel` varchar(255) DEFAULT NULL,
  `ondertitel` varchar(255) DEFAULT NULL,
  `prijs` decimal(6,2) DEFAULT NULL,
  `titelserie` varchar(255) DEFAULT NULL,
  `reeksnummer` varchar(255) DEFAULT NULL,
  `samenvatting` mediumtext,
  `inhoudsopgave` mediumtext,
  `onixbindwijze` varchar(255) DEFAULT NULL,
  `aantalblz` varchar(255) DEFAULT NULL,
  `auteur1` varchar(255) DEFAULT NULL,
  `auteur2` varchar(255) DEFAULT NULL,
  `auteur3` varchar(255) DEFAULT NULL,
  `biccode` varchar(255) DEFAULT NULL,
  `taalvermelding` varchar(255) DEFAULT NULL,
  `naamuitgever` varchar(255) DEFAULT NULL,
  `herdrukdatum` varchar(255) DEFAULT NULL,
  `verschijningsdatum` varchar(255) DEFAULT NULL,
  `publishingstatus` varchar(20) DEFAULT NULL,
  `productavailability` varchar(20) DEFAULT NULL,
  `fysiek_boek` char(13) DEFAULT NULL,
  `eanebook` char(13) DEFAULT NULL,
  `vervangt` char(13) DEFAULT NULL,
  `vervangen_door` char(13) DEFAULT NULL,
  `ebook` char(13) DEFAULT NULL,
  `hoogte` int(11) DEFAULT NULL,
  `breedte` int(11) DEFAULT NULL,
  `dikte` int(11) DEFAULT NULL,
  `gewicht` int(11) DEFAULT NULL,
  `DTImport` datetime DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Feeds`
--

CREATE TABLE `Feeds` (
  `FeedCode` char(8) NOT NULL,
  `FeedNaam` varchar(255) DEFAULT NULL,
  `FeedURL` varchar(255) DEFAULT NULL,
  `FeedLogin` varchar(255) DEFAULT NULL,
  `FeedPassword` varchar(255) DEFAULT NULL,
  `ContactNaam` varchar(255) DEFAULT NULL,
  `ContactEmail` varchar(255) DEFAULT NULL,
  `Commentaar` varchar(255) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `BestelpuntId` int(11) DEFAULT NULL,
  `ToonInManpo` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`FeedCode`),
  KEY `BestelpuntId` (`BestelpuntId`),
  CONSTRAINT `Feeds_ibfk_1` FOREIGN KEY (`BestelpuntId`) REFERENCES `Manpo`.`Uitgevers` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Gardners_Availability`
--

CREATE TABLE `Gardners_Availability` (
  `Ean` char(13) NOT NULL,
  `Availability` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Gardners_Pricing`
--

CREATE TABLE `Gardners_Pricing` (
  `ISBN` char(10) DEFAULT NULL,
  `EAN` char(13) NOT NULL,
  `Price1` decimal(7,2) DEFAULT NULL,
  `KortingPercentage` decimal(7,2) DEFAULT NULL,
  `PricingCode` int(4) DEFAULT NULL,
  `PricingCode2` char(3) DEFAULT NULL,
  `CDATE` char(10) DEFAULT NULL,
  `DTWijziging` datetime NOT NULL,
  PRIMARY KEY (`EAN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `GewijzigdeVelden`
--

CREATE TABLE `GewijzigdeVelden` (
  `EAN` char(13) NOT NULL,
  `Veldnaam` char(40) NOT NULL,
  `Feed` enum('CB') CHARACTER SET ascii NOT NULL DEFAULT 'CB',
  `DT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`EAN`,`Veldnaam`,`Feed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Levertijd`
--

CREATE TABLE `Levertijd` (
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `Levertijd` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `LookUpTableBindwijze`
--

CREATE TABLE `LookUpTableBindwijze` (
  `ONIXCode` varchar(3) NOT NULL,
  `ManpoBindwijze` varchar(255) DEFAULT NULL,
  `BindwijzeEngels` varchar(255) DEFAULT NULL,
  `beschrijving` mediumtext,
  PRIMARY KEY (`ONIXCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `LookupTableBindwijzeGardners`
--

CREATE TABLE `LookupTableBindwijzeGardners` (
  `gardnersbindwijze` varchar(50) NOT NULL,
  `manpobindwijze` varchar(50) NOT NULL,
  `count(bindwijze)` bigint(21) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `NUR`
--

CREATE TABLE `NUR` (
  `Nur` decimal(3,0) NOT NULL,
  `NUROmschrijving` varchar(255) DEFAULT NULL,
  `Rubriek` varchar(255) DEFAULT NULL,
  `NURtonen` tinyint(1) NOT NULL DEFAULT '1',
  `NURverlanglijst` tinyint(1) NOT NULL DEFAULT '0',
  `NURadwords` tinyint(4) NOT NULL DEFAULT '0',
  `NURcomcol` tinyint(1) NOT NULL DEFAULT '0',
  `Telling` int(11) DEFAULT NULL,
  `rubriekman` varchar(255) NOT NULL,
  `rubriekcom` varchar(255) NOT NULL,
  `rubriekjur` varchar(255) NOT NULL,
  `rubriekalg` varchar(255) NOT NULL,
  PRIMARY KEY (`Nur`),
  KEY `NURtonen` (`NURtonen`),
  KEY `NURverlanglijst` (`NURverlanglijst`),
  KEY `NURadwords` (`NURadwords`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Temporary table structure for view `NUR_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `NUR_gefilterd`*/;
/*!50001 CREATE TABLE `NUR_gefilterd` (
  `NUR` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `NURtoRubriek`
--

CREATE TABLE `NURtoRubriek` (
  `Nur` decimal(3,0) NOT NULL,
  `NUROmschrijving` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `Rubriek_diversen` varchar(255) DEFAULT NULL,
  `Rubriek_website` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Nur`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `New_DiscountMatrix`
--

CREATE TABLE `New_DiscountMatrix` (
  `discountcode` char(10) NOT NULL,
  `feedcode` varchar(8) NOT NULL,
  `valuta` varchar(255) DEFAULT NULL,
  `original_valuta` varchar(255) DEFAULT NULL,
  `currencytoday` decimal(10,4) DEFAULT NULL,
  `product_discount_code` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `discount` decimal(4,1) DEFAULT NULL,
  `calculate_plus` decimal(10,4) DEFAULT NULL,
  `calculate_times` decimal(10,4) DEFAULT NULL,
  `vereist_rendement` decimal(5,2) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `currency_corrected` decimal(10,4) AS ( (ROUND( (1/currencytoday) ,3 ))) VIRTUAL,
  PRIMARY KEY (`discountcode`,`feedcode`),
  KEY `valuta` (`valuta`(191)),
  KEY `discountcode` (`discountcode`,`feedcode`,`original_valuta`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT;

--
-- Table structure for table `New_VerkoopPrijzen`
--

CREATE TABLE `New_VerkoopPrijzen` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(8) DEFAULT NULL,
  `Valuta` char(4) DEFAULT NULL,
  `Listprice` decimal(7,2) DEFAULT NULL,
  `VasteEuroPrijs` decimal(7,2) DEFAULT NULL,
  `AanbiedingsEuroPrijs` decimal(7,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(7,2) DEFAULT NULL,
  `InkoopPrijs` decimal(7,2) DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `NieuweComColBoeken`
--

/*!50001 DROP VIEW IF EXISTS `NieuweComColBoeken`*/;
/*!50001 CREATE TABLE `NieuweComColBoeken` (
  `Ean` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `OLD_View_boeken_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `OLD_View_boeken_gefilterd`*/;
/*!50001 CREATE TABLE `OLD_View_boeken_gefilterd` (
  `Ean` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Cover` tinyint NOT NULL,
  `Backcover` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `ONIX2Availability`
--

CREATE TABLE `ONIX2Availability` (
  `AvailabilityCode` char(2) NOT NULL,
  `AvailabilityText` varchar(255) DEFAULT NULL,
  `Leverbaar` tinyint(4) DEFAULT NULL,
  `BoekStatus` tinyint(4) DEFAULT NULL,
  `PublishingStatus` tinyint(2) DEFAULT NULL,
  `ProductAvailability` tinyint(2) DEFAULT NULL,
  PRIMARY KEY (`AvailabilityCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `ONIX2ProductForm`
--

CREATE TABLE `ONIX2ProductForm` (
  `ProductForm` char(2) NOT NULL,
  `ProductFormDescription` varchar(255) DEFAULT NULL,
  `Bindwijze` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ProductForm`),
  KEY `Bindwijze` (`Bindwijze`),
  CONSTRAINT `ONIX2ProductForm_ibfk_1` FOREIGN KEY (`Bindwijze`) REFERENCES `Manpo`.`Bindwijze` (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `ONIXPublishingStatus`
--

CREATE TABLE `ONIXPublishingStatus` (
  `PUBSC` char(2) NOT NULL,
  `Boekstatus` int(11) DEFAULT NULL,
  PRIMARY KEY (`PUBSC`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Old_BoekAuteurs`
--

CREATE TABLE `Old_BoekAuteurs` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `AuteurPositie` int(11) NOT NULL DEFAULT '0',
  `AuteurVolledigenaam` varchar(255) NOT NULL,
  `AuteurVoornaam` varchar(255) DEFAULT NULL,
  `AuteurTussenvoegsels` varchar(255) DEFAULT NULL,
  `AuteurAchternaam` varchar(255) DEFAULT NULL,
  `AuteurBio` text,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ean`,`FeedCode`,`AuteurPositie`,`AuteurVolledigenaam`),
  UNIQUE KEY `Ean` (`Ean`,`AuteurVolledigenaam`),
  KEY `AuteurVolledigenaam` (`AuteurVolledigenaam`,`Ean`,`AuteurPositie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_BoekInkoopFeed`
--

CREATE TABLE `Old_BoekInkoopFeed` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(8) DEFAULT NULL,
  `Valuta` char(4) DEFAULT NULL,
  `Listprice` decimal(7,2) DEFAULT NULL,
  `VasteEuroPrijs` decimal(7,2) DEFAULT NULL,
  `AanbiedingsEuroPrijs` decimal(7,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(7,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(7,2) DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Discountcode` char(20) DEFAULT NULL,
  `Levertijd` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Old_Boekbic`
--

CREATE TABLE `Old_Boekbic` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BIC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Ean`,`FeedCode`,`BIC`,`id`),
  UNIQUE KEY `FeedCode` (`Ean`,`FeedCode`,`BIC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`,`FeedCode`),
  KEY `BIC` (`BIC`)
) ENGINE=InnoDB AUTO_INCREMENT=126486299 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_Boekbisac`
--

CREATE TABLE `Old_Boekbisac` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BISAC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`Ean`,`FeedCode`,`BISAC`,`id`),
  KEY `BISAC` (`BISAC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB AUTO_INCREMENT=50613957 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_Boeken`
--

CREATE TABLE `Old_Boeken` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(150) DEFAULT NULL,
  `CommercieleImprint` varchar(150) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL DEFAULT 'paperback' COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL DEFAULT '',
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(20) DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `CBstatus` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `PublishingStatus` tinyint(2) DEFAULT '0' COMMENT 'Zie ONIX',
  `ProductAvailability` char(3) DEFAULT NULL,
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) DEFAULT NULL,
  `eanebook` char(13) DEFAULT NULL,
  `InkoopKorting` tinyint(4) DEFAULT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`Ean`,`FeedCode`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_Boeken2`
--

CREATE TABLE `Old_Boeken2` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(50) DEFAULT NULL,
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL DEFAULT 'paperback' COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL DEFAULT '',
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(2) DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `CBstatus` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `PublishingStatus` tinyint(2) DEFAULT '0' COMMENT 'Zie ONIX',
  `ProductAvailability` char(3) DEFAULT NULL,
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) NOT NULL,
  `eanebook` char(13) NOT NULL,
  `InkoopKorting` tinyint(4) NOT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`),
  CONSTRAINT `_Boeken_ibfk_1` FOREIGN KEY (`FeedCode`) REFERENCES `Feeds` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `Old_Boeknur`
--

CREATE TABLE `Old_Boeknur` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `NUR` char(3) NOT NULL,
  PRIMARY KEY (`Ean`,`FeedCode`,`NUR`),
  KEY `NUR` (`NUR`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Old_DagPrijzen`
--

CREATE TABLE `Old_DagPrijzen` (
  `Ean` char(13) NOT NULL,
  `FeedCode` char(8) NOT NULL,
  `VastePrijs` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw` decimal(6,2) DEFAULT NULL,
  `InkoopPrijs` decimal(8,2) DEFAULT NULL,
  `Listprice` decimal(8,2) DEFAULT NULL,
  `Valuta` char(5) DEFAULT NULL,
  `kortingscode` char(12) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_DagPrijzenExtended`
--

CREATE TABLE `Old_DagPrijzenExtended` (
  `Ean` char(13) NOT NULL,
  `FeedCode_Verkoop` char(8) NOT NULL,
  `VastePrijs_Verkoop` decimal(8,2) DEFAULT NULL,
  `VastePrijsExBtw_Verkoop` decimal(8,2) DEFAULT NULL,
  `KortingMP` decimal(8,2) DEFAULT NULL,
  `AanbiedingsPrijs_Verkoop` decimal(6,2) DEFAULT NULL,
  `AanbiedingsPrijsExBtw_Verkoop` decimal(6,2) DEFAULT NULL,
  `Listprice_Verkoop` decimal(8,2) DEFAULT NULL,
  `Valuta_Verkoop` char(5) DEFAULT NULL,
  `Discountcode_Verkoop` char(12) DEFAULT NULL,
  `Discount_Verkoop` decimal(8,2) DEFAULT NULL,
  `InkoopPrijsEx_Verkoop` decimal(8,2) DEFAULT NULL,
  `IsAanbieding` tinyint(4) DEFAULT '0',
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `BTWCode` char(1) DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL,
  `Boekstatus_Verkoop` tinyint(4) DEFAULT NULL,
  `Levertijd` int(11) DEFAULT '5',
  `BerekendeKortingMP` decimal(8,2) DEFAULT NULL,
  `Boekstatus_Inkoop` tinyint(4) DEFAULT NULL,
  `FeedCode_Inkoop` char(8) DEFAULT NULL,
  `Listprice_Inkoop` decimal(8,2) DEFAULT NULL,
  `Discountcode_Inkoop` char(12) DEFAULT NULL,
  `Valuta_Inkoop` char(4) DEFAULT NULL,
  `Discount_Inkoop` decimal(5,2) DEFAULT NULL,
  `Wisselkoers_Inkoop` decimal(8,2) DEFAULT NULL,
  `Calculate_plus_Inkoop` decimal(8,2) DEFAULT NULL,
  `Calculate_times_Inkoop` decimal(8,2) DEFAULT NULL,
  `VastePrijs_Inkoop` decimal(8,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(8,2) DEFAULT NULL,
  `Manpo_Bestelpunt` int(11) DEFAULT NULL,
  `Manpo_KortingMP` decimal(5,2) DEFAULT NULL,
  `Manpo_InkoopPrijs` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `IsAanbieding` (`IsAanbieding`,`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `FeedCode` (`FeedCode_Verkoop`),
  KEY `FeedCode_Inkoop` (`FeedCode_Inkoop`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_Prijzen`
--

CREATE TABLE `Old_Prijzen` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT '',
  `kortingpercentage` decimal(8,2) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ListPrijs` decimal(8,2) AS (IF( FeedCode IN ( 'cbbest','cbvoor','cbnl','manpo' ), Prijs, PrijsExBtw )) VIRTUAL,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`Ean`,`FeedCode`,`Valuta`),
  KEY `ean` (`Ean`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`),
  KEY `FeedCode` (`Ean`,`FeedCode`)
) ENGINE=InnoDB AUTO_INCREMENT=195892415 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `Old_VerkoopFeed`
--

CREATE TABLE `Old_VerkoopFeed` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(8) DEFAULT NULL,
  `Valuta` char(4) DEFAULT NULL,
  `Listprice` decimal(7,2) DEFAULT NULL,
  `VasteEuroPrijs` decimal(7,2) DEFAULT NULL,
  `AanbiedingsEuroPrijs` decimal(7,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(7,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(7,2) DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Discountcode` char(20) DEFAULT NULL,
  `Discount` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Onix_short_reference`
--

CREATE TABLE `Onix_short_reference` (
  `short` varchar(50) NOT NULL,
  `reference` varchar(50) NOT NULL,
  `onixversion` varchar(50) NOT NULL,
  PRIMARY KEY (`short`,`reference`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Prijzen`
--

CREATE TABLE `Prijzen` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT '',
  `kortingpercentage` decimal(8,2) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ListPrijs` decimal(8,2) AS (IF( FeedCode IN ( 'cbbest','cbvoor','cbnl','manpo' ), Prijs, PrijsExBtw )) VIRTUAL,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`Ean`,`FeedCode`,`Valuta`),
  KEY `ean` (`Ean`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`),
  KEY `FeedCode` (`Ean`,`FeedCode`)
) ENGINE=InnoDB AUTO_INCREMENT=206299068 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;

--
-- Table structure for table `PrijzenHistorie`
--

CREATE TABLE `PrijzenHistorie` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) CHARACTER SET utf8 NOT NULL,
  `Ean` char(13) CHARACTER SET utf8 NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) CHARACTER SET utf8 DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT NULL,
  `kortingpercentage` decimal(8,0) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`FeedCode`,`Ean`,`PrijsVanaf`,`PrijsTot`,`IsAanbieding`,`Valuta`),
  KEY `ean` (`Ean`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Prijzen_gardners`
--

CREATE TABLE `Prijzen_gardners` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) CHARACTER SET utf8 NOT NULL,
  `Ean` char(13) CHARACTER SET utf8 NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) CHARACTER SET utf8 DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT NULL,
  `kortingpercentage` decimal(8,0) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`FeedCode`,`Ean`,`Valuta`),
  KEY `ean` (`Ean`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`),
  KEY `FeedCode` (`FeedCode`,`Ean`)
) ENGINE=InnoDB AUTO_INCREMENT=15856166 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Prijzen_test`
--

CREATE TABLE `Prijzen_test` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) CHARACTER SET utf8 NOT NULL,
  `Ean` char(13) CHARACTER SET utf8 NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) CHARACTER SET utf8 DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT NULL,
  `kortingpercentage` decimal(8,0) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`FeedCode`,`Ean`,`Valuta`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`),
  KEY `FeedCode` (`FeedCode`,`Ean`),
  KEY `ean` (`Ean`,`Valuta`)
) ENGINE=InnoDB AUTO_INCREMENT=10233518 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Table structure for table `Sheet1$`
--

CREATE TABLE `Sheet1$` (
  `_Value` varchar(255) DEFAULT NULL,
  `_Description` varchar(255) DEFAULT NULL,
  `rubriek` varchar(255) DEFAULT NULL,
  `rubriekman` varchar(255) DEFAULT NULL,
  `rubriekcom` varchar(255) DEFAULT NULL,
  `rubriekjur` varchar(255) DEFAULT NULL,
  `rubriekalg` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `NUR` varchar(255) DEFAULT NULL,
  `extra_check` varchar(255) DEFAULT NULL,
  `plts` varchar(255) DEFAULT NULL,
  `level_0` varchar(255) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `in_feed` varchar(255) DEFAULT NULL,
  `ranking` varchar(255) DEFAULT NULL,
  `JuridicaCode` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Sheet2$`
--

CREATE TABLE `Sheet2$` (
  `_Value` varchar(255) DEFAULT NULL,
  `_Description` varchar(255) DEFAULT NULL,
  `rubriek` varchar(255) DEFAULT NULL,
  `Juridica-code` varchar(255) DEFAULT NULL,
  `rubriekman` varchar(255) DEFAULT NULL,
  `rubriekcom` varchar(255) DEFAULT NULL,
  `rubriekjur` varchar(255) DEFAULT NULL,
  `rubriekalg` varchar(255) DEFAULT NULL,
  `website` varchar(255) DEFAULT NULL,
  `NUR` varchar(255) DEFAULT NULL,
  `extra_check` varchar(255) DEFAULT NULL,
  `plts` varchar(255) DEFAULT NULL,
  `level_0` varchar(255) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `in_feed` varchar(255) DEFAULT NULL,
  `ranking` varchar(255) DEFAULT NULL,
  `JuridicaCode` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Uitgevers`
--

CREATE TABLE `Uitgevers` (
  `UitgeverId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL,
  `Naam` varchar(250) DEFAULT NULL COMMENT 'Naam',
  `Bestelpuntid` int(11) NOT NULL DEFAULT '596',
  `Bestelwijzeid` int(11) DEFAULT '4',
  `Bekeken` tinyint(4) NOT NULL DEFAULT '0',
  `Mag_Aanvullen` tinyint(4) NOT NULL DEFAULT '1',
  `Mag_ONE` tinyint(4) NOT NULL DEFAULT '1',
  `Gemapte_Uitgever` int(11) DEFAULT NULL,
  PRIMARY KEY (`UitgeverId`),
  UNIQUE KEY `FeedCode` (`FeedCode`,`UitgeverFeedId`),
  KEY `Bestelpuntid` (`Bestelpuntid`),
  KEY `Bestelwijzeid` (`Bestelwijzeid`),
  KEY `Gemapte_Uitgever` (`Gemapte_Uitgever`)
) ENGINE=InnoDB AUTO_INCREMENT=2912 DEFAULT CHARSET=utf8;

--
-- Table structure for table `Uitgevers_check`
--

CREATE TABLE `Uitgevers_check` (
  `UitgeverID` int(11) NOT NULL,
  `Klantnummer` varchar(50) DEFAULT NULL,
  `Naamuitgever` varchar(50) NOT NULL DEFAULT '',
  `Omschrijving` text,
  `Adres` varchar(255) DEFAULT NULL,
  `Postcode` varchar(7) DEFAULT NULL,
  `Woonplaats` varchar(255) DEFAULT NULL,
  `Telefoon` varchar(20) DEFAULT NULL,
  `Fax` varchar(20) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  `Contactpersoon` varchar(50) DEFAULT NULL,
  `Kortingmp_a` double DEFAULT NULL,
  `Kortingmp_s` double DEFAULT NULL,
  `Kortingmp_w` double DEFAULT NULL,
  `Kortingmp_o` double DEFAULT NULL,
  `Kortingmp_g` double DEFAULT NULL,
  `Magazijnlocatienummer` char(4) CHARACTER SET ascii DEFAULT NULL,
  `Magazijnlocatienummerbulk` char(4) CHARACTER SET ascii DEFAULT NULL,
  `Magazijnlocatienummercom` char(4) CHARACTER SET ascii DEFAULT NULL,
  `Magazijnlocatienummercombulk` char(4) CHARACTER SET ascii DEFAULT NULL,
  `Verborgen` tinyint(1) NOT NULL DEFAULT '0',
  `Crediteurnummer` int(11) DEFAULT NULL,
  `BestelpuntID` int(11) DEFAULT NULL,
  `BestelwijzeID` int(11) DEFAULT NULL,
  `Minimalebestelhoeveelheid` int(11) DEFAULT NULL,
  `Aanhef` text,
  `Afsluiting` text,
  `Emailvoorvragen` char(255) DEFAULT NULL,
  `Afspraak` smallint(1) NOT NULL DEFAULT '0',
  `Ruzie` smallint(1) NOT NULL DEFAULT '0',
  `MagONE` smallint(1) NOT NULL DEFAULT '0',
  `Retourneer_min` int(11) unsigned NOT NULL DEFAULT '90',
  `Retourneer_max` int(11) unsigned NOT NULL DEFAULT '330',
  `Email_ebook` char(255) DEFAULT NULL,
  `Automatisch_rapporteren` smallint(6) DEFAULT NULL,
  `Kortingmp_e` double DEFAULT NULL,
  `Rapportageviacb` smallint(6) DEFAULT NULL,
  `Uitgevers_rapportagevanaf` date DEFAULT NULL,
  `Uitgevers_levertijd` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `VerkoopFeed`
--

CREATE TABLE `VerkoopFeed` (
  `Ean` char(13) NOT NULL,
  `Feedcode` char(8) DEFAULT NULL,
  `Valuta` char(4) DEFAULT NULL,
  `Listprice` decimal(7,2) DEFAULT NULL,
  `VasteEuroPrijs` decimal(7,2) DEFAULT NULL,
  `AanbiedingsEuroPrijs` decimal(7,2) DEFAULT NULL,
  `VastePrijsExBtw` decimal(7,2) DEFAULT NULL,
  `InkoopPrijsEx` decimal(7,2) DEFAULT NULL,
  `Boekstatus` tinyint(4) DEFAULT NULL,
  `Discountcode` char(20) DEFAULT NULL,
  `Discount` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `View_BoekAlleRubrieken`
--

/*!50001 DROP VIEW IF EXISTS `View_BoekAlleRubrieken`*/;
/*!50001 CREATE TABLE `View_BoekAlleRubrieken` (
  `EAN` tinyint NOT NULL,
  `Rubriekman` tinyint NOT NULL,
  `Rubriekcom` tinyint NOT NULL,
  `Rubriekjur` tinyint NOT NULL,
  `Rubriekalg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `View_BoekRubrieken`
--

/*!50001 DROP VIEW IF EXISTS `View_BoekRubrieken`*/;
/*!50001 CREATE TABLE `View_BoekRubrieken` (
  `EAN` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `RubriekMan` tinyint NOT NULL,
  `RubriekCom` tinyint NOT NULL,
  `RubriekJur` tinyint NOT NULL,
  `RubriekAlg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `View_Boeken_gefilterd_externe`
--

/*!50001 DROP VIEW IF EXISTS `View_Boeken_gefilterd_externe`*/;
/*!50001 CREATE TABLE `View_Boeken_gefilterd_externe` (
  `Ean` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Cover` tinyint NOT NULL,
  `Backcover` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `RubriekMan` tinyint NOT NULL,
  `RubriekCom` tinyint NOT NULL,
  `RubriekJur` tinyint NOT NULL,
  `RubriekAlg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `View_boeken_gefilterd`
--

/*!50001 DROP VIEW IF EXISTS `View_boeken_gefilterd`*/;
/*!50001 CREATE TABLE `View_boeken_gefilterd` (
  `Ean` tinyint NOT NULL,
  `UitgeverID` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Reeksnummer` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `Herdrukdatum` tinyint NOT NULL,
  `VerwachteVerschijningsdatum` tinyint NOT NULL,
  `ProductAvailability` tinyint NOT NULL,
  `PublishingStatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `Fysiek_boek` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Cover` tinyint NOT NULL,
  `Backcover` tinyint NOT NULL,
  `PDF` tinyint NOT NULL,
  `BestandLaatsteWijziging` tinyint NOT NULL,
  `AanbiedingsPrijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `FeedCode` tinyint NOT NULL,
  `CommercieleImprint` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL,
  `RubriekMan` tinyint NOT NULL,
  `RubriekCom` tinyint NOT NULL,
  `RubriekJur` tinyint NOT NULL,
  `RubriekAlg` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `View_boeken_verlanglijst`
--

/*!50001 DROP VIEW IF EXISTS `View_boeken_verlanglijst`*/;
/*!50001 CREATE TABLE `View_boeken_verlanglijst` (
  `Ean` tinyint NOT NULL,
  `Uitgever` tinyint NOT NULL,
  `Uitgever_cbid` tinyint NOT NULL,
  `Enanderen` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Ondertitel` tinyint NOT NULL,
  `Naamserie` tinyint NOT NULL,
  `Titelserie` tinyint NOT NULL,
  `Editie` tinyint NOT NULL,
  `Editieversie` tinyint NOT NULL,
  `Bindwijze` tinyint NOT NULL,
  `Aantalblz` tinyint NOT NULL,
  `Samenvatting` tinyint NOT NULL,
  `Inhoudsopgave` tinyint NOT NULL,
  `Aanmaakdatum` tinyint NOT NULL,
  `Laatstgewijzigd` tinyint NOT NULL,
  `Taalvermelding` tinyint NOT NULL,
  `jaaruitgifte` tinyint NOT NULL,
  `Druk` tinyint NOT NULL,
  `Hoogte` tinyint NOT NULL,
  `Breedte` tinyint NOT NULL,
  `Dikte` tinyint NOT NULL,
  `Gewicht` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `verwachteVerschijningsdatum` tinyint NOT NULL,
  `Publishingstatus` tinyint NOT NULL,
  `CBstatus` tinyint NOT NULL,
  `Vervangt` tinyint NOT NULL,
  `Vervangen_door` tinyint NOT NULL,
  `Boeksoort` tinyint NOT NULL,
  `Levertijd` tinyint NOT NULL,
  `fysiek_boek` tinyint NOT NULL,
  `VastePrijs` tinyint NOT NULL,
  `VastePrijsExBtw` tinyint NOT NULL,
  `Aanbiedingsprijs` tinyint NOT NULL,
  `AanbiedingsPrijsExBtw` tinyint NOT NULL,
  `Aanbiedingvanaf` tinyint NOT NULL,
  `Aanbiedingtotenmet` tinyint NOT NULL,
  `IsAanbieding` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL,
  `BTWCode` tinyint NOT NULL,
  `Bindwijze_Inpakken` tinyint NOT NULL,
  `KortingMP` tinyint NOT NULL,
  `Boekstatus` tinyint NOT NULL,
  `Nur` tinyint NOT NULL,
  `Rubriek` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `ViewbuilderSolr`
--

CREATE TABLE `ViewbuilderSolr` (
  `Field` varchar(255) NOT NULL,
  `Value` varchar(255) NOT NULL,
  PRIMARY KEY (`Field`,`Value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `WileySupplyUpdates`
--

CREATE TABLE `WileySupplyUpdates` (
  `feedcode` char(8) NOT NULL DEFAULT 'wiley',
  `ean` char(13) NOT NULL,
  `PublishingStatus` char(2) DEFAULT NULL,
  `ProductAvailability` char(2) DEFAULT NULL,
  `Boekstatus` tinyint(2) DEFAULT NULL,
  `CBStatus` char(25) DEFAULT NULL,
  `VerschijningsDatum` date DEFAULT NULL,
  `VerwachteVerschijningsDatum` date DEFAULT NULL,
  `Valuta` char(3) NOT NULL,
  `PrijsExBtw` double DEFAULT NULL,
  `kortingscode` char(10) DEFAULT NULL,
  `kortingpercentage` double DEFAULT NULL,
  `Stock` int(11) DEFAULT NULL,
  `InFeed` char(1) DEFAULT NULL,
  `Laatstgewijzigd` date DEFAULT NULL,
  PRIMARY KEY (`ean`,`Valuta`),
  KEY `ean` (`ean`,`Valuta`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `XEU_Redirects`
--

CREATE TABLE `XEU_Redirects` (
  `URL` varchar(255) NOT NULL,
  PRIMARY KEY (`URL`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `bic`
--

CREATE TABLE `bic` (
  `_Value` char(10) NOT NULL,
  `_Description` varchar(255) DEFAULT NULL,
  `rubriek` char(50) DEFAULT NULL,
  `rubriekman` varchar(50) DEFAULT NULL,
  `rubriekcom` varchar(50) DEFAULT NULL,
  `rubriekjur` varchar(50) DEFAULT NULL,
  `rubriekalg` varchar(50) DEFAULT NULL,
  `website` varchar(50) DEFAULT NULL,
  `NUR` int(11) DEFAULT NULL,
  `extra_check` varchar(3) NOT NULL,
  `plts` varchar(45) DEFAULT NULL,
  `done` varchar(1) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `old_value` varchar(64) DEFAULT NULL,
  `in_feed` varchar(2) DEFAULT NULL,
  `ranking` int(11) DEFAULT NULL,
  `JuridicaCode` char(10) DEFAULT NULL,
  PRIMARY KEY (`_Value`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `bic1`
--

CREATE TABLE `bic1` (
  `_Value` varchar(9) NOT NULL DEFAULT '',
  `_Description` varchar(255) DEFAULT NULL,
  `rubriek` varchar(50) DEFAULT '',
  `rubriekman` varchar(50) DEFAULT '',
  `rubriekcom` varchar(50) DEFAULT '',
  `rubriekjur` varchar(50) DEFAULT '',
  `rubriekalg` varchar(50) DEFAULT '',
  `website` varchar(50) DEFAULT '',
  `NUR` int(11) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `extra_check` varchar(3) DEFAULT NULL,
  `old_value` varchar(64) DEFAULT NULL,
  `in_feed` varchar(2) DEFAULT NULL,
  `ranking` int(11) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `ID` int(11) DEFAULT NULL,
  `JuridicaCode` char(10) DEFAULT NULL,
  PRIMARY KEY (`_Value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `bisac`
--

CREATE TABLE `bisac` (
  `_Value` varchar(9) NOT NULL,
  `_Description` varchar(255) DEFAULT NULL,
  `rubriek` varchar(50) DEFAULT NULL,
  `rubriekman` varchar(50) DEFAULT NULL,
  `rubriekcom` varchar(50) DEFAULT NULL,
  `rubriekjur` varchar(50) DEFAULT NULL,
  `rubriekalg` varchar(50) DEFAULT NULL,
  `website` varchar(20) DEFAULT NULL,
  `NUR` int(11) DEFAULT NULL,
  `extra_check` varchar(3) DEFAULT NULL,
  `plts` varchar(255) DEFAULT NULL,
  `level_0` varchar(255) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `in_feed` varchar(2) DEFAULT NULL,
  `ranking` int(11) DEFAULT NULL,
  `JuridicaCode` char(10) DEFAULT NULL,
  PRIMARY KEY (`_Value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `comcol_dump3`
--

CREATE TABLE `comcol_dump3` (
  `id` varchar(16) NOT NULL,
  `ean` char(13) NOT NULL,
  `title` varchar(255) NOT NULL,
  `subtitle` varchar(255) NOT NULL,
  `product_url` varchar(247) NOT NULL,
  `price_in_vat` decimal(8,2) NOT NULL,
  `vat` enum('6') NOT NULL,
  `short_description` text,
  `full_description` text,
  `edition` varchar(4) DEFAULT NULL,
  `pages` varchar(5) DEFAULT NULL,
  `language` varchar(10) DEFAULT NULL,
  `publisher` varchar(68) CHARACTER SET utf8 DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `brand` varchar(68) DEFAULT NULL,
  `image_url` varchar(163) NOT NULL,
  `productform` varchar(22) DEFAULT NULL,
  `article_type` char(5) NOT NULL,
  `stock` varchar(5) NOT NULL,
  `sale_price` decimal(8,2) DEFAULT NULL,
  `sale_price_effective_date` char(49) DEFAULT NULL,
  `aanbiedingvanaf` date DEFAULT NULL,
  `aanbiedingtotenmet` date DEFAULT NULL,
  `comcol_category_1` varchar(16) DEFAULT NULL,
  `comcol_category_2` varchar(72) DEFAULT NULL,
  `comcol_category_3` varchar(46) DEFAULT NULL,
  `comcol_category_4` varchar(43) DEFAULT NULL,
  `comcol_category_5` varchar(43) DEFAULT NULL,
  `comcol_category_6` char(53) DEFAULT NULL,
  `boekstatus` int(11) DEFAULT '0',
  `in_manpo` tinyint(1) NOT NULL DEFAULT '0',
  `in_cb` tinyint(1) NOT NULL DEFAULT '0',
  `in_cc` tinyint(1) NOT NULL DEFAULT '0',
  `publicatiedatum` date DEFAULT NULL,
  `bindwijze` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
  `uitgeverid` int(11) DEFAULT NULL,
  PRIMARY KEY (`ean`),
  KEY `in_manpo` (`in_manpo`,`in_cb`),
  KEY `bestel` (`id`,`uitgeverid`),
  KEY `bestelpuntid` (`uitgeverid`),
  KEY `publisher` (`publisher`),
  CONSTRAINT `comcol_dump3_ibfk_1` FOREIGN KEY (`uitgeverid`) REFERENCES `Manpo`.`Uitgevers` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `comcol_dump3_authors`
--

CREATE TABLE `comcol_dump3_authors` (
  `ean` char(13) NOT NULL,
  `AuteurAchternaam` varchar(255) DEFAULT NULL,
  `AuteurNaam` varchar(255) DEFAULT NULL,
  KEY `ean` (`ean`,`AuteurNaam`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `contributors`
--

CREATE TABLE `contributors` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ProductIdentifier` varchar(13) DEFAULT NULL,
  `ContributorRole` varchar(255) DEFAULT NULL,
  `PersonName` varchar(255) DEFAULT NULL,
  `PersonNameInverted` varchar(255) DEFAULT NULL,
  `NamesBeforeKey` varchar(255) DEFAULT NULL,
  `KeyNames` varchar(255) DEFAULT NULL,
  `prefixtokey` varchar(255) DEFAULT NULL,
  `Titles` varchar(255) DEFAULT NULL,
  `CorporateName` varchar(255) DEFAULT NULL,
  `CorporateNameInverted` varchar(255) DEFAULT NULL,
  `BiographicalNote` mediumtext,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`),
  KEY `ID` (`ID`),
  KEY `ProductIdentifier` (`ProductIdentifier`)
) ENGINE=InnoDB AUTO_INCREMENT=6469580 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `eBoekAuteurs`
--

CREATE TABLE `eBoekAuteurs` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `AuteurPositie` int(11) NOT NULL DEFAULT '0',
  `AuteurVolledigenaam` varchar(255) NOT NULL,
  `AuteurVoornaam` varchar(255) DEFAULT NULL,
  `AuteurTussenvoegsels` varchar(255) DEFAULT NULL,
  `AuteurAchternaam` varchar(255) DEFAULT NULL,
  `AuteurBio` text,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`,`AuteurPositie`,`AuteurVolledigenaam`),
  UNIQUE KEY `Ean` (`Ean`,`AuteurVolledigenaam`),
  KEY `AuteurVolledigenaam` (`AuteurVolledigenaam`,`Ean`,`AuteurPositie`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `eBoekbic`
--

CREATE TABLE `eBoekbic` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BIC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`FeedCode`,`Ean`,`BIC`,`id`),
  UNIQUE KEY `FeedCode` (`FeedCode`,`Ean`,`BIC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`,`FeedCode`),
  KEY `BIC` (`BIC`)
) ENGINE=InnoDB AUTO_INCREMENT=13518344 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `eBoekbisac`
--

CREATE TABLE `eBoekbisac` (
  `FeedCode` char(8) NOT NULL,
  `Ean` char(13) NOT NULL,
  `BISAC` char(10) NOT NULL,
  `NUR` int(11) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`FeedCode`,`Ean`,`BISAC`,`id`),
  KEY `BISAC` (`BISAC`),
  KEY `id` (`id`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB AUTO_INCREMENT=13509805 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;

--
-- Table structure for table `eBoeken`
--

CREATE TABLE `eBoeken` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `NaamUitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `Imprint` varchar(50) DEFAULT NULL,
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `UitgeverFeedId` int(11) DEFAULT NULL COMMENT 'Feed-specifieke ID uitgever',
  `Enanderen` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Als er '', e.a.'' getoond moet worden',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Naamserie` varchar(255) DEFAULT NULL COMMENT 'Naam van de serie. BV ''Voor Dummies''',
  `Titelserie` varchar(255) DEFAULT NULL COMMENT 'Titel in de serie. BV ''Deel 8''',
  `Reeksnummer` int(11) DEFAULT NULL COMMENT 'Reeksnummer in de serie, BV 8',
  `ReeksnummerTxt` char(10) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL COMMENT '1e druk, etc.',
  `Editieversie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) NOT NULL DEFAULT 'paperback' COMMENT 'Een door ons goedgekeurde bindwijze',
  `onixbindwijze` char(2) NOT NULL DEFAULT '',
  `InclusiefProdukt` varchar(50) NOT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Abstract` text,
  `Samenvatting` text,
  `Inhoudsopgave` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Taalvermelding` varchar(2) DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT '0000-00-00',
  `Herdrukdatum` date DEFAULT NULL,
  `VerwachteVerschijningsdatum` date DEFAULT '0000-00-00',
  `Uitverkochtdatum` date DEFAULT '0000-00-00',
  `CBstatus` varchar(50) DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `PublishingStatus` tinyint(2) DEFAULT '0' COMMENT 'Zie ONIX',
  `ProductAvailability` char(2) DEFAULT NULL COMMENT 'Zie ONIX',
  `PublishingStatusTxt` char(25) DEFAULT NULL,
  `ProductAvailabilityTxt` varchar(50) DEFAULT NULL,
  `Vervangt` char(13) DEFAULT NULL,
  `Vervangen_door` char(13) DEFAULT NULL,
  `Levertijd` tinyint(2) DEFAULT NULL,
  `Fysiek_boek` char(13) NOT NULL COMMENT 'Indien ebook, ean van fysiek boek',
  `ebook` char(13) NOT NULL,
  `eanebook` char(13) NOT NULL,
  `InkoopKorting` tinyint(4) NOT NULL COMMENT 'De korting die wij krijgen. 0 indien niet bekend.',
  `CoverURL` varchar(255) DEFAULT NULL,
  `BackcoverURL` varchar(255) DEFAULT NULL,
  `PDFURL` varchar(255) DEFAULT NULL,
  `BestandLaatsteWijziging` varchar(255) DEFAULT NULL COMMENT 'Bestandsnaam van bestand dat laatste wijziging bevat',
  `InAssortiment` tinyint(1) DEFAULT NULL COMMENT '1 Als het getoond word op de website(s)',
  `BestandsGrootte` varchar(50) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`FeedCode`,`Ean`),
  UNIQUE KEY `i1` (`Ean`,`InAssortiment`),
  KEY `i2` (`NaamUitgever`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Laatstgewijzigd` (`Laatstgewijzigd`),
  KEY `Publicatiestatus_code` (`ProductAvailability`,`PublishingStatus`,`Taalvermelding`,`Bindwijze`),
  KEY `Uitgever_cbid` (`UitgeverFeedId`),
  KEY `CBstatus_code` (`PublishingStatus`,`ProductAvailability`),
  KEY `Producten_ibfk_2` (`FeedCode`,`UitgeverFeedId`),
  KEY `InAssortiment` (`InAssortiment`),
  KEY `Bindwijze` (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED;

--
-- Table structure for table `ePrijzen`
--

CREATE TABLE `ePrijzen` (
  `PrijsId` int(11) NOT NULL AUTO_INCREMENT,
  `FeedCode` char(8) CHARACTER SET utf8 NOT NULL,
  `Ean` char(13) CHARACTER SET utf8 NOT NULL,
  `IsAanbieding` tinyint(1) DEFAULT '0',
  `Prijs` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `PrijsExBtw2` decimal(8,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `inkoopkorting` decimal(8,2) DEFAULT '0.00',
  `Valuta` varchar(4) CHARACTER SET utf8 DEFAULT 'EUR',
  `BtwTarief` tinyint(2) DEFAULT NULL,
  `BtwTarief2` tinyint(2) DEFAULT NULL,
  `PrijsVanaf` date DEFAULT NULL,
  `PrijsTot` date DEFAULT NULL,
  `Laatstgewijzigd` datetime DEFAULT NULL COMMENT 'datum in .onx',
  `kortingscode` char(10) DEFAULT '',
  `kortingpercentage` decimal(8,0) DEFAULT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`PrijsId`),
  UNIQUE KEY `Ean_2` (`FeedCode`,`Ean`,`Valuta`),
  KEY `ean` (`Ean`),
  KEY `aanmaakdatum` (`Laatstgewijzigd`),
  KEY `Prijs` (`Prijs`,`PrijsExBtw`),
  KEY `kortingscode` (`kortingscode`),
  KEY `FeedCode` (`FeedCode`,`Ean`)
) ENGINE=InnoDB AUTO_INCREMENT=9685633 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT;

--
-- Table structure for table `externe_prijzen`
--

CREATE TABLE `externe_prijzen` (
  `ean` char(13) NOT NULL,
  `sourceprice` double NOT NULL,
  `status` char(10) NOT NULL,
  `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ean`),
  KEY `ean` (`ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Bindwijze`
--

CREATE TABLE `filter_Bindwijze` (
  `Bindwijze` varchar(50) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Bindwijze`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_CBstatus`
--

CREATE TABLE `filter_CBstatus` (
  `CBstatus` varchar(50) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`CBstatus`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Eans_Rubrieken`
--

CREATE TABLE `filter_Eans_Rubrieken` (
  `Ean` char(13) NOT NULL,
  `viewid` enum('solr') NOT NULL,
  PRIMARY KEY (`Ean`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Feedcode`
--

CREATE TABLE `filter_Feedcode` (
  `Feedcode` varchar(8) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Feedcode`,`viewid`),
  CONSTRAINT `ibfk_feedcode` FOREIGN KEY (`Feedcode`) REFERENCES `Feeds` (`FeedCode`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Publicatiestatus`
--

CREATE TABLE `filter_Publicatiestatus` (
  `Publicatiestatus_code` int(11) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Publicatiestatus_code`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Rubrieken`
--

CREATE TABLE `filter_Rubrieken` (
  `Rubrieken` char(50) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Rubrieken`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Taalvermelding`
--

CREATE TABLE `filter_Taalvermelding` (
  `Taalvermelding` varchar(10) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Taalvermelding`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `filter_Uitgever`
--

CREATE TABLE `filter_Uitgever` (
  `Uitgever_cbid` int(11) NOT NULL,
  `viewid` enum('solr','verlanglijst','adwords') NOT NULL DEFAULT 'solr',
  PRIMARY KEY (`Uitgever_cbid`,`viewid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `kortingcodeopzoektijdelijk`
--

CREATE TABLE `kortingcodeopzoektijdelijk` (
  `FeedCode` char(8) NOT NULL COMMENT 'Feed code. BV ''wiley''',
  `ean` char(13) NOT NULL COMMENT 'EAN',
  `Titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `Ondertitel` varchar(255) DEFAULT NULL COMMENT 'Ondertitel van product',
  `Bindwijze` varchar(50) NOT NULL COMMENT 'Een door ons goedgekeurde bindwijze',
  `naamuitgever` varchar(50) DEFAULT NULL COMMENT 'Tekstuele naam uitgever',
  `CommercieleImprint` varchar(50) DEFAULT NULL,
  `PrijsExBtw` decimal(8,2) DEFAULT '0.00',
  `kortingscode` char(10) CHARACTER SET latin1 DEFAULT NULL,
  `boekstatus` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Mainpress boekstatus',
  `CBstatus` varchar(50) DEFAULT NULL,
  `rubriek` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `magento`
--

CREATE TABLE `magento` (
  `entity_id` int(10) NOT NULL DEFAULT '0',
  `store_id` int(11) DEFAULT NULL,
  `V_ID` varchar(25) NOT NULL,
  `ean` varchar(13) NOT NULL DEFAULT '',
  `mensyscode` varchar(30) NOT NULL DEFAULT '',
  `pubdate` date DEFAULT NULL,
  `price` double DEFAULT NULL,
  `max_korting` double DEFAULT NULL,
  `status` int(11) DEFAULT NULL,
  `visibility` int(11) DEFAULT NULL,
  `product_type` varchar(50) DEFAULT NULL,
  `article_code` varchar(45) NOT NULL DEFAULT '',
  `specialprice` double DEFAULT NULL,
  `imprint` varchar(255) DEFAULT NULL,
  `publisher` varchar(255) DEFAULT NULL,
  `special_from_date` date DEFAULT NULL,
  `special_to_date` date DEFAULT NULL,
  `Description_long` text,
  `title` text,
  `description_short` text,
  `plaatje` varchar(3) DEFAULT NULL,
  `url` text,
  `Comcol_aanbieding` varchar(2) DEFAULT NULL,
  `stock` int(10) DEFAULT NULL,
  `expecteddate` date DEFAULT NULL,
  `publisher_id` int(10) DEFAULT NULL,
  `levertijd` varchar(255) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `lokatie` varchar(50) DEFAULT NULL,
  `product_soort` int(11) DEFAULT NULL,
  `tax_class_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`entity_id`,`ean`),
  KEY `article_code` (`article_code`),
  KEY `entity_id_2` (`entity_id`),
  KEY `V_ID` (`V_ID`),
  KEY `ean` (`ean`,`mensyscode`),
  KEY `publisher_id` (`publisher_id`),
  KEY `product_type` (`product_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `new_table`
--

CREATE TABLE `new_table` (
  `ean` char(13) CHARACTER SET utf8 NOT NULL,
  `AuteurVolledigenaam` varchar(255) CHARACTER SET utf8 NOT NULL,
  `AuteurPositie` int(11) NOT NULL DEFAULT '0',
  `count` bigint(21) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `prijsverschillen_na_update_comcol`
--

CREATE TABLE `prijsverschillen_na_update_comcol` (
  `ean` char(13) CHARACTER SET latin1 NOT NULL,
  `title` varchar(255) CHARACTER SET latin1 NOT NULL,
  `publisher` varchar(68) DEFAULT NULL,
  `nieuw` decimal(8,2) NOT NULL,
  `oud` decimal(8,2) NOT NULL,
  `verschil` decimal(9,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `active` varchar(45) DEFAULT NULL,
  `categorie` varchar(255) DEFAULT NULL,
  `categorieuk` varchar(255) NOT NULL,
  `rubriek` varchar(50) DEFAULT NULL,
  `website` varchar(50) DEFAULT NULL,
  `NUR` int(11) DEFAULT NULL,
  `sortcode` int(11) DEFAULT NULL,
  `not` varchar(255) DEFAULT NULL,
  `level_0` varchar(255) DEFAULT NULL,
  `level_1` varchar(255) DEFAULT NULL,
  `level_2` varchar(255) DEFAULT NULL,
  `level_3` varchar(255) DEFAULT NULL,
  `level_4` varchar(255) DEFAULT NULL,
  `level_5` varchar(255) DEFAULT NULL,
  `level_6` varchar(255) DEFAULT NULL,
  `ranking` int(11) DEFAULT NULL,
  `done` varchar(3) DEFAULT NULL,
  `extra_check` varchar(2) DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`categorieuk`)
) ENGINE=MyISAM AUTO_INCREMENT=2957 DEFAULT CHARSET=utf8;

--
-- Table structure for table `subjects_add`
--

CREATE TABLE `subjects_add` (
  `ean` varchar(13) NOT NULL,
  `title` varchar(255) NOT NULL,
  `subtitle` varchar(255) NOT NULL,
  `Verschijningsdatum` date NOT NULL,
  `naamuitgever` varchar(50) NOT NULL,
  `feedcode` varchar(10) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`ean`),
  KEY `ean` (`ean`,`title`),
  KEY `naamuitgever` (`naamuitgever`),
  KEY `feedcode` (`feedcode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `wileytest`
--

CREATE TABLE `wileytest` (
  `Ean` char(13) NOT NULL COMMENT 'EAN',
  `titel` varchar(255) NOT NULL DEFAULT '' COMMENT 'Titel van product',
  `kortingscode` char(10) CHARACTER SET latin1 DEFAULT NULL,
  `valuta` varchar(4) DEFAULT 'EUR',
  `prijsexbtw` decimal(8,2) DEFAULT '0.00',
  `bic` char(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping routines for database 'Feeds'
--
/*!50003 DROP PROCEDURE IF EXISTS `Create_Rubrieken` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `Create_Rubrieken`()
BEGIN
	REPLACE INTO Boek_Rubrieken_plat SELECT * FROM View_BoekRubrieken;
    END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `fix_rubrieken` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `fix_rubrieken`()
BEGIN
UPDATE Feeds.bic SET rubriekman = TRIM(REPLACE(REPLACE(REPLACE(rubriekman,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic SET rubriekcom = TRIM(REPLACE(REPLACE(REPLACE(rubriekcom,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic SET rubriekjur = TRIM(REPLACE(REPLACE(REPLACE(rubriekjur,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic SET rubriekalg = TRIM(REPLACE(REPLACE(REPLACE(rubriekalg,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic SET rubriek    = TRIM(REPLACE(REPLACE(REPLACE(rubriek,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic1 SET rubriekman = TRIM(REPLACE(REPLACE(REPLACE(rubriekman,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic1 SET rubriekcom = TRIM(REPLACE(REPLACE(REPLACE(rubriekcom,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic1 SET rubriekjur = TRIM(REPLACE(REPLACE(REPLACE(rubriekjur,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic1 SET rubriekalg = TRIM(REPLACE(REPLACE(REPLACE(rubriekalg,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bic1 SET rubriek    = TRIM(REPLACE(REPLACE(REPLACE(rubriek,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bisac SET rubriekman = TRIM(REPLACE(REPLACE(REPLACE(rubriekman,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bisac SET rubriekcom = TRIM(REPLACE(REPLACE(REPLACE(rubriekcom,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bisac SET rubriekjur = TRIM(REPLACE(REPLACE(REPLACE(rubriekjur,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bisac SET rubriekalg = TRIM(REPLACE(REPLACE(REPLACE(rubriekalg,'\t',''),'\n',''),'\r','')); 
UPDATE Feeds.bisac SET rubriek    = TRIM(REPLACE(REPLACE(REPLACE(rubriek,'\t',''),'\n',''),'\r','')); 
    END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `Herbereken_Levertijd` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `Herbereken_Levertijd`()
    MODIFIES SQL DATA
BEGIN
	CREATE TABLE Feeds.LevertijdTmp ( Ean CHAR(13) PRIMARY KEY, Levertijd TINYINT ) ROW_FORMAT=COMPRESSED
		SELECT Ean, P.Levertijd FROM Feeds.Boeken_gefilterd B JOIN Feeds.DagPrijzen P USING ( Ean ); 
	RENAME TABLE Feeds.Levertijd TO Feeds.LevertijdOld, Feeds.LevertijdTmp TO Feeds.Levertijd;
	DROP TABLE IF EXISTS Feeds.LevertijdOld;
    END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `make_exactartikel` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `make_exactartikel`( _ean CHAR(13) )
BEGIN
	DECLARE _inManpo INT;
	
	SELECT COUNT(*) INTO _inManpo FROM Manpo.Boeken WHERE Ean = _ean;
	
	IF _inManpo = 0 THEN
		INSERT INTO Managementboek_Klanten.`ExactArtikelen` SELECT * FROM Feeds.`ExactArtikelen` WHERE Ean = _ean
		ON DUPLICATE KEY UPDATE Titel = VALUES(Titel),
			Auteur = VALUES(Auteur),
			Prijs = VALUES(Prijs),
			VastePrijs = VALUES(VastePrijs),
			ActiePrijs = VALUES(ActiePrijs),
			BriefCode = VALUES(BriefCode),
			BackorderCode = VALUES(BackorderCode),
			ExactArtikel = VALUES(ExactArtikel),
			BTWCode = VALUES(BTWCode),
			ArtikelGroep = VALUES(ArtikelGroep),
			Boeksoort = VALUES(Boeksoort),
			Bindwijze = VALUES(Bindwijze),
			MagazijnSoort = VALUES(MagazijnSoort),
			Magazijnlocatienummer = VALUES(Magazijnlocatienummer),
			NietInpakken = VALUES(NietInpakken);
	END IF;
	
    END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `Materialize_View` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `Materialize_View`( _viewid CHAR(20) )
BEGIN
	DECLARE t_c INT;
	START TRANSACTION;
	
	DELETE FROM filter_Eans_Rubrieken WHERE viewid = _viewid;
	INSERT IGNORE INTO filter_Eans_Rubrieken ( EAN, viewid )
		SELECT EAN, _viewid
		FROM Feeds.BIC_gefilterd F
			JOIN Feeds.Boekbic BB ON ( BB.BIC = F.BIC )
			JOIN Feeds.filter_Rubrieken R ON ( R.viewid = _viewid AND ( F.Rubriekman = R.Rubrieken OR F.Rubriekcom = R.Rubrieken OR F.Rubriekjur = R.Rubrieken OR F.Rubriekalg = R.Rubrieken ) )
		GROUP BY EAN;
	INSERT IGNORE INTO filter_Eans_Rubrieken ( EAN, viewid )
		SELECT EAN, _viewid
		FROM Feeds.BIC1_gefilterd F
			JOIN Feeds.Boekbic BB ON ( BB.BIC = F.BIC1 )
			JOIN Feeds.filter_Rubrieken R ON ( R.viewid = _viewid AND ( F.Rubriekman = R.Rubrieken OR F.Rubriekcom = R.Rubrieken OR F.Rubriekjur = R.Rubrieken OR F.Rubriekalg = R.Rubrieken ) )
		GROUP BY EAN;
	INSERT IGNORE INTO filter_Eans_Rubrieken ( EAN, viewid )
		SELECT EAN, _viewid
		FROM Feeds.BISAC_gefilterd F
			JOIN Feeds.Boekbisac BB ON ( BB.BISAC = F.BISAC )
			JOIN Feeds.filter_Rubrieken R ON ( R.viewid = _viewid AND ( F.Rubriekman = R.Rubrieken OR F.Rubriekcom = R.Rubrieken OR F.Rubriekjur = R.Rubrieken OR F.Rubriekalg = R.Rubrieken ) )
		GROUP BY EAN;
	SELECT COUNT(1) INTO t_c FROM Feeds.filter_Rubrieken
	WHERE viewid = _viewid AND Rubrieken = 'Diversen';
	
	IF t_c > 0 THEN
	
		INSERT IGNORE INTO filter_Eans_Rubrieken ( EAN, viewid )
			SELECT EAN, "solr"
			FROM Feeds.Boeken
				LEFT JOIN Feeds.Boekbic BBC USING ( EAN )
				LEFT JOIN Feeds.Boekbisac BSC USING ( EAN )
				LEFT JOIN Feeds.BIC1_gefilterd FB1 ON ( BBC.BIC = FB1.BIC1 )
				LEFT JOIN Feeds.BIC_gefilterd FB2 ON ( BBC.BIC = FB2.BIC )
				LEFT JOIN Feeds.BISAC_gefilterd FBS ON ( BSC.BISAC = FBS.BISAC )
			GROUP BY EAN
			HAVING COUNT(FB1.Rubriekalg) = 0 AND COUNT(FB2.Rubriekalg) = 0 AND COUNT(FBS.Rubriekalg) = 0;
	END IF;
	COMMIT;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `Materialize_View_External` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `Materialize_View_External`()
    MODIFIES SQL DATA
BEGIN
	DECLARE crit MEDIUMTEXT;
	START TRANSACTION;
	DELETE FROM Feeds.`BoekenInSiteView`;
	SELECT GROUP_CONCAT( f SEPARATOR " AND " ) INTO crit FROM ( SELECT CONCAT( "B.", `Field`, " IN (", GROUP_CONCAT( CONCAT( "\"", `Value`,"\"" ) SEPARATOR " OR " ), ")" ) AS f FROM Feeds.ViewbuilderSolr GROUP BY `Field` ) A;
	CALL common_schema.`exec`( CONCAT( "INSERT IGNORE INTO Feeds.`BoekenInSiteView` SELECT B.Ean FROM Feeds.Boeken B JOIN Feeds.DagPrijzen DP USING ( Ean, Feedcode ) LEFT JOIN Feeds.BoekRubrieken2 BRR ON ( BRR.Ean = B.Ean ) WHERE ", crit ) );
	COMMIT;
    
	SET @crit = crit;
    
    END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `Publish_Gardners` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `Publish_Gardners`()
    MODIFIES SQL DATA
BEGIN
	START TRANSACTION;
	-- Boeken
	REPLACE INTO Boeken ( Feedcode, Ean, NaamUitgever, Titel, Ondertitel, Titelserie, Bindwijze,  onixbindwijze, Samenvatting, PublishingStatus, ProductAvailability, BoekStatus, Verschijningsdatum, Taalvermelding )
	SELECT 'gardners', Ean, B.`naamuitgever`, titel, ondertitel, B.`titelserie`, F.`Bindwijze`, B.`onixbindwijze`, B.`samenvatting`,
	A.`PublishingStatus` , A.`ProductAvailability`,A.`BoekStatus`, CONCAT( SUBSTR(verschijningsdatum,1,4),'-',SUBSTR(verschijningsdatum,5,2),'-',SUBSTR(verschijningsdatum,7,2) ),
	coalesce( Taalvermelding, 'English' )
	FROM Feed_Gardners_Boeken B
	JOIN ONIX2Availability A ON ( A.`AvailabilityCode` = B.`productavailability` )
	JOIN ONIX2ProductForm F ON ( B.`onixbindwijze` = F.`ProductForm` )
	LEFT JOIN bic ON ( bic.`_Value` = B.`biccode` )
	WHERE Ean LIKE "9%" AND NOT Bindwijze IS NULL;
	
	-- Auteurs
	REPLACE INTO BoekAuteurs ( FeedCode, Ean, AuteurPositie, AuteurVolledigenaam ) SELECT 'gardners', Ean, 1, auteur1 FROM Feed_Gardners_Boeken WHERE NOT auteur1 IS NULL;
	REPLACE INTO BoekAuteurs ( FeedCode, Ean, AuteurPositie, AuteurVolledigenaam ) SELECT 'gardners', Ean, 2, auteur2 FROM Feed_Gardners_Boeken WHERE NOT auteur2 IS NULL;
	REPLACE INTO BoekAuteurs ( FeedCode, Ean, AuteurPositie, AuteurVolledigenaam ) SELECT 'gardners', Ean, 3, auteur3 FROM Feed_Gardners_Boeken WHERE NOT auteur3 IS NULL;
	
	-- Rubrieken
	REPLACE INTO Boekbic SELECT 'gardners', Ean, B.`biccode`, NULL, NOW(), NULL FROM Feed_Gardners_Boeken B WHERE NOT B.`biccode` IS NULL;
	COMMIT;
    END ;;
DELIMITER ;

--
-- Current Database: `Functions`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Functions` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `Functions`;

--
-- Temporary table structure for view `Active_locks`
--

/*!50001 DROP VIEW IF EXISTS `Active_locks`*/;
/*!50001 CREATE TABLE `Active_locks` (
  `Requesting_transaction` tinyint NOT NULL,
  `Requesting_thread_id` tinyint NOT NULL,
  `Requesting_Query` tinyint NOT NULL,
  `Wants_Lock` tinyint NOT NULL,
  `Wants_Data` tinyint NOT NULL,
  `Wants_Mode` tinyint NOT NULL,
  `Blocking_Transaction` tinyint NOT NULL,
  `Blocking_thread_id` tinyint NOT NULL,
  `Blocking_Query` tinyint NOT NULL,
  `Uses_Lock` tinyint NOT NULL,
  `Uses_Data` tinyint NOT NULL,
  `Uses_Mode` tinyint NOT NULL,
  `Lock_Time` tinyint NOT NULL,
  `DT` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `Active_metalocks`
--

/*!50001 DROP VIEW IF EXISTS `Active_metalocks`*/;
/*!50001 CREATE TABLE `Active_metalocks` (
  `THREAD_ID` tinyint NOT NULL,
  `USER` tinyint NOT NULL,
  `QUERY` tinyint NOT NULL,
  `LOCK_MODE` tinyint NOT NULL,
  `LOCK_TYPE` tinyint NOT NULL,
  `LOCK_TABLES` tinyint NOT NULL,
  `LOCK_DURATION` tinyint NOT NULL,
  `DURATION` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Dumping routines for database 'Functions'
--
/*!50003 DROP FUNCTION IF EXISTS `levenshtein` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` FUNCTION `levenshtein`( s1 VARCHAR(255), s2 VARCHAR(255) ) RETURNS int(11)
    DETERMINISTIC
BEGIN
	RETURN dameraulevenshtein( s1, s2 );
/*    DECLARE s1_len, s2_len, i, j, c, c_temp, cost INT;
    DECLARE s1_char CHAR;
    -- max strlen=255
    DECLARE cv0, cv1 VARBINARY(256);
    SET s1_len = CHAR_LENGTH(s1), s2_len = CHAR_LENGTH(s2), cv1 = 0x00, j = 1, i = 1, c = 0;
    IF s1 = s2 THEN
      RETURN 0;
    ELSEIF s1_len = 0 THEN
      RETURN s2_len;
    ELSEIF s2_len = 0 THEN
      RETURN s1_len;
    ELSE
      WHILE j <= s2_len DO
        SET cv1 = CONCAT(cv1, UNHEX(HEX(j))), j = j + 1;
      END WHILE;
      WHILE i <= s1_len DO
        SET s1_char = SUBSTRING(s1, i, 1), c = i, cv0 = UNHEX(HEX(i)), j = 1;
        WHILE j <= s2_len DO
          SET c = c + 1;
          IF s1_char = SUBSTRING(s2, j, 1) THEN 
            SET cost = 0; ELSE SET cost = 1;
          END IF;
          SET c_temp = CONV(HEX(SUBSTRING(cv1, j, 1)), 16, 10) + cost;
          IF c > c_temp THEN SET c = c_temp; END IF;
            SET c_temp = CONV(HEX(SUBSTRING(cv1, j+1, 1)), 16, 10) + 1;
            IF c > c_temp THEN 
              SET c = c_temp; 
            END IF;
            SET cv0 = CONCAT(cv0, UNHEX(HEX(c))), j = j + 1;
        END WHILE;
        SET cv1 = cv0, i = i + 1;
      END WHILE;
    END IF;
    RETURN c; */
  END ;;
DELIMITER ;

--
-- Current Database: `Gridline`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Gridline` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Gridline`;

--
-- Table structure for table `BoekenInGridline`
--

CREATE TABLE `BoekenInGridline` (
  `Ean` char(13) NOT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `ClassifyResults`
--

CREATE TABLE `ClassifyResults` (
  `EAN` char(13) NOT NULL,
  `Bron` enum('epub','txt','pdf') NOT NULL,
  `JSON` longtext NOT NULL,
  `DT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Results` tinyint(4) NOT NULL,
  PRIMARY KEY (`EAN`,`Bron`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `KeesZegt`
--

CREATE TABLE `KeesZegt` (
  `EAN` char(13) NOT NULL,
  `Bron` enum('epub','txt','pdf') NOT NULL,
  `Verdict` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`EAN`,`Bron`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `KeywordsMetTfIdf`
--

/*!50001 DROP VIEW IF EXISTS `KeywordsMetTfIdf`*/;
/*!50001 CREATE TABLE `KeywordsMetTfIdf` (
  `Trefwoord` tinyint NOT NULL,
  `EAN` tinyint NOT NULL,
  `Bron` tinyint NOT NULL,
  `EchteTfIdf` tinyint NOT NULL,
  `Frequency` tinyint NOT NULL,
  `DF` tinyint NOT NULL,
  `IDF` tinyint NOT NULL,
  `IDFNORM` tinyint NOT NULL,
  `TFLOG` tinyint NOT NULL,
  `TFNORM` tinyint NOT NULL,
  `EchteTfIdfOud` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Mapping`
--

CREATE TABLE `Mapping` (
  `Gridline` char(13) NOT NULL,
  `Ean` char(13) NOT NULL,
  KEY `Gridline` (`Gridline`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `MaxFrequency`
--

CREATE TABLE `MaxFrequency` (
  `Ean` char(13) NOT NULL,
  `Bron` enum('epub','txt','pdf') NOT NULL,
  `MaxFrequency` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`,`Bron`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `ProductKeywords`
--

CREATE TABLE `ProductKeywords` (
  `EAN` char(13) NOT NULL,
  `Bron` enum('epub','txt','pdf') NOT NULL,
  `Trefwoord` char(50) NOT NULL,
  `TfIdf` decimal(10,5) DEFAULT NULL,
  `Frequency` int(11) DEFAULT NULL,
  PRIMARY KEY (`EAN`,`Bron`,`Trefwoord`),
  KEY `Trefwoord` (`Trefwoord`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Synoniemen`
--

CREATE TABLE `Synoniemen` (
  `Ean` char(13) NOT NULL,
  `Bron` enum('epub','txt','pdf') NOT NULL,
  `Trefwoord` varchar(50) NOT NULL,
  `Alternative` varchar(50) NOT NULL,
  PRIMARY KEY (`Ean`,`Bron`,`Trefwoord`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `TrefwoordIdf`
--

CREATE TABLE `TrefwoordIdf` (
  `Trefwoord` varchar(255) NOT NULL,
  `DF` int(11) DEFAULT NULL,
  `IDF` double DEFAULT NULL,
  PRIMARY KEY (`Trefwoord`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `solr_classifications`
--

CREATE TABLE `solr_classifications` (
  `ean` char(13) NOT NULL,
  `payloads` mediumtext,
  PRIMARY KEY (`ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping routines for database 'Gridline'
--
/*!50003 DROP PROCEDURE IF EXISTS `bereken_idf` */;
DELIMITER ;;
CREATE DEFINER=`sander`@`%` PROCEDURE `bereken_idf`()
BEGIN
  DECLARE M DOUBLE;
  
  DELETE FROM TrefwoordIdf;
  
  REPLACE INTO TrefwoordIdf 
  SELECT 
    Trefwoord,
    COUNT(DISTINCT Ean),
    LOG10(
      (SELECT COUNT(DISTINCT Ean) FROM Gridline.`ProductKeywords`) / COUNT(DISTINCT Ean)
    ) AS IDF 
  FROM
    Gridline.`ProductKeywords` 
  WHERE LENGTH(Trefwoord) > 2 
  GROUP BY Trefwoord;
  
  SELECT MAX(IDF) INTO M FROM TrefwoordIdf;
  
  UPDATE TrefwoordIdf SET IDF = IDF / M;
  
  REPLACE INTO MaxFrequency SELECT Ean, Bron, MAX(Frequency) FROM ProductKeywords GROUP BY Ean, Bron;
END ;;
DELIMITER ;

--
-- Current Database: `Jongbloed_Aanmaningen`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Jongbloed_Aanmaningen` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Jongbloed_Aanmaningen`;

--
-- Table structure for table `Aanmaningen`
--

CREATE TABLE `Aanmaningen` (
  `Klantid` double NOT NULL,
  `Opmerkingen` longtext,
  `LaatsteBrief` date DEFAULT NULL,
  PRIMARY KEY (`Klantid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Aanmaningen_Jan15`
--

CREATE TABLE `Aanmaningen_Jan15` (
  `ID` bigint(20) DEFAULT NULL,
  `Factuurrelatie_id` double DEFAULT NULL,
  `Factuurrelatie_naam` varchar(255) DEFAULT NULL,
  `Afleverrelatie_id` double DEFAULT NULL,
  `Selectiecode` double DEFAULT NULL,
  `Afleverrelatie_naam` varchar(255) DEFAULT NULL,
  `Afleveradres` varchar(255) DEFAULT NULL,
  `Factuurdatum` timestamp(6) NULL DEFAULT NULL,
  `Valuta_omschrijving` varchar(255) DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL,
  `Administratie_omschrijving` varchar(255) DEFAULT NULL,
  `Factuurperiode_eenheid` varchar(255) DEFAULT NULL,
  `Afleverplaats` varchar(255) DEFAULT NULL,
  `F14` varchar(255) DEFAULT NULL,
  `Totaal` double DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Creditbalances`
--

CREATE TABLE `Creditbalances` (
  `CoCd` smallint(4) unsigned DEFAULT NULL,
  `Account` int(11) unsigned DEFAULT NULL,
  `Name` varchar(31) DEFAULT NULL,
  `Assign_` mediumint(11) unsigned DEFAULT NULL,
  `Reference` bigint(11) unsigned DEFAULT NULL,
  `DocumentNo` bigint(11) unsigned DEFAULT NULL,
  `Loc` tinytext,
  `Typ` tinytext,
  `Doc_Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `Postedon` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Netduedt` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  `LCur2` tinytext,
  `Amtloc_curr_2` float DEFAULT NULL,
  `Text` tinytext,
  `SCN` char(13) DEFAULT NULL,
  `SumOfSCN` char(0) DEFAULT NULL,
  `Status` char(0) DEFAULT NULL,
  `OudJB` char(2) DEFAULT NULL,
  `MainCustomerNr` int(11) unsigned DEFAULT NULL,
  `MainCustomerGroup` varchar(31) DEFAULT NULL,
  `Agingbucket` varchar(20) DEFAULT NULL,
  `StatusNov20` char(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `DocumentenNodig`
--

CREATE TABLE `DocumentenNodig` (
  `DocumentNo` bigint(20) NOT NULL,
  PRIMARY KEY (`DocumentNo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `NAW`
--

CREATE TABLE `NAW` (
  `Account` int(11) NOT NULL,
  `Bedrijfsnaam` varchar(255) DEFAULT NULL,
  `Bedrijfsnaam2` varchar(255) DEFAULT NULL,
  `Afdeling` varchar(255) DEFAULT NULL,
  `Geslacht` varchar(255) DEFAULT NULL,
  `Voornaam` varchar(255) DEFAULT NULL,
  `Achternaam` varchar(255) DEFAULT NULL,
  `Adres` varchar(255) DEFAULT NULL,
  `Postcode` varchar(255) DEFAULT NULL,
  `Plaats` varchar(255) DEFAULT NULL,
  `Telefoon` varchar(255) DEFAULT NULL,
  `Fax` varchar(255) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  `Notities` longtext,
  `Geblokkeerd` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`Account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Nieuwe_Posten`
--

CREATE TABLE `Nieuwe_Posten` (
  `ID` double DEFAULT NULL,
  `Factuurrelatieid` double DEFAULT NULL,
  `Factuurrelatienaam` varchar(255) DEFAULT NULL,
  `Afleverrelatieid` double DEFAULT NULL,
  `Selectiecode` double DEFAULT NULL,
  `Afleverrelatienaam` varchar(255) DEFAULT NULL,
  `Afleveradres` varchar(255) DEFAULT NULL,
  `Factuurdatum` timestamp(6) NULL DEFAULT NULL,
  `Valuta` varchar(255) DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL,
  `Administratie` varchar(255) DEFAULT NULL,
  `Factuurperiode` varchar(255) DEFAULT NULL,
  `Afleverhuisnummer` double DEFAULT NULL,
  `Huisnummertoevoeging` varchar(255) DEFAULT NULL,
  `Afleverpostcode` varchar(255) DEFAULT NULL,
  `Afleverplaats` varchar(255) DEFAULT NULL,
  `Totaal` double DEFAULT NULL,
  `F18` varchar(255) DEFAULT NULL,
  `F19` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OutstandingDebt`
--

CREATE TABLE `OutstandingDebt` (
  `CoCd` smallint(4) unsigned DEFAULT NULL,
  `Account` int(11) unsigned DEFAULT NULL,
  `Name` varchar(32) DEFAULT NULL,
  `Assign` mediumint(11) unsigned DEFAULT NULL,
  `Reference` bigint(11) unsigned NOT NULL,
  `DocumentNo` bigint(11) unsigned NOT NULL,
  `Loc` tinytext,
  `Typ` tinytext,
  `Doc_Date` date NOT NULL DEFAULT '0000-00-00',
  `Postedon` date NOT NULL DEFAULT '0000-00-00',
  `Netduedt` date NOT NULL DEFAULT '0000-00-00',
  `LCur2` tinytext,
  `Amtloc_curr_2` decimal(12,2) DEFAULT NULL,
  `Text` tinytext,
  `SCN` char(0) DEFAULT NULL,
  `SumOfSCN` char(0) DEFAULT NULL,
  `Status` enum('open','closed') DEFAULT NULL,
  `OudJB` char(3) DEFAULT NULL,
  `MainCustomerNr` int(11) unsigned DEFAULT NULL,
  `MainCustomerGroup` varchar(37) DEFAULT NULL,
  `Agingbucket` varchar(20) DEFAULT NULL,
  `StatusNov20` char(4) DEFAULT NULL,
  `Betaald` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betaald_MP` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Oninbaar` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betwist` decimal(10,2) NOT NULL DEFAULT '0.00',
  `DTGeprint` date DEFAULT NULL,
  `FactuurNotitie` text,
  PRIMARY KEY (`DocumentNo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OutstandingDebt_0513`
--

CREATE TABLE `OutstandingDebt_0513` (
  `CoCd` smallint(4) unsigned DEFAULT NULL,
  `Account` int(11) unsigned DEFAULT NULL,
  `Name` varchar(32) DEFAULT NULL,
  `Assign` mediumint(11) unsigned DEFAULT NULL,
  `Reference` bigint(11) unsigned NOT NULL,
  `DocumentNo` bigint(11) unsigned NOT NULL,
  `Loc` tinytext,
  `Typ` tinytext,
  `Doc_Date` date NOT NULL DEFAULT '0000-00-00',
  `Postedon` date NOT NULL DEFAULT '0000-00-00',
  `Netduedt` date NOT NULL DEFAULT '0000-00-00',
  `LCur2` tinytext,
  `Amtloc_curr_2` decimal(12,2) DEFAULT NULL,
  `Text` tinytext,
  `SCN` char(0) DEFAULT NULL,
  `SumOfSCN` char(0) DEFAULT NULL,
  `Status` enum('open','closed') DEFAULT NULL,
  `OudJB` char(3) DEFAULT NULL,
  `MainCustomerNr` int(11) unsigned DEFAULT NULL,
  `MainCustomerGroup` varchar(37) DEFAULT NULL,
  `Agingbucket` varchar(20) DEFAULT NULL,
  `StatusNov20` char(4) DEFAULT NULL,
  `Betaald` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betaald_MP` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Oninbaar` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betwist` decimal(10,2) NOT NULL DEFAULT '0.00',
  `DTGeprint` date DEFAULT NULL,
  `FactuurNotitie` text,
  PRIMARY KEY (`DocumentNo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OutstandingDebt_0518`
--

CREATE TABLE `OutstandingDebt_0518` (
  `CoCd` smallint(4) unsigned DEFAULT NULL,
  `Account` int(11) unsigned DEFAULT NULL,
  `Name` varchar(32) DEFAULT NULL,
  `Assign` mediumint(11) unsigned DEFAULT NULL,
  `Reference` bigint(11) unsigned NOT NULL,
  `DocumentNo` bigint(11) unsigned NOT NULL,
  `Loc` tinytext,
  `Typ` tinytext,
  `Doc_Date` date NOT NULL DEFAULT '0000-00-00',
  `Postedon` date NOT NULL DEFAULT '0000-00-00',
  `Netduedt` date NOT NULL DEFAULT '0000-00-00',
  `LCur2` tinytext,
  `Amtloc_curr_2` decimal(12,2) DEFAULT NULL,
  `Text` tinytext,
  `SCN` char(0) DEFAULT NULL,
  `SumOfSCN` char(0) DEFAULT NULL,
  `Status` enum('open','closed') DEFAULT NULL,
  `OudJB` char(3) DEFAULT NULL,
  `MainCustomerNr` int(11) unsigned DEFAULT NULL,
  `MainCustomerGroup` varchar(37) DEFAULT NULL,
  `Agingbucket` varchar(20) DEFAULT NULL,
  `StatusNov20` char(4) DEFAULT NULL,
  `Betaald` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betaald_MP` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Oninbaar` decimal(10,2) NOT NULL DEFAULT '0.00',
  `Betwist` decimal(10,2) NOT NULL DEFAULT '0.00',
  `DTGeprint` date DEFAULT NULL,
  `FactuurNotitie` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `PDF`
--

CREATE TABLE `PDF` (
  `Book` int(11) DEFAULT NULL,
  `Account` int(11) DEFAULT NULL,
  `Book2` int(11) NOT NULL,
  `Account2` int(11) NOT NULL,
  `DocumentNo` bigint(20) DEFAULT NULL,
  `Invoice` bigint(20) NOT NULL,
  `Path` varchar(255) DEFAULT NULL,
  `NoPages` int(11) DEFAULT NULL,
  PRIMARY KEY (`Invoice`,`Book2`,`Account2`),
  KEY `DocumentNo` (`DocumentNo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `_Jongbloed_Sept14`
--

CREATE TABLE `_Jongbloed_Sept14` (
  `ID` double DEFAULT NULL,
  `Factuurrelatie id` double DEFAULT NULL,
  `Factuurrelatie naam` varchar(255) DEFAULT NULL,
  `Afleverrelatie id` double DEFAULT NULL,
  `Selectiecode` double DEFAULT NULL,
  `Afleverrelatie naam` varchar(255) DEFAULT NULL,
  `Afleveradres` varchar(255) DEFAULT NULL,
  `Factuurdatum` timestamp(6) NULL DEFAULT NULL,
  `Valuta omschrijving` varchar(255) DEFAULT NULL,
  `Status` varchar(255) DEFAULT NULL,
  `Administratie omschrijving` varchar(255) DEFAULT NULL,
  `Factuurperiode eenheid` varchar(255) DEFAULT NULL,
  `Afleverplaats` varchar(255) DEFAULT NULL,
  `F14` varchar(255) DEFAULT NULL,
  `Totaal` double DEFAULT NULL,
  `F16` varchar(255) DEFAULT NULL,
  `F17` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `_NAW`
--

CREATE TABLE `_NAW` (
  `Account` double NOT NULL,
  `Bedrijfsnaam` varchar(255) DEFAULT NULL,
  `Bedrijfsnaam2` varchar(255) DEFAULT NULL,
  `Afdeling` varchar(255) DEFAULT NULL,
  `Geslacht` varchar(255) DEFAULT NULL,
  `Voornaam` varchar(255) DEFAULT NULL,
  `Achternaam` varchar(255) DEFAULT NULL,
  `Adres` varchar(255) DEFAULT NULL,
  `Postcode` varchar(255) DEFAULT NULL,
  `Plaats` varchar(255) DEFAULT NULL,
  `Telefoon` varchar(255) DEFAULT NULL,
  `Fax` varchar(255) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Account`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `_NAW_NEW`
--

CREATE TABLE `_NAW_NEW` (
  `Account` varchar(255) DEFAULT NULL,
  `Bedrijfsnaam` varchar(255) NOT NULL,
  `Bedrijfsnaam2` varchar(255) NOT NULL,
  `Afdeling` varchar(255) NOT NULL,
  `Afdeling2` varchar(255) NOT NULL,
  `Straat` varchar(255) NOT NULL,
  `Huisnummer` varchar(255) NOT NULL,
  `Plaats` varchar(255) NOT NULL,
  `Postcode` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `iDealBetaald`
--

CREATE TABLE `iDealBetaald` (
  `Invoice` bigint(20) NOT NULL,
  PRIMARY KEY (`Invoice`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping routines for database 'Jongbloed_Aanmaningen'
--

--
-- Current Database: `Jongbloed_Diversen`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Jongbloed_Diversen` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Jongbloed_Diversen`;

--
-- Table structure for table `IngeklaardeBoeken_04_2015`
--

CREATE TABLE `IngeklaardeBoeken_04_2015` (
  `Ean` varchar(13) CHARACTER SET latin1 DEFAULT NULL,
  `TijdelijkeValuta` varchar(3) NOT NULL DEFAULT '',
  `TijdelijkePrijs` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'Ook nog echte prijstabel',
  `aanbiedingsprijs` int(1) NOT NULL DEFAULT '0',
  `vink_gedaan` int(1) NOT NULL DEFAULT '0',
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping routines for database 'Jongbloed_Diversen'
--

--
-- Current Database: `Juridica`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Juridica` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `Juridica`;

--
-- Table structure for table `Auteurs`
--

CREATE TABLE `Auteurs` (
  `Auteurid` int(11) NOT NULL AUTO_INCREMENT,
  `Auteur` varchar(150) NOT NULL,
  `ManpoAuteurId` int(11) NOT NULL,
  PRIMARY KEY (`Auteurid`)
) ENGINE=InnoDB AUTO_INCREMENT=8075 DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekJuridica`
--

CREATE TABLE `BoekJuridica` (
  `Ean` char(13) NOT NULL DEFAULT '',
  `JuridicaCode` char(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`Ean`,`JuridicaCode`),
  KEY `JuridicaCode` (`JuridicaCode`),
  CONSTRAINT `BoekJuridica_ibfk_2` FOREIGN KEY (`JuridicaCode`) REFERENCES `JuridicaCodering` (`JuridicaCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekVervangtEAN`
--

CREATE TABLE `BoekVervangtEAN` (
  `EAN` char(15) NOT NULL,
  `Vervangt` char(15) NOT NULL,
  PRIMARY KEY (`EAN`,`Vervangt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Collecties`
--

CREATE TABLE `Collecties` (
  `CollectieId` int(11) NOT NULL AUTO_INCREMENT,
  `OrganisatieId` int(11) DEFAULT NULL,
  `Naam` varchar(200) DEFAULT NULL,
  `Omschrijving` text,
  `JbCollectieID` int(11) DEFAULT NULL,
  PRIMARY KEY (`CollectieId`),
  UNIQUE KEY `JbCollectieID` (`JbCollectieID`),
  KEY `OrganisatieId` (`OrganisatieId`),
  CONSTRAINT `Collecties_ibfk_1` FOREIGN KEY (`OrganisatieId`) REFERENCES `Managementboek_Klanten`.`Organisaties` (`OrganisatieId`)
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8;

--
-- Table structure for table `Exemplaren`
--

CREATE TABLE `Exemplaren` (
  `ExemplaarId` int(11) NOT NULL AUTO_INCREMENT,
  `EAN` char(13) NOT NULL,
  `CollectieId` int(11) NOT NULL,
  `Stamboeknummer` varchar(50) NOT NULL,
  `Locatie` varchar(100) NOT NULL,
  `Opmerking` text NOT NULL,
  PRIMARY KEY (`ExemplaarId`),
  KEY `EAN` (`EAN`),
  KEY `EAN_2` (`EAN`,`CollectieId`),
  KEY `CollectieId` (`CollectieId`),
  KEY `Collectie_Stamboek` (`CollectieId`,`Stamboeknummer`),
  CONSTRAINT `Exemplaren_ibfk_1` FOREIGN KEY (`CollectieId`) REFERENCES `Collecties` (`CollectieId`)
) ENGINE=InnoDB AUTO_INCREMENT=142936 DEFAULT CHARSET=utf8;

--
-- Table structure for table `Exemplaren_copy`
--

CREATE TABLE `Exemplaren_copy` (
  `ExemplaarId` int(11) NOT NULL AUTO_INCREMENT,
  `EAN` char(13) NOT NULL,
  `CollectieId` int(11) NOT NULL,
  `Stamboeknummer` varchar(50) NOT NULL,
  `Locatie` varchar(100) NOT NULL,
  `Opmerking` text NOT NULL,
  PRIMARY KEY (`ExemplaarId`),
  KEY `EAN` (`EAN`),
  KEY `EAN_2` (`EAN`,`CollectieId`),
  KEY `OrganisatieId` (`CollectieId`,`Stamboeknummer`),
  KEY `CollectieId` (`CollectieId`)
) ENGINE=InnoDB AUTO_INCREMENT=142398 DEFAULT CHARSET=utf8;

--
-- Table structure for table `JuridicaCodering`
--

CREATE TABLE `JuridicaCodering` (
  `JuridicaCode` char(10) NOT NULL DEFAULT '',
  `JuridicaOmschrijving` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`JuridicaCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `NieuweDrukkenUitsluiten`
--

CREATE TABLE `NieuweDrukkenUitsluiten` (
  `EAN` varchar(13) NOT NULL,
  `nd_Ean` varchar(13) NOT NULL,
  `CollectieId` int(11) NOT NULL,
  PRIMARY KEY (`EAN`,`nd_Ean`,`CollectieId`),
  KEY `nd_Ean` (`nd_Ean`),
  KEY `CollectieId` (`CollectieId`),
  CONSTRAINT `NieuweDrukkenUitsluiten_ibfk_1` FOREIGN KEY (`EAN`) REFERENCES `Manpo`.`Boeken` (`Ean`),
  CONSTRAINT `NieuweDrukkenUitsluiten_ibfk_2` FOREIGN KEY (`nd_Ean`) REFERENCES `Manpo`.`Boeken` (`Ean`),
  CONSTRAINT `NieuweDrukkenUitsluiten_ibfk_3` FOREIGN KEY (`CollectieId`) REFERENCES `Collecties` (`CollectieId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OrderregelBlacklist`
--

CREATE TABLE `OrderregelBlacklist` (
  `OrderregelID` int(11) NOT NULL,
  PRIMARY KEY (`OrderregelID`),
  CONSTRAINT `OrderregelBlacklist_ibfk_1` FOREIGN KEY (`OrderregelID`) REFERENCES `Managementboek_Klanten`.`Bestellingen` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Deze orderregels zijn bekeken en eventueel toegevoegd aan collecties';

--
-- Table structure for table `OrganisatieCodering`
--

CREATE TABLE `OrganisatieCodering` (
  `OrganisatieId` int(11) NOT NULL,
  `Code` varchar(200) NOT NULL,
  `Omschrijving` varchar(200) NOT NULL,
  PRIMARY KEY (`OrganisatieId`,`Code`),
  CONSTRAINT `OrganisatieCodering_ibfk_1` FOREIGN KEY (`OrganisatieId`) REFERENCES `Managementboek_Klanten`.`Organisaties` (`OrganisatieId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OrganisatieTitels`
--

CREATE TABLE `OrganisatieTitels` (
  `EAN` char(13) NOT NULL,
  `OrganisatieId` int(11) NOT NULL,
  `Titel` varchar(200) DEFAULT NULL,
  `Auteur` varchar(200) DEFAULT NULL,
  `Uitgever` varchar(200) DEFAULT NULL,
  `Jaaruitgifte` year(4) DEFAULT NULL,
  `Opmerking` varchar(255) DEFAULT NULL,
  `Editie` varchar(10) DEFAULT NULL,
  `Serie` varchar(40) DEFAULT NULL,
  `Seriedeel` varchar(10) DEFAULT NULL,
  `JbArtikelID` int(11) DEFAULT NULL,
  PRIMARY KEY (`EAN`,`OrganisatieId`),
  KEY `OrganisatieId` (`OrganisatieId`),
  KEY `JbArtikelID` (`JbArtikelID`),
  CONSTRAINT `OrganisatieTitels_ibfk_1` FOREIGN KEY (`OrganisatieId`) REFERENCES `Managementboek_Klanten`.`Organisaties` (`OrganisatieId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `OrganisatieTitels_copy`
--

CREATE TABLE `OrganisatieTitels_copy` (
  `EAN` char(13) NOT NULL,
  `OrganisatieId` int(11) NOT NULL,
  `Titel` varchar(200) DEFAULT NULL,
  `Auteur` varchar(200) DEFAULT NULL,
  `Uitgever` varchar(200) DEFAULT NULL,
  `Jaaruitgifte` year(4) DEFAULT NULL,
  `Opmerking` varchar(255) DEFAULT NULL,
  `Editie` varchar(10) DEFAULT NULL,
  `Serie` varchar(40) DEFAULT NULL,
  `Seriedeel` varchar(10) DEFAULT NULL,
  `JbArtikelID` int(11) DEFAULT NULL,
  PRIMARY KEY (`EAN`,`OrganisatieId`),
  KEY `OrganisatieId` (`OrganisatieId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `TitelOrganisatieCodering`
--

CREATE TABLE `TitelOrganisatieCodering` (
  `EAN` char(13) NOT NULL,
  `OrganisatieId` int(11) NOT NULL,
  `Code` varchar(200) NOT NULL,
  PRIMARY KEY (`EAN`,`OrganisatieId`),
  KEY `CollectieId` (`OrganisatieId`,`Code`),
  KEY `EAN` (`EAN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Titels`
--

CREATE TABLE `Titels` (
  `EAN` char(13) NOT NULL,
  `Titel` varchar(200) DEFAULT NULL,
  `Uitgever` varchar(200) DEFAULT NULL,
  `Jaaruitgifte` year(4) DEFAULT NULL,
  `Opmerking` varchar(255) DEFAULT NULL,
  `Editie` varchar(10) DEFAULT NULL,
  `Serie` varchar(40) DEFAULT NULL,
  `Seriedeel` varchar(10) DEFAULT NULL,
  `Samenvatting` text,
  `Taalvermelding` varchar(10) DEFAULT NULL,
  `Voorletters` varchar(50) DEFAULT NULL,
  `Tussenvoegsel` varchar(50) DEFAULT NULL,
  `Achternaam` varchar(200) DEFAULT NULL,
  `Auteur` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`EAN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Titels_copy`
--

CREATE TABLE `Titels_copy` (
  `EAN` char(13) NOT NULL,
  `Titel` varchar(200) DEFAULT NULL,
  `Auteur` varchar(200) DEFAULT NULL,
  `Uitgever` varchar(200) DEFAULT NULL,
  `Jaaruitgifte` year(4) DEFAULT NULL,
  `Opmerking` varchar(255) DEFAULT NULL,
  `Editie` varchar(10) DEFAULT NULL,
  `Serie` varchar(40) DEFAULT NULL,
  `Seriedeel` varchar(10) DEFAULT NULL,
  `Samenvatting` text,
  `Taalvermelding` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`EAN`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Uitgevers_map`
--

CREATE TABLE `Uitgevers_map` (
  `Uitgever` varchar(75) NOT NULL,
  `UitgeverID` int(11) DEFAULT NULL,
  PRIMARY KEY (`Uitgever`),
  KEY `UitgeverID` (`UitgeverID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `drukken_isbns`
--

CREATE TABLE `drukken_isbns` (
  `artikelnummer` varchar(15) DEFAULT NULL,
  `isbn` varchar(15) DEFAULT NULL,
  KEY `artikelnummer` (`artikelnummer`),
  KEY `isbn` (`isbn`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `fitware_series`
--

CREATE TABLE `fitware_series` (
  `seriekode` varchar(8) NOT NULL DEFAULT '',
  `omschrijving` varchar(50) NOT NULL DEFAULT '',
  `zoeknaam` varchar(12) NOT NULL DEFAULT '',
  `externe_omschrijving` varchar(50) NOT NULL DEFAULT '',
  `logveld` varchar(18) NOT NULL DEFAULT '',
  `nugicode` varchar(8) NOT NULL DEFAULT '',
  `rwcode` varchar(8) NOT NULL DEFAULT '',
  `actueel_jn` char(1) NOT NULL DEFAULT '',
  `reserve_1` char(1) NOT NULL DEFAULT '',
  `reserve_2` char(1) NOT NULL DEFAULT '',
  `reserve_3` char(1) NOT NULL DEFAULT '',
  `gewijzigd_tijdstip` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`seriekode`),
  FULLTEXT KEY `omschrijving` (`seriekode`,`omschrijving`),
  FULLTEXT KEY `omschrijving_2` (`omschrijving`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Temporary table structure for view `nieuwe_Drukken`
--

/*!50001 DROP VIEW IF EXISTS `nieuwe_Drukken`*/;
/*!50001 CREATE TABLE `nieuwe_Drukken` (
  `CollectieId` tinyint NOT NULL,
  `aantal` tinyint NOT NULL,
  `EAN` tinyint NOT NULL,
  `Druk` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Verschijningsdatum` tinyint NOT NULL,
  `nd_EAN` tinyint NOT NULL,
  `nd_Druk` tinyint NOT NULL,
  `nd_Verschijningsdatum` tinyint NOT NULL,
  `nd_Titel` tinyint NOT NULL,
  `Uitgesloten` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Temporary table structure for view `v_Exemplaren`
--

/*!50001 DROP VIEW IF EXISTS `v_Exemplaren`*/;
/*!50001 CREATE TABLE `v_Exemplaren` (
  `ExemplaarId` tinyint NOT NULL,
  `EAN` tinyint NOT NULL,
  `CollectieId` tinyint NOT NULL,
  `Stamboeknummer` tinyint NOT NULL,
  `Locatie` tinyint NOT NULL,
  `Opmerking` tinyint NOT NULL,
  `OrganisatieId` tinyint NOT NULL,
  `JbCollectieID` tinyint NOT NULL,
  `Titel` tinyint NOT NULL,
  `Auteur` tinyint NOT NULL,
  `inManpo` tinyint NOT NULL,
  `inCB` tinyint NOT NULL,
  `inFeeds` tinyint NOT NULL,
  `inOudeJongbloed` tinyint NOT NULL,
  `inGrijzeBoeken` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Dumping routines for database 'Juridica'
--

--
-- Current Database: `Juridischboek_Boeken`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Juridischboek_Boeken` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `Juridischboek_Boeken`;

--
-- Table structure for table `Artikelauteurs`
--

CREATE TABLE `Artikelauteurs` (
  `Id` int(11) DEFAULT NULL,
  `Artikelid` int(11) NOT NULL DEFAULT '0',
  `Recensentid` int(11) NOT NULL DEFAULT '0',
  KEY `i1` (`Id`),
  KEY `i2` (`Artikelid`),
  KEY `i3` (`Recensentid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Artikelen`
--

CREATE TABLE `Artikelen` (
  `Id` int(11) DEFAULT NULL,
  `Editieid` int(11) DEFAULT NULL,
  `Titel` varchar(120) NOT NULL DEFAULT '',
  `Ondertitel` varchar(255) DEFAULT NULL,
  `Bronvermelding` varchar(255) DEFAULT NULL,
  `Urlbron` text,
  `Hoofdean` char(13) DEFAULT NULL,
  `Artikeltekst` text,
  `Aanmaakdatum` date NOT NULL DEFAULT '0000-00-00',
  `Laatstgewijzigd` date NOT NULL DEFAULT '0000-00-00',
  KEY `i1` (`Id`),
  KEY `i2` (`Editieid`),
  KEY `i3` (`Hoofdean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Artikelgroep`
--

CREATE TABLE `Artikelgroep` (
  `Id` int(11) NOT NULL,
  `Artgroep` char(4) NOT NULL,
  `Defaultbtwcode` char(1) DEFAULT NULL,
  `Omschrijving` char(50) DEFAULT NULL,
  `Artikelgroep_grootboekrekening` int(11) DEFAULT NULL,
  PRIMARY KEY (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Artikelsubeans`
--

CREATE TABLE `Artikelsubeans` (
  `Id` int(11) DEFAULT NULL,
  `Artikelid` int(11) NOT NULL DEFAULT '0',
  `Subean` char(13) NOT NULL,
  KEY `i1` (`Id`),
  KEY `i2` (`Artikelid`),
  KEY `i3` (`Subean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Auteurs`
--

CREATE TABLE `Auteurs` (
  `Auteurid` int(11) NOT NULL,
  `Achternaam` varchar(150) NOT NULL DEFAULT '',
  `Voorletters` varchar(50) DEFAULT NULL,
  `Voorvoegsels` varchar(20) DEFAULT NULL,
  `Voornaam` varchar(150) DEFAULT NULL,
  `Email` varchar(255) DEFAULT NULL,
  `Steltprijsopemail` smallint(6) DEFAULT NULL,
  `Omschrijving` text,
  `Website` text,
  `Websitelinken` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`Auteurid`),
  KEY `i1` (`Auteurid`),
  KEY `i2` (`Achternaam`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Temporary table structure for view `Auteurs_met_naam`
--

/*!50001 DROP VIEW IF EXISTS `Auteurs_met_naam`*/;
/*!50001 CREATE TABLE `Auteurs_met_naam` (
  `Auteurid` tinyint NOT NULL,
  `Achternaam` tinyint NOT NULL,
  `Voorletters` tinyint NOT NULL,
  `Voorvoegsels` tinyint NOT NULL,
  `Voornaam` tinyint NOT NULL,
  `Email` tinyint NOT NULL,
  `Steltprijsopemail` tinyint NOT NULL,
  `Omschrijving` tinyint NOT NULL,
  `Website` tinyint NOT NULL,
  `Websitelinken` tinyint NOT NULL,
  `VolledigeNaam` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Bindwijze`
--

CREATE TABLE `Bindwijze` (
  `Bindwijze` char(50) NOT NULL,
  `Btwcode` char(1) NOT NULL DEFAULT '4',
  `Artgroepid` int(11) NOT NULL,
  `Unspsc` char(50) DEFAULT NULL,
  `Productsoort` char(50) DEFAULT NULL,
  `Isgewist` int(11) DEFAULT NULL,
  `Bindwijze_boekstatus` int(11) DEFAULT NULL,
  `Porto` smallint(6) DEFAULT NULL,
  `Evenement` smallint(6) DEFAULT NULL,
  `Download` smallint(6) DEFAULT NULL,
  `Voorraadartikel` smallint(6) DEFAULT NULL,
  `Inpakken` smallint(6) DEFAULT NULL,
  `Ideal` smallint(6) DEFAULT NULL,
  `Socialdrm` smallint(6) DEFAULT NULL,
  `Bindwijze_unspsc` char(50) DEFAULT NULL,
  `Bindwijze_productsoort` char(50) DEFAULT NULL,
  `Bindwijze_porto` smallint(6) DEFAULT NULL,
  `Bindwijze_evenement` smallint(6) DEFAULT NULL,
  `Bindwijze_download` smallint(6) DEFAULT NULL,
  `Bindwijze_voorraadartikel` smallint(6) DEFAULT NULL,
  `Bindwijze_inpakken` smallint(6) DEFAULT NULL,
  `Bindwijze_ideal` smallint(6) DEFAULT NULL,
  `Bindwijze_socialdrm` smallint(6) DEFAULT NULL,
  `Bindwijze_url` char(50) DEFAULT NULL,
  `Bindwijze_producttype` char(100) DEFAULT NULL,
  `Bindwijze_lidwoord` char(20) DEFAULT NULL,
  `Bindwijze_enkelvoud` char(100) DEFAULT NULL,
  `Bindwijze_meervoud` char(100) DEFAULT NULL,
  `Bindwijze_grootboekrekening` int(11) DEFAULT NULL,
  PRIMARY KEY (`Bindwijze`),
  KEY `NewIndex1` (`Productsoort`),
  KEY `Productsoort` (`Bindwijze_productsoort`),
  KEY `Producttype` (`Bindwijze_producttype`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BindwijzeVertaling`
--

CREATE TABLE `BindwijzeVertaling` (
  `Bindwijze` varchar(255) NOT NULL,
  `Vertaling` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`Bindwijze`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BoekLocatie`
--

CREATE TABLE `BoekLocatie` (
  `Ean` char(13) CHARACTER SET ascii NOT NULL DEFAULT '',
  `Magazijnlocatie` char(4) DEFAULT NULL,
  `Magazijnpad` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `Magazijnlocatie` (`Magazijnlocatie`),
  KEY `Magazijnpad` (`Magazijnpad`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `BoekQuotes`
--

CREATE TABLE `BoekQuotes` (
  `quoteId` int(11) NOT NULL AUTO_INCREMENT,
  `Ean` char(13) CHARACTER SET ascii DEFAULT NULL,
  `quote` text,
  PRIMARY KEY (`quoteId`)
) ENGINE=InnoDB AUTO_INCREMENT=959 DEFAULT CHARSET=utf8;

--
-- Table structure for table `BoekThemas`
--

CREATE TABLE `BoekThemas` (
  `Ean` char(13) NOT NULL,
  `Thema` char(20) NOT NULL,
  PRIMARY KEY (`Ean`,`Thema`),
  KEY `NewIndex1` (`Thema`),
  KEY `NewIndex2` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boekanderebindwijzen`
--

CREATE TABLE `Boekanderebindwijzen` (
  `Ean` char(13) NOT NULL,
  `Eangekoppeld` char(13) NOT NULL,
  PRIMARY KEY (`Ean`,`Eangekoppeld`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boekbrieven`
--

CREATE TABLE `Boekbrieven` (
  `Brief_id` int(11) NOT NULL DEFAULT '0',
  `Brieftitel` char(255) NOT NULL DEFAULT '',
  `Omschrijving` char(255) DEFAULT NULL,
  `Volgorde` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`Brief_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boeken`
--

CREATE TABLE `Boeken` (
  `Ean` char(13) NOT NULL,
  `Uitgever` int(11) DEFAULT NULL,
  `Auteur1` int(11) DEFAULT NULL,
  `Auteur2` int(11) DEFAULT NULL,
  `Auteur3` int(11) DEFAULT NULL,
  `Enanderen` smallint(6) NOT NULL DEFAULT '0',
  `Titel` varchar(255) NOT NULL DEFAULT '',
  `Ondertitel` varchar(255) DEFAULT NULL,
  `Orgineletitel` varchar(255) DEFAULT NULL,
  `Naamserie` varchar(255) DEFAULT NULL,
  `Titelserie` varchar(255) DEFAULT NULL,
  `Editie` varchar(100) DEFAULT NULL,
  `Bindwijze` varchar(50) DEFAULT NULL,
  `Aantalblz` smallint(6) DEFAULT NULL,
  `Jaaruitgifte` smallint(6) DEFAULT NULL,
  `Valuta` varchar(4) NOT NULL DEFAULT 'EUR',
  `Prijs` double NOT NULL DEFAULT '0',
  `Aanbiedingsprijs` double DEFAULT NULL,
  `Befprijs` double DEFAULT NULL,
  `Boekstatus` smallint(6) NOT NULL DEFAULT '0',
  `Categorie` smallint(6) NOT NULL DEFAULT '0',
  `Rubriek` varchar(100) DEFAULT NULL,
  `Mlrubriek` varchar(100) DEFAULT NULL,
  `Bijzheden` varchar(255) DEFAULT NULL,
  `Inhoudsopgave` text,
  `Abstract` text,
  `Samenvatting` text,
  `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `Isgewist` smallint(6) NOT NULL DEFAULT '0',
  `Extraaandacht` smallint(6) NOT NULL DEFAULT '0',
  `Random` smallint(6) NOT NULL DEFAULT '0',
  `Pw` smallint(6) DEFAULT NULL,
  `Fem` smallint(6) DEFAULT NULL,
  `Dga` smallint(6) DEFAULT NULL,
  `Scope` smallint(6) DEFAULT NULL,
  `Nive` smallint(6) DEFAULT NULL,
  `Vink6` smallint(6) DEFAULT NULL,
  `Vink7` smallint(6) DEFAULT NULL,
  `Vink8` smallint(6) DEFAULT NULL,
  `Vink9` smallint(6) DEFAULT NULL,
  `Vink10` smallint(6) DEFAULT NULL,
  `Vink11` smallint(6) DEFAULT NULL,
  `Vink12` smallint(6) DEFAULT NULL,
  `Vink13` smallint(6) DEFAULT NULL,
  `Vink14` smallint(6) DEFAULT NULL,
  `Vink15` smallint(6) DEFAULT NULL,
  `Vink16` smallint(6) DEFAULT NULL,
  `Vink17` smallint(6) DEFAULT NULL,
  `Vink18` smallint(6) DEFAULT NULL,
  `Vink19` smallint(6) DEFAULT NULL,
  `Vink20` smallint(6) DEFAULT NULL,
  `Uploadstatus` char(1) DEFAULT NULL,
  `Jobnewsrandom` smallint(6) DEFAULT NULL,
  `Niverandom` smallint(6) DEFAULT NULL,
  `Scoperandom` smallint(6) DEFAULT NULL,
  `Pwrandom` smallint(6) DEFAULT NULL,
  `Random6` smallint(6) DEFAULT NULL,
  `Random7` smallint(6) DEFAULT NULL,
  `Random8` smallint(6) DEFAULT NULL,
  `Random9` smallint(6) DEFAULT NULL,
  `Random10` smallint(6) DEFAULT NULL,
  `Random11` smallint(6) DEFAULT NULL,
  `Random12` smallint(6) DEFAULT NULL,
  `Random13` smallint(6) DEFAULT NULL,
  `Random14` smallint(6) DEFAULT NULL,
  `Random15` smallint(6) DEFAULT NULL,
  `Vink21` smallint(6) DEFAULT NULL,
  `Vink22` smallint(6) DEFAULT NULL,
  `Vink23` smallint(6) DEFAULT NULL,
  `Vink24` smallint(6) DEFAULT NULL,
  `Vink25` smallint(6) DEFAULT NULL,
  `Vink26` smallint(6) DEFAULT NULL,
  `Vink27` smallint(6) DEFAULT NULL,
  `Vink28` smallint(6) DEFAULT NULL,
  `Vink29` smallint(6) DEFAULT NULL,
  `Vink30` smallint(6) DEFAULT NULL,
  `Vink31` smallint(6) DEFAULT NULL,
  `Vink32` smallint(6) DEFAULT NULL,
  `Vink33` smallint(6) DEFAULT NULL,
  `Vink34` smallint(6) DEFAULT NULL,
  `Vink35` smallint(6) DEFAULT NULL,
  `Vink36` smallint(6) DEFAULT NULL,
  `Vink37` smallint(6) DEFAULT NULL,
  `Vink38` smallint(6) DEFAULT NULL,
  `Vink39` smallint(6) DEFAULT NULL,
  `Vink40` smallint(6) DEFAULT NULL,
  `Random21` smallint(6) DEFAULT NULL,
  `Random22` smallint(6) DEFAULT NULL,
  `Random23` smallint(6) DEFAULT NULL,
  `Random24` smallint(6) DEFAULT NULL,
  `Random25` smallint(6) DEFAULT NULL,
  `Random26` smallint(6) DEFAULT NULL,
  `Random27` smallint(6) DEFAULT NULL,
  `Random28` smallint(6) DEFAULT NULL,
  `Random29` smallint(6) DEFAULT NULL,
  `Random30` smallint(6) DEFAULT NULL,
  `Random31` smallint(6) DEFAULT NULL,
  `Random32` smallint(6) DEFAULT NULL,
  `Random33` smallint(6) DEFAULT NULL,
  `Random34` smallint(6) DEFAULT NULL,
  `Random35` smallint(6) DEFAULT NULL,
  `Random36` smallint(6) DEFAULT NULL,
  `Random37` smallint(6) DEFAULT NULL,
  `Random38` smallint(6) DEFAULT NULL,
  `Random39` smallint(6) DEFAULT NULL,
  `Random40` smallint(6) DEFAULT NULL,
  `Taalvermelding` varchar(10) DEFAULT NULL,
  `Artgroep` varchar(4) DEFAULT NULL,
  `Aanbiedingvanaf` date DEFAULT NULL,
  `Aanbiedingtotenmet` date DEFAULT NULL,
  `Cd` smallint(6) DEFAULT NULL,
  `Laatstemutatiecbart` date DEFAULT NULL,
  `Laatstemutatiecbbesch` date DEFAULT NULL,
  `Vink1` smallint(6) DEFAULT NULL,
  `Vink2` smallint(6) DEFAULT NULL,
  `Vink3` smallint(6) DEFAULT NULL,
  `Testimonials` text,
  `Cbstatus` smallint(6) DEFAULT NULL,
  `Druk` smallint(6) DEFAULT NULL,
  `Artgroepid` int(11) DEFAULT NULL,
  `Btwcode` char(1) DEFAULT NULL,
  `Boeksoort` char(1) DEFAULT NULL,
  `Korting_0_9` double DEFAULT NULL,
  `Korting_10_29` double DEFAULT NULL,
  `Korting_30_99` double DEFAULT NULL,
  `Korting_100_249` double DEFAULT NULL,
  `Korting_250_499` double DEFAULT NULL,
  `Korting_500_999` double DEFAULT NULL,
  `Aangepastekorting_0_9` double DEFAULT NULL,
  `Aangepastekorting_10_29` double DEFAULT NULL,
  `Aangepastekorting_30_99` double DEFAULT NULL,
  `Aangepastekorting_100_249` double DEFAULT NULL,
  `Aangepastekorting_250_499` double DEFAULT NULL,
  `Aangepastekorting_500_999` double DEFAULT NULL,
  `Kortingmp` double DEFAULT NULL,
  `Aangepastekortingmp` double DEFAULT NULL,
  `Brief` varchar(255) DEFAULT NULL,
  `Vink4` smallint(6) DEFAULT NULL,
  `Vink5` smallint(6) DEFAULT NULL,
  `Btwsplitsing` smallint(6) DEFAULT NULL,
  `Prijsbtwsplitsing_normaal_nul` double DEFAULT NULL,
  `Prijsbtwsplitsing_normaal_laag` double DEFAULT NULL,
  `Prijsbtwsplitsing_normaal_hoog` double DEFAULT NULL,
  `Prijsbtwsplitsing_aanbieding_nul` double DEFAULT NULL,
  `Prijsbtwsplitsing_aanbieding_laag` double DEFAULT NULL,
  `Prijsbtwsplitsing_aanbieding_hoog` double DEFAULT NULL,
  `Productid` int(11) NOT NULL,
  `Clubprijs1` double DEFAULT NULL,
  `Clubprijs2` double DEFAULT NULL,
  `Btwcode_tbv_export` char(1) DEFAULT NULL,
  `Magazijnsoort` char(50) DEFAULT NULL,
  `Verschijningsdatum` date DEFAULT NULL,
  `Afwijkendbestelpuntid` int(11) DEFAULT NULL,
  `Afwijkendbestelwijzeid` int(11) DEFAULT NULL,
  `Isbn` char(10) DEFAULT NULL,
  `Afwijkendminimalebestelhoeveelheid` int(11) DEFAULT NULL,
  `Voorraadartikel` smallint(6) DEFAULT NULL,
  `Bestelpuntuitgeverid` int(11) DEFAULT NULL,
  `Bestelwijze` char(100) DEFAULT NULL,
  `Minimalebestelhoeveelheid` int(11) DEFAULT NULL,
  `Rubriekjuridisch` char(100) DEFAULT NULL,
  `Magazijnlocatienummer` char(20) CHARACTER SET ascii DEFAULT NULL,
  `Aangepastemagazijnlocatienummer` char(20) CHARACTER SET ascii DEFAULT NULL,
  `Hoogte` double DEFAULT NULL,
  `Breedte` double DEFAULT NULL,
  `Dikte` double DEFAULT NULL,
  `Gewicht` double DEFAULT NULL,
  `Actiesoortid` int(11) DEFAULT NULL,
  `Geenprijsupdatecb` smallint(6) DEFAULT NULL,
  `Historieovernemen` smallint(6) DEFAULT NULL,
  `Herdrukdatum` date DEFAULT NULL,
  `Nieuw` smallint(6) DEFAULT NULL,
  `Inpakken` smallint(6) DEFAULT NULL,
  `Porto` smallint(6) DEFAULT NULL,
  `Evenement` smallint(6) DEFAULT NULL,
  `Download` smallint(6) DEFAULT NULL,
  `Ideal` smallint(6) DEFAULT NULL,
  `Socialdrm` smallint(6) DEFAULT NULL,
  `Boeken_inprijsopgeheven` smallint(6) DEFAULT NULL,
  `Boeken_cvdm_gemaild` smallint(6) DEFAULT NULL,
  `Boeken_cvdm_datum` date DEFAULT NULL,
  `Boeken_cvdm_aantal` int(11) DEFAULT NULL,
  `Boeken_minimalevoorraad` int(11) DEFAULT NULL,
  `Boeken_nietmeerbestellen` smallint(6) DEFAULT NULL,
  `Boeken_afbouwen` smallint(6) DEFAULT NULL,
  `Boeken_geenporto` smallint(6) DEFAULT NULL,
  `Boeken_verborgenboek` smallint(6) DEFAULT NULL,
  `Boeken_projectcode` int(11) DEFAULT NULL,
  `Boeken_levertijd` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  UNIQUE KEY `i1` (`Ean`),
  KEY `i2` (`Uitgever`),
  KEY `i3` (`Auteur1`),
  KEY `i4` (`Auteur2`),
  KEY `i5` (`Auteur3`),
  KEY `i6` (`Jaaruitgifte`),
  KEY `i7` (`Aanbiedingsprijs`),
  KEY `i8` (`Boekstatus`),
  KEY `i9` (`Rubriek`),
  KEY `i10` (`Aanmaakdatum`),
  KEY `i11` (`Laatstgewijzigd`),
  KEY `i12` (`Isgewist`),
  KEY `i13` (`Extraaandacht`),
  KEY `i14` (`Random`),
  KEY `i15` (`Naamserie`),
  KEY `i16` (`Titelserie`),
  KEY `Titel` (`Titel`),
  KEY `NewIndex1` (`Bindwijze`),
  KEY `Aanbiedingen` (`Aanbiedingvanaf`,`Aanbiedingtotenmet`),
  KEY `Rubriek` (`Rubriek`,`Boekstatus`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BoekenExtra`
--

CREATE TABLE `BoekenExtra` (
  `Ean` char(13) NOT NULL,
  `Extra` varchar(255) NOT NULL,
  PRIMARY KEY (`Ean`,`Extra`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BoekenPrijsBuckets`
--

CREATE TABLE `BoekenPrijsBuckets` (
  `Ean` char(13) NOT NULL,
  `Extra` varchar(255) NOT NULL,
  PRIMARY KEY (`Ean`,`Extra`),
  KEY `Ean` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `BoekenSearch`
--

CREATE TABLE `BoekenSearch` (
  `Ean` char(13) NOT NULL DEFAULT '',
  `Snelzoeken` text,
  `Titelzoeken` text,
  `Samenvatting` text,
  `Rubriek` varchar(100) DEFAULT NULL,
  `Serie` varchar(255) DEFAULT NULL,
  `Jaaruitgifte` int(11) DEFAULT NULL,
  `Aanmaakdatum` date DEFAULT NULL,
  `Recensiedatum` date DEFAULT NULL,
  `Prijs` float(8,2) DEFAULT NULL,
  `Boekstatus` int(11) DEFAULT NULL,
  `Productsoort` varchar(100) DEFAULT NULL,
  `Taal` varchar(6) DEFAULT NULL,
  `Auteur1` int(11) DEFAULT NULL,
  `Auteur2` int(11) DEFAULT NULL,
  `Auteur3` int(11) DEFAULT NULL,
  `Uitgeverid` int(11) DEFAULT NULL,
  `Achternaam` varchar(150) DEFAULT NULL,
  PRIMARY KEY (`Ean`),
  KEY `Boekstatus` (`Boekstatus`),
  KEY `Productsoort` (`Productsoort`),
  KEY `Prijs` (`Prijs`),
  KEY `Rubriek` (`Rubriek`),
  KEY `Serie` (`Serie`),
  KEY `Jaaruitgifte` (`Jaaruitgifte`),
  KEY `Aanmaakdatum` (`Aanmaakdatum`),
  KEY `Recensiedatum` (`Recensiedatum`),
  KEY `Taal` (`Taal`),
  KEY `Achternaam` (`Achternaam`),
  KEY `Auteur1` (`Auteur1`),
  KEY `Auteur2` (`Auteur2`),
  KEY `Auteur3` (`Auteur3`),
  KEY `Uitgeverid` (`Uitgeverid`),
  FULLTEXT KEY `Snelzoeken` (`Snelzoeken`),
  FULLTEXT KEY `Samenvatting` (`Samenvatting`),
  FULLTEXT KEY `Titelzoeken` (`Titelzoeken`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boeken_RecensieTelling`
--

CREATE TABLE `Boeken_RecensieTelling` (
  `Ean` char(13) CHARACTER SET utf8 NOT NULL,
  `AantalRecensies` bigint(21) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Temporary table structure for view `Boeken_met_prijs`
--

/*!50001 DROP VIEW IF EXISTS `Boeken_met_prijs`*/;
/*!50001 CREATE TABLE `Boeken_met_prijs` (
  `Ean` tinyint NOT NULL,
  `HuidigeEuroPrijs` tinyint NOT NULL
) ENGINE=MyISAM */;

--
-- Table structure for table `Boekgekoppeldean`
--

CREATE TABLE `Boekgekoppeldean` (
  `Ean` char(13) NOT NULL,
  `Eangekoppeld` char(13) NOT NULL,
  KEY `i1` (`Ean`),
  KEY `i2` (`Eangekoppeld`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boekstatus_Oud`
--

CREATE TABLE `Boekstatus_Oud` (
  `Ean` char(13) NOT NULL,
  `BoekstatusOud` int(11) DEFAULT NULL,
  `BoekstatusNieuw` int(11) DEFAULT NULL,
  PRIMARY KEY (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boektrefwoorden`
--

CREATE TABLE `Boektrefwoorden` (
  `Ean` char(13) DEFAULT NULL,
  `Trefwid` int(11) DEFAULT NULL,
  `Isbn` char(10) DEFAULT NULL,
  UNIQUE KEY `Ean` (`Ean`,`Trefwid`),
  KEY `i2` (`Trefwid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Boekvervangtean`
--

CREATE TABLE `Boekvervangtean` (
  `Ean` char(13) NOT NULL,
  `Vervangtean` char(13) NOT NULL,
  PRIMARY KEY (`Ean`,`Vervangtean`),
  KEY `i2` (`Vervangtean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Btwcode`
--

CREATE TABLE `Btwcode` (
  `Omschrijving` char(50) DEFAULT NULL,
  `Btwcode` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `Btwcodeartikelgroep`
--

CREATE TABLE `Btwcodeartikelgroep` (
  `Artgroepid` int(11) NOT NULL,
  `Btwcode` char(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Editieeans`
--

CREATE TABLE `Editieeans` (
  `Id` int(11) DEFAULT NULL,
  `Editieid` int(11) NOT NULL DEFAULT '0',
  `Ean` char(13) NOT NULL,
  KEY `i1` (`Id`),
  KEY `i2` (`Editieid`),
  KEY `i3` (`Ean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Edities`
--

CREATE TABLE `Edities` (
  `Id` int(11) DEFAULT NULL,
  `Naam` varchar(50) NOT NULL DEFAULT '',
  `Verschijningsdatum` date DEFAULT NULL,
  `Aanmaakdatum` date NOT NULL DEFAULT '0000-00-00',
  `Laatstgewijzigd` date NOT NULL DEFAULT '0000-00-00',
  KEY `i1` (`Id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Evenementartikelen`
--

CREATE TABLE `Evenementartikelen` (
  `Id` int(11) NOT NULL DEFAULT '0',
  `Ean` char(13) NOT NULL,
  `Artikelid` int(11) NOT NULL DEFAULT '0',
  `Evenementnummer` char(13) DEFAULT NULL,
  KEY `i1` (`Id`),
  KEY `i2` (`Ean`),
  KEY `i3` (`Artikelid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Evenementauteurs`
--

CREATE TABLE `Evenementauteurs` (
  `Id` int(11) NOT NULL DEFAULT '0',
  `Ean` char(13) NOT NULL,
  `Auteurid` int(11) NOT NULL DEFAULT '0',
  `Evenementnummer` char(13) DEFAULT NULL,
  KEY `i1` (`Id`),
  KEY `i2` (`Ean`),
  KEY `i3` (`Auteurid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `Evenementeans`
--

CREATE TABLE `Evenementeans` (
  `Id` int(11) NOT NULL DEFAULT '0',
  `Ean` char(13) NOT NULL,
  `Evenementean` char(13) NOT NULL,
  `Evenementnummer` char(13) DEFAULT NULL,
  KEY `i1` (`Id`),
  KEY `i2` (`Ean`),
  KEY `i3` (`Evenementean`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
