Added updated database_a2 file.

This commit is contained in:
K 2024-11-01 02:25:10 +05:30
parent 0c887415b3
commit ebe898535f
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -23,12 +23,12 @@ DROP TABLE IF EXISTS `Account`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Account` ( CREATE TABLE `Account` (
`accountNum` int NOT NULL, `acc_no` int NOT NULL,
`branchName` varchar(50) DEFAULT NULL, `branch_name` varchar(255) DEFAULT NULL,
`balance` int DEFAULT NULL, `balance` int DEFAULT NULL,
PRIMARY KEY (`accountNum`), PRIMARY KEY (`acc_no`),
KEY `branchName` (`branchName`), KEY `branch_name` (`branch_name`),
CONSTRAINT `Account_ibfk_1` FOREIGN KEY (`branchName`) REFERENCES `Branch` (`branchName`) CONSTRAINT `Account_ibfk_1` FOREIGN KEY (`branch_name`) REFERENCES `Branch` (`branch_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -38,7 +38,7 @@ CREATE TABLE `Account` (
LOCK TABLES `Account` WRITE; LOCK TABLES `Account` WRITE;
/*!40000 ALTER TABLE `Account` DISABLE KEYS */; /*!40000 ALTER TABLE `Account` DISABLE KEYS */;
INSERT INTO `Account` VALUES (2501,'Dhole Patil',5000),(2511,'Nagarwala',1500),(2512,'Bishops',5000),(2521,'Peachtree',2000),(2531,'Amanora',1000); INSERT INTO `Account` VALUES (101,'Akurdi',15000),(102,'Nigdi',8000),(103,'Kharadi',20000),(104,'Hadapsar',12000),(105,'Viman Nagar',5000);
/*!40000 ALTER TABLE `Account` ENABLE KEYS */; /*!40000 ALTER TABLE `Account` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -50,12 +50,12 @@ DROP TABLE IF EXISTS `Borrower`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Borrower` ( CREATE TABLE `Borrower` (
`customerName` varchar(50) DEFAULT NULL, `cust_name` varchar(255) DEFAULT NULL,
`loanNum` int DEFAULT NULL, `loan_no` int DEFAULT NULL,
KEY `customerName` (`customerName`), KEY `cust_name` (`cust_name`),
KEY `loanNum` (`loanNum`), KEY `loan_no` (`loan_no`),
CONSTRAINT `Borrower_ibfk_1` FOREIGN KEY (`customerName`) REFERENCES `Customer` (`customerName`), CONSTRAINT `Borrower_ibfk_1` FOREIGN KEY (`cust_name`) REFERENCES `Customer` (`cust_name`),
CONSTRAINT `Borrower_ibfk_2` FOREIGN KEY (`loanNum`) REFERENCES `Loan` (`loanNum`) CONSTRAINT `Borrower_ibfk_2` FOREIGN KEY (`loan_no`) REFERENCES `Loan` (`loan_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -65,7 +65,7 @@ CREATE TABLE `Borrower` (
LOCK TABLES `Borrower` WRITE; LOCK TABLES `Borrower` WRITE;
/*!40000 ALTER TABLE `Borrower` DISABLE KEYS */; /*!40000 ALTER TABLE `Borrower` DISABLE KEYS */;
INSERT INTO `Borrower` VALUES ('Kalas',156),('Mehul',158),('Tanmay',155),('Kshitij',157),('Aditya',159),('Himanshu',158); INSERT INTO `Borrower` VALUES ('Mehul',202),('Tanmay',203),('Aditya',205);
/*!40000 ALTER TABLE `Borrower` ENABLE KEYS */; /*!40000 ALTER TABLE `Borrower` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -77,10 +77,10 @@ DROP TABLE IF EXISTS `Branch`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Branch` ( CREATE TABLE `Branch` (
`branchName` varchar(50) NOT NULL, `branch_name` varchar(255) NOT NULL,
`branchCity` varchar(50) DEFAULT NULL, `branch_city` varchar(255) DEFAULT NULL,
`assets` int DEFAULT NULL, `assets` int DEFAULT NULL,
PRIMARY KEY (`branchName`) PRIMARY KEY (`branch_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -90,7 +90,7 @@ CREATE TABLE `Branch` (
LOCK TABLES `Branch` WRITE; LOCK TABLES `Branch` WRITE;
/*!40000 ALTER TABLE `Branch` DISABLE KEYS */; /*!40000 ALTER TABLE `Branch` DISABLE KEYS */;
INSERT INTO `Branch` VALUES ('Amanora','Hadapsar',60000),('Bishops','Nigdi',10000),('Dhole Patil','Kharadi',50000),('Nagarwala','Akurdi',20000),('Peachtree','Wakad',35000); INSERT INTO `Branch` VALUES ('Akurdi','Pune',5000000),('Hadapsar','Pune',3500000),('Kharadi','Pune',4000000),('Nigdi','Pune',3000000),('Viman Nagar','Pune',4500000);
/*!40000 ALTER TABLE `Branch` ENABLE KEYS */; /*!40000 ALTER TABLE `Branch` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -102,10 +102,10 @@ DROP TABLE IF EXISTS `Customer`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Customer` ( CREATE TABLE `Customer` (
`customerName` varchar(50) NOT NULL, `cust_name` varchar(255) NOT NULL,
`customerStreet` varchar(50) DEFAULT NULL, `cust_street` varchar(255) DEFAULT NULL,
`customerCity` varchar(50) DEFAULT NULL, `cust_city` varchar(255) DEFAULT NULL,
PRIMARY KEY (`customerName`) PRIMARY KEY (`cust_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -115,7 +115,7 @@ CREATE TABLE `Customer` (
LOCK TABLES `Customer` WRITE; LOCK TABLES `Customer` WRITE;
/*!40000 ALTER TABLE `Customer` DISABLE KEYS */; /*!40000 ALTER TABLE `Customer` DISABLE KEYS */;
INSERT INTO `Customer` VALUES ('Aditya','Mira RD','Mumbai'),('Himanshu','Smart City','Nandurbar'),('Kalas','Airport Road','Pune'),('Kshitij','Hadapasar','Pune'),('Mehul','Shahdha','Nandurbar'),('Tanmay','Porwal Road','Pune'); INSERT INTO `Customer` VALUES ('Aditya','Street 5','Pune'),('Kalas','Street 1','Pune'),('Kshitij','Street 4','Pune'),('Mehul','Street 2','Pune'),('Tanmay','Street 3','Pune');
/*!40000 ALTER TABLE `Customer` ENABLE KEYS */; /*!40000 ALTER TABLE `Customer` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -127,12 +127,12 @@ DROP TABLE IF EXISTS `Depositor`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Depositor` ( CREATE TABLE `Depositor` (
`customerName` varchar(50) DEFAULT NULL, `cust_name` varchar(255) DEFAULT NULL,
`accountNum` int DEFAULT NULL, `acc_no` int DEFAULT NULL,
KEY `customerName` (`customerName`), KEY `cust_name` (`cust_name`),
KEY `accountNum` (`accountNum`), KEY `acc_no` (`acc_no`),
CONSTRAINT `Depositor_ibfk_1` FOREIGN KEY (`customerName`) REFERENCES `Customer` (`customerName`), CONSTRAINT `Depositor_ibfk_1` FOREIGN KEY (`cust_name`) REFERENCES `Customer` (`cust_name`),
CONSTRAINT `Depositor_ibfk_2` FOREIGN KEY (`accountNum`) REFERENCES `Account` (`accountNum`) CONSTRAINT `Depositor_ibfk_2` FOREIGN KEY (`acc_no`) REFERENCES `Account` (`acc_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -142,7 +142,7 @@ CREATE TABLE `Depositor` (
LOCK TABLES `Depositor` WRITE; LOCK TABLES `Depositor` WRITE;
/*!40000 ALTER TABLE `Depositor` DISABLE KEYS */; /*!40000 ALTER TABLE `Depositor` DISABLE KEYS */;
INSERT INTO `Depositor` VALUES ('Kalas',2511),('Mehul',2512),('Tanmay',2501),('Kshitij',2521),('Aditya',2531),('Himanshu',2512); INSERT INTO `Depositor` VALUES ('Kalas',101),('Mehul',102),('Tanmay',103),('Kshitij',101),('Aditya',104);
/*!40000 ALTER TABLE `Depositor` ENABLE KEYS */; /*!40000 ALTER TABLE `Depositor` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -154,12 +154,12 @@ DROP TABLE IF EXISTS `Loan`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `Loan` ( CREATE TABLE `Loan` (
`loanNum` int NOT NULL, `loan_no` int NOT NULL,
`branchName` varchar(50) DEFAULT NULL, `branch_name` varchar(255) DEFAULT NULL,
`amount` int DEFAULT NULL, `amount` int DEFAULT NULL,
PRIMARY KEY (`loanNum`), PRIMARY KEY (`loan_no`),
KEY `branchName` (`branchName`), KEY `branch_name` (`branch_name`),
CONSTRAINT `Loan_ibfk_1` FOREIGN KEY (`branchName`) REFERENCES `Branch` (`branchName`) CONSTRAINT `Loan_ibfk_1` FOREIGN KEY (`branch_name`) REFERENCES `Branch` (`branch_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
@ -169,7 +169,7 @@ CREATE TABLE `Loan` (
LOCK TABLES `Loan` WRITE; LOCK TABLES `Loan` WRITE;
/*!40000 ALTER TABLE `Loan` DISABLE KEYS */; /*!40000 ALTER TABLE `Loan` DISABLE KEYS */;
INSERT INTO `Loan` VALUES (155,'Dhole Patil',500),(156,'Nagarwala',250),(157,'Peachtree',600),(158,'Bishops',1400),(159,'Amanora',25000); INSERT INTO `Loan` VALUES (201,'Akurdi',15000),(202,'Nigdi',13000),(203,'Kharadi',25000),(204,'Hadapsar',18000),(205,'Akurdi',1400);
/*!40000 ALTER TABLE `Loan` ENABLE KEYS */; /*!40000 ALTER TABLE `Loan` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -182,4 +182,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2024-07-31 16:22:17 -- Dump completed on 2024-10-31 20:54:27