text: -- MySQL dump 10.13  Distrib 8.0.28, for macos11 (arm64)
  --
  -- Host: localhost    Database: business_db
  -- ------------------------------------------------------
  -- Server version	8.0.28
  
  /*!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 */;
  /*!50503 SET NAMES utf8mb4 */;
  /*!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 `department`
  --
  
  DROP TABLE IF EXISTS `department`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `department` (
    `id` int NOT NULL AUTO_INCREMENT,
    `name` varchar(30) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `department`
  --
  
  LOCK TABLES `department` WRITE;
  /*!40000 ALTER TABLE `department` DISABLE KEYS */;
  INSERT INTO `department` VALUES (1,'finance'),(2,'sales'),(8,'marketting'),(9,'Information technology'),(10,'operations'),(15,'legal'),(16,'entertainment'),(17,'technical'),(18,'public relation');
  /*!40000 ALTER TABLE `department` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `employee`
  --
  
  DROP TABLE IF EXISTS `employee`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `employee` (
    `id` int NOT NULL AUTO_INCREMENT,
    `first_name` varchar(30) DEFAULT NULL,
    `last_name` varchar(30) DEFAULT NULL,
    `role_id` int DEFAULT NULL,
    `manager_id` int DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `role_id` (`role_id`),
    KEY `manager_id` (`manager_id`),
    CONSTRAINT `employee_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`),
    CONSTRAINT `employee_ibfk_2` FOREIGN KEY (`manager_id`) REFERENCES `employee` (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `employee`
  --
  
  LOCK TABLES `employee` WRITE;
  /*!40000 ALTER TABLE `employee` DISABLE KEYS */;
  INSERT INTO `employee` VALUES (1,'bobby','cheema',1,NULL),(2,'balli','Singh',11,1),(3,'chris','anderson',11,1),(4,'david','boon',1,NULL),(5,'edison','aliva',2,4),(6,'johney','singh',1,NULL),(7,'phil','thomson',13,4);
  /*!40000 ALTER TABLE `employee` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `role`
  --
  
  DROP TABLE IF EXISTS `role`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `role` (
    `id` int NOT NULL AUTO_INCREMENT,
    `title` varchar(30) DEFAULT NULL,
    `salary` decimal(11,2) DEFAULT NULL,
    `department_id` int DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `department_id` (`department_id`),
    CONSTRAINT `role_ibfk_1` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`) ON DELETE SET NULL
  ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `role`
  --
  
  LOCK TABLES `role` WRITE;
  /*!40000 ALTER TABLE `role` DISABLE KEYS */;
  INSERT INTO `role` VALUES (1,'manager',80000.00,1),(2,'supervisor',50000.00,2),(10,'team leader',20000.00,10),(11,'advisor',30000.00,2),(12,'helper',10000.00,10),(13,'electrician',20000.00,17);
  /*!40000 ALTER TABLE `role` ENABLE KEYS */;
  UNLOCK TABLES;
  /*!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 2022-02-23  7:36:02
  