uppliers` varchar (20) DEFAULT NULL, KEY (`ID`)
) ENGINE = InnoDB AUTO_INCREMENT = 6 DEFAULT CHARSET = koi8r;
-------------------------- structure for test
-------------------------- TABLE IF EXISTS `test`; TABLE `test` (
`ID` int (11) NOT NULL AUTO_INCREMENT,
`ts` int (11) DEFAULT NULL, KEY (`ID`)
) ENGINE = InnoDB AUTO_INCREMENT = 9 DEFAULT CHARSET = latin1;
-------------------------- structure for type
-------------------------- TABLE IF EXISTS `type`; TABLE `type` (
`ID` int (11) NOT NULL AUTO_INCREMENT,
`Name_type` varchar (20) DEFAULT NULL, KEY (`ID`)
) ENGINE = InnoDB AUTO_INCREMENT = 6 DEFAULT CHARSET = koi8r;
-------------------------- structure for type_ex
-------------------------- TABLE IF EXISTS `type_ex`; TABLE `type_ex` (
`ID` int (11) NOT NULL AUTO_INCREMENT,
`Type_ID` int (11) DEFAULT NULL,
`Metall_ID` int (11) DEFAULT NULL,
`Metall_weight` int (11) DEFAULT NULL,
`Stone_ID` int (11) DEFAULT NULL,
`Stone_weight` int (11) DEFAULT NULL, KEY (`ID`), `FK_4` (`Type_ID`), `FK_5` (`Metall_ID`), `FK_6` (`Stone_ID` ), `FK_6` FOREIGN KEY (`Stone_ID`) REFERENCES `stone` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE, `FK_4` FOREIGN KEY (`Type_ID`) REFERENCES `type` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE, `FK_5` FOREIGN KEY (`Metall_ID`) REFERENCES `metall` (`ID`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 5 DEFAULT CHARSET = koi8r;
-------------------------- structure for v_prod
-------------------------- VIEW IF EXISTS `v_prod`; ALGORITHM = UNDEFINED DEFINER = `root` @ `%` SQL SECURITY DEFINER VIEW `v_prod` AS select `production`. `ID` AS `ID`, `production`. `Name` AS `Name`, `manufacturer`. `Name_manufacturer` AS `Name_manufacturer`, `metall`. `Name_metall` AS `Name_metall`, `type_ex`. `Metall_weight` AS `Metall_weight`, `stone`. `Name_stone` AS `Name_stone`, `type_ex`. `Stone_weight` AS `Stone_weight`, `suppliers`. `Name_suppliers` AS `Name_suppliers`, `type`. `Name_type` AS `Name_type` from ((((((`production` join `manufacturer`) join `suppliers`) join `type_ex`) join `type`) join `metall`) join `stone`) where (( `production`. `Type_ex_ID` = `type_ex`. `ID`) and (`production`. `ID_supplier` = `suppliers`. `ID`) and (`production`. `ID_manufacturer` = `manufacturer`. `ID `) and (` type_ex `.` Type_ID `=` type `.` ID `) and (` type_ex `.` Metall_ID `=` metall `.` ID `) and (` type_ex `.` Stone_ID `=` stone `.` ID `) and (_utf8'' = _utf8''));
...