0% found this document useful (0 votes)
89 views4 pages

DBMS Project

This document contains the SQL code to create a database called "project" containing several tables: category_details, expenditure, expenditure_analysis, and member_details. The category_details and member_details tables contain basic data, while expenditure contains transactional data with foreign keys to the other tables. Expenditure_analysis is defined but no data is inserted.

Uploaded by

Anuj Tilekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
89 views4 pages

DBMS Project

This document contains the SQL code to create a database called "project" containing several tables: category_details, expenditure, expenditure_analysis, and member_details. The category_details and member_details tables contain basic data, while expenditure contains transactional data with foreign keys to the other tables. Expenditure_analysis is defined but no data is inserted.

Uploaded by

Anuj Tilekar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

CREATE DATABASE IF NOT EXISTS `project` /*!

40100 DEFAULT CHARACTER SET utf8mb4


COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `project`;
-- MySQL dump 10.13 Distrib 8.0.26, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: project
-- ------------------------------------------------------
-- Server version 8.0.27

/*!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 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 `category_details`
--

DROP TABLE IF EXISTS `category_details`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `category_details` (
`Category_id` int NOT NULL AUTO_INCREMENT,
`Category_Name` varchar(20) DEFAULT NULL,
PRIMARY KEY (`Category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `category_details`
--

LOCK TABLES `category_details` WRITE;


/*!40000 ALTER TABLE `category_details` DISABLE KEYS */;
INSERT INTO `category_details` VALUES (1,'Medical'),(2,'Stationary'),(3,'Grocery'),
(4,'Clothing'),(5,'Electronics'),(6,'others');
/*!40000 ALTER TABLE `category_details` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `expenditure`
--

DROP TABLE IF EXISTS `expenditure`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `expenditure` (
`Member_id` int DEFAULT NULL,
`Category_id` int DEFAULT NULL,
`Category_Name` varchar(20) DEFAULT NULL,
`Product_Name` varchar(20) DEFAULT NULL,
`Price` decimal(10,0) DEFAULT NULL,
`Date` date DEFAULT NULL,
`Quantity` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `expenditure`
--

LOCK TABLES `expenditure` WRITE;


/*!40000 ALTER TABLE `expenditure` DISABLE KEYS */;
INSERT INTO `expenditure` VALUES (1,1,'Medical','Telmac AM ',98,'2022-02-08',2),
(2,2,'Stationary','Calculator',400,'2022-04-08',1),
(3,3,'Grocery','Vegetables',120,'2022-04-08',3),(4,4,'Clothing','T-
Shirt',450,'2022-04-09',1),(5,5,'Electronics','Bulb',220,'2022-04-09',2),
(6,6,'others','Furniture',5000,'2022-04-10',1),
(1,2,'Stationary','Notebooks',80,'2022-04-11',4),(2,3,'Grocery','Pulses',55,'2022-
04-11',2),(3,4,'Clothing','Jeans',800,'2022-04-11',2),(4,5,'Electronics','Arduino
UNO',660,'2022-04-12',1),(5,6,'others','Access',12000,'2022-04-12',1),
(6,1,'Medical','Cough syrup',180,'2022-02-12',1),
(1,3,'Grocery','Vegetables',300,'2022-02-13',4),(2,4,'Clothing','Kurta',1200,'2022-
02-13',1),(3,5,'Electronics','Washing Machine',8000,'2022-02-13',1),
(4,6,'others','Football',400,'2022-02-14',2),(5,1,'Medical','One All',19,'2022-02-
14',5),(6,2,'Stationary','Text books',300,'2022-02-14',2),(1,4,'Clothing','All
Style hoodie',880,'2022-02-15',2),(2,5,'Electronics','Arduino Nano',300,'2022-02-
15',1),(3,6,'others','Sofa Set ',18000,'2022-02-17',1),
(4,1,'Medical','Omez',50,'2022-02-17',3),(5,2,'Stationary','Pen',20,'2022-02-
18',2),(6,3,'Grocery','Vegetables',220,'2022-02-18',2),
(1,5,'Electronics','Bluetooth Module',250,'2022-02-18',1),
(2,6,'others','Mop',300,'2022-02-19',1),(3,1,'Medical','Revital',180,'2022-02-
19',2),(4,2,'Stationary','Pencils Box',100,'2022-02-20',1),
(5,3,'Grocery','Vegetables',48,'2022-02-21',2),(6,4,'Clothing','Jeans',800,'2022-
02-21',1),(1,1,'Medical','Sanitizer',80,'2022-02-20',1),
(2,2,'Stationary','Notebooks',400,'2022-02-22',1),(3,3,'Grocery','Bread',45,'2022-
02-23',1),(4,4,'Clothing','Kurta ',800,'2022-02-24',1),(5,5,'Electronics','LD293
Motor Driver',150,'2022-02-25',1),(6,6,'others','Curtains',700,'2022-02-26',1),
(1,2,'Stationary','Marker ',20,'2022-02-26',1),(2,3,'Grocery','Milk',55,'2022-02-
27',1),(3,4,'Clothing','Hoodie',1200,'2022-02-27',1),
(4,5,'Electronics','Resister',5,'2022-02-27',1),(5,6,'others','Cold
Coffee',40,'2022-02-28',1),(6,1,'Medical','Pain Killers',80,'2022-03-01',1),
(1,3,'Grocery','Fruits',120,'2022-03-02',1),(2,4,'Clothing','Jacket',999,'2022-03-
03',1),(3,5,'Electronics','ESP32',140,'2022-03-03',1),
(4,6,'others','Spectacles',559,'2022-03-04',1),(5,1,'Medical','Oxymeter
',400,'2022-03-04',1),(6,2,'Stationary','Textbooks',599,'2022-03-07',1),
(1,4,'Clothing','Track pant',400,'2022-03-08',1),
(2,5,'Electronics','hc05',280,'2022-03-09',1),(3,1,'Medical','Mask',3,'2022-03-
10',1),(4,2,'Stationary','Writing pad',120,'2022-03-12',1),
(5,3,'Grocery','Vegetables',100,'2022-04-10',1),
(6,4,'Clothing','Converse',1200,'2022-03-10',1),(1,5,'Electronics','IR
sensor',120,'2022-03-10',1),(2,6,'others','Chocolate',25,'2022-03-11',1),
(3,1,'Medical','Crocin 450',60,'2022-03-12',1),
(4,2,'Stationary','Notebooks',120,'2022-03-11',1),
(4,3,'Grocery','Coconut',40,'2022-03-12',1),(5,4,'Clothing','Jeans',800,'2022-03-
12',1),(6,5,'Electronics','Node MCU ',300,'2022-03-11',1),
(1,1,'Medical','Sanitizer',120,'2022-03-13',1),(2,2,'Stationary','Pencils
Box',80,'2022-03-13',11),(3,3,'Grocery','Fruits',60,'2022-03-14',1),
(4,4,'Clothing','T shirt',400,'2022-03-14',1),
(5,5,'Electronics','Potentiometer',50,'2022-03-15',1),
(6,6,'others','Mouse',350,'2022-03-15',1),(1,2,'Stationary','Notebooks',40,'2022-
03-15',1),(2,3,'Grocery','Fruits',40,'2022-03-16',1),
(3,4,'Clothing','Hoodie',1200,'2022-03-17',1),(4,5,'Electronics','PIR
Sensor',220,'2022-03-17',1),(5,6,'others','Goggles',4000,'2022-03-18',1),
(6,1,'Medical','Odonil',70,'2022-03-19',1),(1,3,'Grocery','Milk',55,'2022-03-
19',1),(2,4,'Clothing','Shoes',800,'2022-03-19',1),
(3,5,'Electronics','TV',45000,'2022-03-20',1),(4,6,'others','watch',3000,'2022-03-
21',1),(5,1,'Medical','Shampoo',67,'2022-03-22',1),(6,2,'Stationary','Compass
box',120,'2022-03-21',1),(1,4,'Clothing','All Style head gear',200,'2022-03-22',1),
(2,5,'Electronics','Raspberry pie',4000,'2022-05-23',1),(3,6,'others','BO
Wheels',25,'2022-03-22',4),(4,1,'Medical','Eno',10,'2022-03-23',5),
(5,2,'Stationary','Full Scape pages',80,'2022-03-24',1),
(6,3,'Grocery','Vegetables',50,'2022-03-24',1),
(1,5,'Electronics','Buzzer',50,'2022-03-24',1),(2,1,'Medical','Omez',67,'2022-03-
24',1),(3,2,'Stationary','Pen',5,'2022-03-25',5),(4,3,'Grocery','Fruits',50,'2022-
03-26',2),(5,4,'Clothing','Shirt',100,'2022-03-25',1),
(6,5,'Electronics','CPU',18000,'2022-03-27',1),(1,1,'Medical','Telmac AM',33,'2022-
03-28',3),(2,2,'Stationary','Textbooks',300,'2022-03-28',1),
(3,3,'Grocery','Milk',55,'2022-03-29',1),(4,4,'Clothing','blazer',2000,'2022-03-
29',1),(5,5,'Electronics','Remote',440,'2022-05-30',1),(6,6,'others','Mobile
Cover',50,'2022-03-29',1),(1,2,'Stationary','Books',350,'2022-03-29',1),
(2,3,'Grocery','Fruits',120,'2022-03-30',2),(3,4,'Clothing','Kurta',1800,'2022-03-
30',1),(4,5,'Electronics','Arduino UNO',600,'2022-03-31',1),(5,6,'others','Movie
Tickets',99,'2022-03-31',2);
/*!40000 ALTER TABLE `expenditure` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `expenditure_analysis`
--

DROP TABLE IF EXISTS `expenditure_analysis`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `expenditure_analysis` (
`category` int DEFAULT NULL,
`category_name` varchar(20) DEFAULT NULL,
`Buyer` varchar(20) DEFAULT NULL,
`Date` date DEFAULT NULL,
`Vendor_or_Supplier` varchar(20) DEFAULT NULL,
`Purpose` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `expenditure_analysis`
--

LOCK TABLES `expenditure_analysis` WRITE;


/*!40000 ALTER TABLE `expenditure_analysis` DISABLE KEYS */;
/*!40000 ALTER TABLE `expenditure_analysis` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `member_details`
--

DROP TABLE IF EXISTS `member_details`;


/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `member_details` (
`Member_id` int NOT NULL AUTO_INCREMENT,
`Member_Name` varchar(20) DEFAULT NULL,
PRIMARY KEY (`Member_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `member_details`
--

LOCK TABLES `member_details` WRITE;


/*!40000 ALTER TABLE `member_details` DISABLE KEYS */;
INSERT INTO `member_details` VALUES (1,'Shreeraj Shinde'),(2,'Umar Momin'),
(3,'Pranav Khubchandani'),(4,'Atharva Kumbhar'),(5,'Anuj Tilekar'),(6,'Siddhi
Gargote');
/*!40000 ALTER TABLE `member_details` 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-04-12 9:07:31

You might also like