text: -- MariaDB dump 10.17  Distrib 10.4.10-MariaDB, for Win64 (AMD64)
  --
  -- Host: 127.0.0.1    Database: dbloja
  -- ------------------------------------------------------
  -- Server version	10.4.10-MariaDB
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `categoria`
  --
  
  DROP TABLE IF EXISTS `categoria`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `categoria` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `descricao` varchar(45) NOT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `categoria`
  --
  
  LOCK TABLES `categoria` WRITE;
  /*!40000 ALTER TABLE `categoria` DISABLE KEYS */;
  INSERT INTO `categoria` VALUES (1,'Roupa'),(2,'Roupas'),(3,'Comida');
  /*!40000 ALTER TABLE `categoria` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `produto`
  --
  
  DROP TABLE IF EXISTS `produto`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `produto` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `descricao` varchar(100) NOT NULL,
    `qtd` int(11) NOT NULL,
    `valor` float NOT NULL,
    `categoria_id` int(11) NOT NULL,
    PRIMARY KEY (`id`),
    KEY `categoria_id` (`categoria_id`)
  ) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `produto`
  --
  
  LOCK TABLES `produto` WRITE;
  /*!40000 ALTER TABLE `produto` DISABLE KEYS */;
  INSERT INTO `produto` VALUES (1,'Feijão',20,20,1),(2,'Arroz',20,20,1),(4,'Farinha',40,40,3);
  /*!40000 ALTER TABLE `produto` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Temporary table structure for view `vw_produtocategoria`
  --
  
  DROP TABLE IF EXISTS `vw_produtocategoria`;
  /*!50001 DROP VIEW IF EXISTS `vw_produtocategoria`*/;
  SET @saved_cs_client     = @@character_set_client;
  SET character_set_client = utf8;
  /*!50001 CREATE TABLE `vw_produtocategoria` (
    `pid` tinyint NOT NULL,
    `pdesc` tinyint NOT NULL,
    `qtd` tinyint NOT NULL,
    `valor` tinyint NOT NULL,
    `categoria_id` tinyint NOT NULL,
    `cid` tinyint NOT NULL,
    `cdes` tinyint NOT NULL
  ) ENGINE=MyISAM */;
  SET character_set_client = @saved_cs_client;
  
  --
  -- Final view structure for view `vw_produtocategoria`
  --
  
  /*!50001 DROP TABLE IF EXISTS `vw_produtocategoria`*/;
  /*!50001 DROP VIEW IF EXISTS `vw_produtocategoria`*/;
  /*!50001 SET @saved_cs_client          = @@character_set_client */;
  /*!50001 SET @saved_cs_results         = @@character_set_results */;
  /*!50001 SET @saved_col_connection     = @@collation_connection */;
  /*!50001 SET character_set_client      = utf8mb4 */;
  /*!50001 SET character_set_results     = utf8mb4 */;
  /*!50001 SET collation_connection      = utf8mb4_general_ci */;
  /*!50001 CREATE ALGORITHM=UNDEFINED */
  /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
  /*!50001 VIEW `vw_produtocategoria` AS select `p`.`id` AS `pid`,`p`.`descricao` AS `pdesc`,`p`.`qtd` AS `qtd`,`p`.`valor` AS `valor`,`p`.`categoria_id` AS `categoria_id`,`c`.`id` AS `cid`,`c`.`descricao` AS `cdes` from (`produto` `p` join `categoria` `c` on(`c`.`id` = `p`.`categoria_id`)) */;
  /*!50001 SET character_set_client      = @saved_cs_client */;
  /*!50001 SET character_set_results     = @saved_cs_results */;
  /*!50001 SET collation_connection      = @saved_col_connection */;
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2020-04-20 15:44:11
  