· 9 years ago · Jan 01, 2017, 04:46 AM
1-- MySQL dump 10.13 Distrib 5.1.68, for Win64 (unknown)
2--
3-- Host: localhost Database: JW_DBS502A_AT5
4-- ------------------------------------------------------
5-- Server version 5.1.68-community
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `bids`
20--
21
22DROP TABLE IF EXISTS `bids`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `bids` (
26 `bid_amount` float NOT NULL,
27 `bid_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
28 `itemID` int(10) NOT NULL,
29 `BuyerID` int(10) NOT NULL,
30 KEY `IX_bids_itemID_BuyerID` (`itemID`,`BuyerID`)
31) ENGINE=InnoDB DEFAULT CHARSET=utf8;
32/*!40101 SET character_set_client = @saved_cs_client */;
33
34--
35-- Dumping data for table `bids`
36--
37
38LOCK TABLES `bids` WRITE;
39/*!40000 ALTER TABLE `bids` DISABLE KEYS */;
40INSERT INTO `bids` VALUES (20,'2014-04-07 23:21:24',3,2),(25,'2014-04-07 23:21:38',3,4),(60,'2014-04-07 23:21:53',1,6),(89,'2014-04-07 23:22:10',2,2),(62,'2014-04-07 23:22:23',1,2);
41/*!40000 ALTER TABLE `bids` ENABLE KEYS */;
42UNLOCK TABLES;
43
44--
45-- Table structure for table `buyer`
46--
47
48DROP TABLE IF EXISTS `buyer`;
49/*!40101 SET @saved_cs_client = @@character_set_client */;
50/*!40101 SET character_set_client = utf8 */;
51CREATE TABLE `buyer` (
52 `BuyerID` int(11) NOT NULL AUTO_INCREMENT,
53 `first_name` varchar(35) NOT NULL,
54 `middle_initial` char(1) DEFAULT NULL,
55 `surname` varchar(35) NOT NULL,
56 `gender` char(1) NOT NULL DEFAULT 'M',
57 `email` varchar(30) NOT NULL,
58 `password` varchar(20) NOT NULL,
59 `cc_no` bigint(20) DEFAULT NULL,
60 `street_no` varchar(12) NOT NULL,
61 `street_name` varchar(55) NOT NULL,
62 `suburb` varchar(30) NOT NULL,
63 `state` varchar(30) NOT NULL,
64 `country` varchar(30) NOT NULL,
65 `postcode` varchar(10) NOT NULL,
66 PRIMARY KEY (`BuyerID`)
67) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
68/*!40101 SET character_set_client = @saved_cs_client */;
69
70--
71-- Dumping data for table `buyer`
72--
73
74LOCK TABLES `buyer` WRITE;
75/*!40000 ALTER TABLE `buyer` DISABLE KEYS */;
76INSERT INTO `buyer` VALUES (1,'Henry','D','Jackson','M','hj@gmail.com','password',1234123412341234,'11','Upper Union Street','Deception Bay','QLD','Australia','4508'),(2,'Sally','M','Hudson','F','sh@hotmail.com','password',1111222233334444,'9','Pennsylvania Ave','Washington','DC','USA','20500'),(3,'Darren','L','Wade','M','dw@gmail.com','password',1234567891011121,'2','Scout Rd','Woodford','NSW','Australia','4514'),(4,'Jack','H','Smith','M','js@yahoo.com','password',4642464535764321,'6','Bluemist Drive','Croydon','VIC','Australia','3203'),(5,'Samuel','G','Watson','M','sw@hotmail.com','password',1122334455667788,'2','Twitton Meadows','Otford','Kent','England','TN14');
77/*!40000 ALTER TABLE `buyer` ENABLE KEYS */;
78UNLOCK TABLES;
79
80--
81-- Table structure for table `category`
82--
83
84DROP TABLE IF EXISTS `category`;
85/*!40101 SET @saved_cs_client = @@character_set_client */;
86/*!40101 SET character_set_client = utf8 */;
87CREATE TABLE `category` (
88 `categoryID` int(11) NOT NULL AUTO_INCREMENT,
89 `category_name` varchar(30) NOT NULL,
90 `description` mediumtext NOT NULL,
91 PRIMARY KEY (`categoryID`)
92) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
93/*!40101 SET character_set_client = @saved_cs_client */;
94
95--
96-- Dumping data for table `category`
97--
98
99LOCK TABLES `category` WRITE;
100/*!40000 ALTER TABLE `category` DISABLE KEYS */;
101INSERT INTO `category` VALUES (1,'Computers','for computers and their accessories'),(2,'Phones','for all phones and phone accessories'),(3,'Toys','anything toy related'),(4,'Pet Accessories','all pet related accessories'),(5,'Camping','the 1st stop for all camping equipment!');
102/*!40000 ALTER TABLE `category` ENABLE KEYS */;
103UNLOCK TABLES;
104
105--
106-- Table structure for table `item`
107--
108
109DROP TABLE IF EXISTS `item`;
110/*!40101 SET @saved_cs_client = @@character_set_client */;
111/*!40101 SET character_set_client = utf8 */;
112CREATE TABLE `item` (
113 `itemID` int(11) NOT NULL AUTO_INCREMENT,
114 `auct_start_price` decimal(10,0) DEFAULT '99',
115 `buy_now_price` decimal(10,0) DEFAULT NULL,
116 `title` varchar(20) NOT NULL,
117 `description` text,
118 `quantity` int(3) NOT NULL,
119 `img_file_path` varchar(40) DEFAULT '../images/default.jpg',
120 `item_location` varchar(30) NOT NULL,
121 `for_auction` varchar(20) DEFAULT NULL,
122 `auction_start_date` date DEFAULT NULL,
123 `no_days` int(10) DEFAULT NULL,
124 `is_sold` varchar(20) NOT NULL,
125 `pick_up_avail` char(1) NOT NULL,
126 `post_in_state` char(1) NOT NULL,
127 `post_in_country` char(1) NOT NULL,
128 `post_int` char(1) NOT NULL,
129 `post_payer` varchar(6) NOT NULL,
130 `sellerID` int(10) NOT NULL,
131 `categoryID` int(10) NOT NULL,
132 PRIMARY KEY (`itemID`)
133) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
134/*!40101 SET character_set_client = @saved_cs_client */;
135
136--
137-- Dumping data for table `item`
138--
139
140LOCK TABLES `item` WRITE;
141/*!40000 ALTER TABLE `item` DISABLE KEYS */;
142INSERT INTO `item` VALUES (1,'60','100','Tablet Computer','Samsung Tablet first generation',1,'../images/default.jpg','Ipswich, QLD, Australia','Y','2014-02-04',3,'Y','Y','Y','Y','Y','Buyer',10,1),(2,'89',NULL,'luxury tent','awesome 6 man tent very low price get in quick!',1,'../images/tent.jpg','Beijing, China','Y','2014-02-04',3,'Y','Y','Y','Y','Y','Buyer',7,5),(3,'15',NULL,'Breyer horse','breyer classics model horse',1,'../images/bc.jpg','NSW, Australia','Y','2014-02-04',3,'Y','Y','Y','Y','Y','Buyer',3,3),(4,'4','10','Breyer horse','breyer miniwhinnies model horse',1,'../images/bmw.jpg','NSW, Australia','Y','2014-02-05',3,'Y','Y','Y','Y','Y','Buyer',3,3),(5,'249',NULL,'4x6 trailer','4x6 box trailer blue steel no rego',1,'../images/trailer.jpg','QLD, Australia','Y','2014-06-02',3,'Y','Y','N','N','N','N/A',10,6);
143/*!40000 ALTER TABLE `item` ENABLE KEYS */;
144UNLOCK TABLES;
145
146--
147-- Table structure for table `item_sold`
148--
149
150DROP TABLE IF EXISTS `item_sold`;
151/*!40101 SET @saved_cs_client = @@character_set_client */;
152/*!40101 SET character_set_client = utf8 */;
153CREATE TABLE `item_sold` (
154 `transactionID` int(11) NOT NULL AUTO_INCREMENT,
155 `quantity` int(10) NOT NULL,
156 `BuyerID` int(10) NOT NULL,
157 `itemID` int(10) NOT NULL,
158 PRIMARY KEY (`transactionID`)
159) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
160/*!40101 SET character_set_client = @saved_cs_client */;
161
162--
163-- Dumping data for table `item_sold`
164--
165
166LOCK TABLES `item_sold` WRITE;
167/*!40000 ALTER TABLE `item_sold` DISABLE KEYS */;
168INSERT INTO `item_sold` VALUES (1,1,8,1),(2,1,2,2),(3,1,4,3),(4,1,5,4),(5,1,1,5);
169/*!40000 ALTER TABLE `item_sold` ENABLE KEYS */;
170UNLOCK TABLES;
171
172--
173-- Table structure for table `payment`
174--
175
176DROP TABLE IF EXISTS `payment`;
177/*!40101 SET @saved_cs_client = @@character_set_client */;
178/*!40101 SET character_set_client = utf8 */;
179CREATE TABLE `payment` (
180 `paymentID` int(11) NOT NULL AUTO_INCREMENT,
181 `pay_method` varchar(30) NOT NULL,
182 `amount` decimal(10,0) NOT NULL,
183 `time_of_payment` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
184 `transactionID` int(10) NOT NULL,
185 PRIMARY KEY (`paymentID`)
186) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
187/*!40101 SET character_set_client = @saved_cs_client */;
188
189--
190-- Dumping data for table `payment`
191--
192
193LOCK TABLES `payment` WRITE;
194/*!40000 ALTER TABLE `payment` DISABLE KEYS */;
195INSERT INTO `payment` VALUES (1,'bank deposit','89','2014-04-07 23:27:02',1),(2,'paypal','89','2014-04-07 23:27:02',2),(3,'paypal','25','2014-04-07 23:27:03',3),(4,'paypal','6','2014-04-07 23:27:04',4),(5,'bank deposit','249','2014-04-07 23:27:04',5);
196/*!40000 ALTER TABLE `payment` ENABLE KEYS */;
197UNLOCK TABLES;
198
199--
200-- Table structure for table `seller`
201--
202
203DROP TABLE IF EXISTS `seller`;
204/*!40101 SET @saved_cs_client = @@character_set_client */;
205/*!40101 SET character_set_client = utf8 */;
206CREATE TABLE `seller` (
207 `seller_ID` int(11) NOT NULL AUTO_INCREMENT,
208 `pay_preference` enum('bank deposit','cheque','Paypal','credit card') NOT NULL DEFAULT 'Paypal',
209 `bsb_no` int(8) DEFAULT NULL,
210 `acc_no` int(8) DEFAULT NULL,
211 `acc_name` varchar(50) DEFAULT NULL,
212 `BuyerID` int(10) NOT NULL,
213 PRIMARY KEY (`seller_ID`)
214) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
215/*!40101 SET character_set_client = @saved_cs_client */;
216
217--
218-- Dumping data for table `seller`
219--
220
221LOCK TABLES `seller` WRITE;
222/*!40000 ALTER TABLE `seller` DISABLE KEYS */;
223INSERT INTO `seller` VALUES (1,'cheque',NULL,NULL,NULL,1),(2,'credit card',NULL,NULL,NULL,2),(3,'Paypal',NULL,NULL,NULL,3),(4,'Paypal',NULL,NULL,NULL,4),(5,'Paypal',NULL,NULL,NULL,5);
224/*!40000 ALTER TABLE `seller` ENABLE KEYS */;
225UNLOCK TABLES;
226/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
227
228/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
229/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
230/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
231/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
232/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
233/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
234/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
235
236-- Dump completed on 2014-04-10 10:59:53