-
Notifications
You must be signed in to change notification settings - Fork 0
/
auctomaticDB.sql
169 lines (146 loc) · 5.94 KB
/
auctomaticDB.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
-- MySQL dump 10.13 Distrib 8.0.28, for Win64 (x86_64)
--
-- Host: localhost Database: Auctomatic
-- ------------------------------------------------------
-- 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 `buyer`
--
DROP TABLE IF EXISTS `buyer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `buyer` (
`buyer_ID` int NOT NULL AUTO_INCREMENT,
`buyer_name` varchar(20) NOT NULL,
`buyer_email` varchar(20) NOT NULL,
`buyer_username` varchar(20) NOT NULL,
`buyer_password` varchar(15) NOT NULL,
`buyer_mobile` varchar(15) NOT NULL,
PRIMARY KEY (`buyer_ID`),
UNIQUE KEY `buyer_email` (`buyer_email`),
UNIQUE KEY `buyer_username` (`buyer_username`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `buyer`
--
LOCK TABLES `buyer` WRITE;
/*!40000 ALTER TABLE `buyer` DISABLE KEYS */;
INSERT INTO `buyer` VALUES (1,'Abhijeet','[email protected]','Abhi','Abhi1','9011258475'),(2,'Rishi','[email protected]','Rishi','Rishi123','7584753'),(3,'Seller-1','[email protected]','Seller1','Seller123','2548475963');
/*!40000 ALTER TABLE `buyer` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `category`
--
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `category` (
`category_ID` int NOT NULL AUTO_INCREMENT,
`category_name` varchar(20) DEFAULT NULL,
PRIMARY KEY (`category_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=1005 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `category`
--
LOCK TABLES `category` WRITE;
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
INSERT INTO `category` VALUES (1001,'Clothing'),(1002,'Electronics'),(1003,'Grocery'),(1004,'Miscellaneous');
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `order_table`
--
DROP TABLE IF EXISTS `order_table`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `order_table` (
`order_ID` int unsigned NOT NULL AUTO_INCREMENT,
`buyer_ID` int NOT NULL,
`seller_ID` int NOT NULL,
`product_ID` int NOT NULL,
`bid_price` double NOT NULL,
`order_status` tinyint DEFAULT NULL,
PRIMARY KEY (`order_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `order_table`
--
LOCK TABLES `order_table` WRITE;
/*!40000 ALTER TABLE `order_table` DISABLE KEYS */;
/*!40000 ALTER TABLE `order_table` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `product`
--
DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product` (
`product_ID` int unsigned NOT NULL AUTO_INCREMENT,
`product_name` varchar(25) DEFAULT NULL,
`category` varchar(30) DEFAULT NULL,
`price` double DEFAULT NULL,
`buyer_ID` int DEFAULT NULL,
`seller_ID` int DEFAULT NULL,
`sold_status` tinyint DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`purchase_date` date DEFAULT NULL,
PRIMARY KEY (`product_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `product`
--
LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (105,'Ducati','Miscellaneous',90000000,1,1,1,'Bike','2023-04-01'),(108,'Monalisa_Painting','Miscellaneous',5600000,1,2,1,'Painting','2023-04-01');
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `seller`
--
DROP TABLE IF EXISTS `seller`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `seller` (
`seller_ID` int NOT NULL AUTO_INCREMENT,
`seller_name` varchar(20) NOT NULL,
`seller_email` varchar(20) NOT NULL,
`seller_username` varchar(20) NOT NULL,
`seller_password` varchar(15) NOT NULL,
`seller_mobile` varchar(15) NOT NULL,
PRIMARY KEY (`seller_ID`),
UNIQUE KEY `seller_email` (`seller_email`),
UNIQUE KEY `seller_username` (`seller_username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `seller`
--
LOCK TABLES `seller` WRITE;
/*!40000 ALTER TABLE `seller` DISABLE KEYS */;
INSERT INTO `seller` VALUES (1,'Seller-1','[email protected]','Seller1','Seller_1','9858484572'),(2,'Seller-2','[email protected]','Seller2','Seller_2','9858654857');
/*!40000 ALTER TABLE `seller` 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 2023-04-02 12:54:24