-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bank.sql
362 lines (315 loc) · 18.2 KB
/
Bank.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
CREATE DATABASE IF NOT EXISTS `bank` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `bank`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 127.0.0.1 Database: bank
-- ------------------------------------------------------
-- Server version 5.7.21
/*!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 */;
/*!40101 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 `ACCOUNT`
--
DROP TABLE IF EXISTS `ACCOUNT`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ACCOUNT` (
`ACCOUNT_ID` int(11) NOT NULL AUTO_INCREMENT,
`AVAIL_BALANCE` float DEFAULT NULL,
`CLOSE_DATE` date DEFAULT NULL,
`LAST_ACTIVITY_DATE` date DEFAULT NULL,
`OPEN_DATE` date NOT NULL,
`PENDING_BALANCE` float DEFAULT NULL,
`STATUS` varchar(10) DEFAULT NULL,
`CUST_ID` int(11) DEFAULT NULL,
`OPEN_BRANCH_ID` int(11) NOT NULL,
`OPEN_EMP_ID` int(11) NOT NULL,
`PRODUCT_CD` varchar(10) NOT NULL,
PRIMARY KEY (`ACCOUNT_ID`),
KEY `ACCOUNT_CUSTOMER_FK` (`CUST_ID`),
KEY `ACCOUNT_BRANCH_FK` (`OPEN_BRANCH_ID`),
KEY `ACCOUNT_EMPLOYEE_FK` (`OPEN_EMP_ID`),
KEY `ACCOUNT_PRODUCT_FK` (`PRODUCT_CD`),
CONSTRAINT `ACCOUNT_BRANCH_FK` FOREIGN KEY (`OPEN_BRANCH_ID`) REFERENCES `BRANCH` (`BRANCH_ID`),
CONSTRAINT `ACCOUNT_CUSTOMER_FK` FOREIGN KEY (`CUST_ID`) REFERENCES `CUSTOMER` (`CUST_ID`),
CONSTRAINT `ACCOUNT_EMPLOYEE_FK` FOREIGN KEY (`OPEN_EMP_ID`) REFERENCES `EMPLOYEE` (`EMP_ID`),
CONSTRAINT `ACCOUNT_PRODUCT_FK` FOREIGN KEY (`PRODUCT_CD`) REFERENCES `PRODUCT` (`PRODUCT_CD`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ACCOUNT`
--
LOCK TABLES `ACCOUNT` WRITE;
/*!40000 ALTER TABLE `ACCOUNT` DISABLE KEYS */;
INSERT INTO `ACCOUNT` VALUES (1,1057.75,'2007-01-06','2005-01-04','2000-01-15',1057.75,'INACTIVE',1,2,10,'CHK'),(2,500,NULL,'2004-12-19','2000-01-15',500,'ACTIVE',1,2,10,'SAV'),(3,3000,NULL,'2004-06-30','2004-06-30',3000,'ACTIVE',1,2,10,'CD'),(4,2258.02,NULL,'2004-12-27','2001-03-12',2258.02,'ACTIVE',2,2,10,'CHK'),(5,200,NULL,'2004-12-11','2001-03-12',200,'ACTIVE',2,2,10,'SAV'),(7,1057.75,NULL,'2004-11-30','2002-11-23',1057.75,'ACTIVE',3,3,13,'CHK'),(8,2212.5,NULL,'2004-12-05','2002-12-15',2212.5,'ACTIVE',3,3,13,'MM'),(10,534.12,NULL,'2005-01-03','2003-09-12',534.12,'ACTIVE',4,1,1,'CHK'),(11,767.77,NULL,'2004-10-24','2000-01-15',767.77,'ACTIVE',4,1,1,'SAV'),(12,5487.09,NULL,'2004-11-11','2004-09-30',5487.09,'ACTIVE',4,1,1,'MM'),(13,2237.97,NULL,'2005-01-05','2004-01-27',2897.97,'ACTIVE',5,4,16,'CHK'),(14,122.37,NULL,'2004-11-29','2002-08-24',122.37,'ACTIVE',6,1,1,'CHK'),(15,10000,'2008-02-08','2004-12-28','2004-12-28',10000,'INACTIVE',6,1,1,'CD'),(17,5000,NULL,'2004-01-12','2004-01-12',5000,'ACTIVE',7,2,10,'CD'),(18,3487.19,NULL,'2005-01-03','2001-05-23',3487.19,'ACTIVE',8,4,16,'CHK'),(19,387.99,NULL,'2004-10-12','2001-05-23',387.99,'ACTIVE',8,4,16,'SAV'),(21,125.67,NULL,'2004-12-15','2003-07-30',125.67,'ACTIVE',9,1,1,'CHK'),(22,9345.55,NULL,'2004-10-28','2004-10-28',9845.55,'ACTIVE',9,1,1,'MM'),(23,1500,NULL,'2004-06-30','2004-06-30',1500,'ACTIVE',9,1,1,'CD'),(24,23575.1,NULL,'2004-12-15','2002-09-30',23575.1,'ACTIVE',10,4,16,'CHK'),(25,0,'2007-02-05','2004-08-28','2002-10-01',0,'ACTIVE',10,4,16,'BUS'),(27,9345.55,NULL,'2004-11-14','2004-03-22',9345.55,'ACTIVE',11,2,10,'BUS'),(28,38552.1,NULL,'2004-12-15','2003-07-30',38552.1,'ACTIVE',12,4,16,'CHK'),(29,50000,NULL,'2004-12-17','2004-02-22',50000,'ACTIVE',13,3,13,'SBL');
/*!40000 ALTER TABLE `ACCOUNT` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `ACC_TRANSACTION`
--
DROP TABLE IF EXISTS `ACC_TRANSACTION`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ACC_TRANSACTION` (
`TXN_ID` bigint(20) NOT NULL AUTO_INCREMENT,
`AMOUNT` float NOT NULL,
`FUNDS_AVAIL_DATE` datetime NOT NULL,
`TXN_DATE` datetime NOT NULL,
`TXN_TYPE_CD` varchar(10) DEFAULT NULL,
`ACCOUNT_ID` int(11) DEFAULT NULL,
`EXECUTION_BRANCH_ID` int(11) DEFAULT NULL,
`TELLER_EMP_ID` int(11) DEFAULT NULL,
PRIMARY KEY (`TXN_ID`),
KEY `ACC_TRANSACTION_ACCOUNT_FK` (`ACCOUNT_ID`),
KEY `ACC_TRANSACTION_BRANCH_FK` (`EXECUTION_BRANCH_ID`),
KEY `ACC_TRANSACTION_EMPLOYEE_FK` (`TELLER_EMP_ID`),
CONSTRAINT `ACC_TRANSACTION_ACCOUNT_FK` FOREIGN KEY (`ACCOUNT_ID`) REFERENCES `ACCOUNT` (`ACCOUNT_ID`),
CONSTRAINT `ACC_TRANSACTION_BRANCH_FK` FOREIGN KEY (`EXECUTION_BRANCH_ID`) REFERENCES `BRANCH` (`BRANCH_ID`),
CONSTRAINT `ACC_TRANSACTION_EMPLOYEE_FK` FOREIGN KEY (`TELLER_EMP_ID`) REFERENCES `EMPLOYEE` (`EMP_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `ACC_TRANSACTION`
--
LOCK TABLES `ACC_TRANSACTION` WRITE;
/*!40000 ALTER TABLE `ACC_TRANSACTION` DISABLE KEYS */;
INSERT INTO `ACC_TRANSACTION` VALUES (1,100,'2000-01-15 00:00:00','2000-01-15 00:00:00','CDT',1,2,11),(2,100,'2000-01-15 00:00:00','2000-01-15 00:00:00','CDT',2,3,14),(3,100,'2004-06-30 00:00:00','2004-06-30 00:00:00','CDT',3,4,17),(4,100,'2001-03-12 00:00:00','2001-03-12 00:00:00','CDT',4,2,12),(5,100,'2001-03-12 00:00:00','2001-03-12 00:00:00','CDT',5,3,15),(6,100,'2002-11-23 00:00:00','2002-11-23 00:00:00','CDT',7,4,18),(7,100,'2002-12-15 00:00:00','2002-12-15 00:00:00','CDT',8,2,13),(8,100,'2003-09-12 00:00:00','2003-09-12 00:00:00','CDT',10,3,15),(9,100,'2000-01-15 00:00:00','2000-01-15 00:00:00','CDT',11,4,18),(10,100,'2004-09-30 00:00:00','2004-09-30 00:00:00','CDT',12,2,12),(11,100,'2004-01-27 00:00:00','2004-01-27 00:00:00','CDT',13,3,14),(12,100,'2002-08-24 00:00:00','2002-08-24 00:00:00','CDT',14,4,17),(13,100,'2004-12-28 00:00:00','2004-12-28 00:00:00','CDT',15,2,11),(14,100,'2004-01-12 00:00:00','2004-01-12 00:00:00','CDT',17,3,14),(15,100,'2001-05-23 00:00:00','2001-05-23 00:00:00','CDT',18,4,18),(16,100,'2001-05-23 00:00:00','2001-05-23 00:00:00','CDT',19,1,7),(17,100,'2003-07-30 00:00:00','2003-07-30 00:00:00','CDT',21,1,8),(18,100,'2004-10-28 00:00:00','2004-10-28 00:00:00','CDT',22,1,9),(19,100,'2004-06-30 00:00:00','2004-06-30 00:00:00','CDT',23,1,7),(20,100,'2002-09-30 00:00:00','2002-09-30 00:00:00','CDT',24,1,8),(21,100,'2003-07-30 00:00:00','2003-07-30 00:00:00','CDT',28,1,NULL);
/*!40000 ALTER TABLE `ACC_TRANSACTION` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `BRANCH`
--
DROP TABLE IF EXISTS `BRANCH`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BRANCH` (
`BRANCH_ID` int(11) NOT NULL AUTO_INCREMENT,
`ADDRESS` varchar(30) DEFAULT NULL,
`CITY` varchar(20) DEFAULT NULL,
`NAME` varchar(20) NOT NULL,
`STATE` varchar(10) DEFAULT NULL,
`ZIP_CODE` varchar(12) DEFAULT NULL,
PRIMARY KEY (`BRANCH_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `BRANCH`
--
LOCK TABLES `BRANCH` WRITE;
/*!40000 ALTER TABLE `BRANCH` DISABLE KEYS */;
INSERT INTO `BRANCH` VALUES (1,'3882 Main St.','Waltham','Headquarters','MA','02451'),(2,'422 Maple St.','Woburn','Woburn Branch','MA','01801'),(3,'125 Presidential Way','Quincy','Quincy Branch','MA','02169'),(4,'378 Maynard Ln.','Salem','So. NH Branch','NH','03079');
/*!40000 ALTER TABLE `BRANCH` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `BUSINESS`
--
DROP TABLE IF EXISTS `BUSINESS`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `BUSINESS` (
`INCORP_DATE` date DEFAULT NULL,
`NAME` varchar(255) NOT NULL,
`STATE_ID` varchar(10) NOT NULL,
`CUST_ID` int(11) NOT NULL,
PRIMARY KEY (`CUST_ID`),
CONSTRAINT `BUSINESS_EMPLOYEE_FK` FOREIGN KEY (`CUST_ID`) REFERENCES `CUSTOMER` (`CUST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `BUSINESS`
--
LOCK TABLES `BUSINESS` WRITE;
/*!40000 ALTER TABLE `BUSINESS` DISABLE KEYS */;
INSERT INTO `BUSINESS` VALUES ('1995-05-01','Chilton Engineering','12-345-678',10),('2001-01-01','Northeast Cooling Inc.','23-456-789',11),('2002-06-30','Superior Auto Body','34-567-890',12),('1999-05-01','AAA Insurance Inc.','45-678-901',13);
/*!40000 ALTER TABLE `BUSINESS` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `CUSTOMER`
--
DROP TABLE IF EXISTS `CUSTOMER`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `CUSTOMER` (
`CUST_ID` int(11) NOT NULL AUTO_INCREMENT,
`ADDRESS` varchar(30) DEFAULT NULL,
`CITY` varchar(20) DEFAULT NULL,
`CUST_TYPE_CD` varchar(1) NOT NULL,
`FED_ID` varchar(12) NOT NULL,
`POSTAL_CODE` varchar(10) DEFAULT NULL,
`STATE` varchar(20) DEFAULT NULL,
PRIMARY KEY (`CUST_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `CUSTOMER`
--
LOCK TABLES `CUSTOMER` WRITE;
/*!40000 ALTER TABLE `CUSTOMER` DISABLE KEYS */;
INSERT INTO `CUSTOMER` VALUES (1,'47 Mockingbird Ln','Lynnfield','I','111-11-1111','01940','MA'),(2,'372 Clearwater Blvd','Woburn','I','222-22-2222','01801','MA'),(3,'18 Jessup Rd','Quincy','I','333-33-3333','02169','MA'),(4,'12 Buchanan Ln','Waltham','I','444-44-4444','02451','MA'),(5,'2341 Main St','Salem','I','555-55-5555','03079','NH'),(6,'12 Blaylock Ln','Waltham','I','666-66-6666','02451','MA'),(7,'29 Admiral Ln','Wilmington','I','777-77-7777','01887','MA'),(8,'472 Freedom Rd','Salem','I','888-88-8888','03079','NH'),(9,'29 Maple St','Newton','I','999-99-9999','02458','MA'),(10,'7 Industrial Way','Salem','B','04-1111111','03079','NH'),(11,'287A Corporate Ave','Wilmington','B','04-2222222','01887','MA'),(12,'789 Main St','Salem','B','04-3333333','03079','NH'),(13,'4772 Presidential Way','Quincy','B','04-4444444','02169','MA');
/*!40000 ALTER TABLE `CUSTOMER` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `DEPARTMENT`
--
DROP TABLE IF EXISTS `DEPARTMENT`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DEPARTMENT` (
`DEPT_ID` int(11) NOT NULL AUTO_INCREMENT,
`NAME` varchar(20) NOT NULL,
PRIMARY KEY (`DEPT_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!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,'Operations'),(2,'Loans'),(3,'Administration'),(4,'IT');
/*!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 */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `EMPLOYEE` (
`EMP_ID` int(11) NOT NULL AUTO_INCREMENT,
`END_DATE` date DEFAULT NULL,
`FIRST_NAME` varchar(20) NOT NULL,
`LAST_NAME` varchar(20) NOT NULL,
`START_DATE` date NOT NULL,
`TITLE` varchar(20) DEFAULT NULL,
`ASSIGNED_BRANCH_ID` int(11) DEFAULT NULL,
`DEPT_ID` int(11) DEFAULT NULL,
`SUPERIOR_EMP_ID` int(11) DEFAULT NULL,
PRIMARY KEY (`EMP_ID`),
KEY `EMPLOYEE_BRANCH_FK` (`ASSIGNED_BRANCH_ID`),
KEY `EMPLOYEE_DEPARTMENT_FK` (`DEPT_ID`),
KEY `EMPLOYEE_EMPLOYEE_FK` (`SUPERIOR_EMP_ID`),
CONSTRAINT `EMPLOYEE_BRANCH_FK` FOREIGN KEY (`ASSIGNED_BRANCH_ID`) REFERENCES `BRANCH` (`BRANCH_ID`),
CONSTRAINT `EMPLOYEE_DEPARTMENT_FK` FOREIGN KEY (`DEPT_ID`) REFERENCES `DEPARTMENT` (`DEPT_ID`),
CONSTRAINT `EMPLOYEE_EMPLOYEE_FK` FOREIGN KEY (`SUPERIOR_EMP_ID`) REFERENCES `EMPLOYEE` (`EMP_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;
/*!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,NULL,'Michael','Smith','2001-06-22','President',1,3,NULL),(2,NULL,'Susan','Barker','2002-09-12','Vice President',1,3,1),(3,NULL,'Robert','Tyler','2000-02-09','Treasurer',1,3,1),(4,NULL,'Susan','Hawthorne','2002-04-24','Operations Manager',1,1,3),(5,NULL,'John','Gooding','2003-11-14','Loan Manager',1,2,4),(6,NULL,'Helen','Fleming','2004-03-17','Head Teller',1,1,4),(7,NULL,'Chris','Tucker','2004-09-15','Teller',1,1,6),(8,NULL,'Sarah','Parker','2002-12-02','Teller',1,1,6),(9,NULL,'Jane','Grossman','2002-05-03','Teller',1,1,6),(10,NULL,'Paula','Roberts','2002-07-27','Head Teller',2,1,4),(11,NULL,'Thomas','Ziegler','2000-10-23','Teller',2,1,10),(12,NULL,'Samantha','Jameson','2003-01-08','Teller',2,1,10),(13,NULL,'John','Blake','2000-05-11','Head Teller',3,1,4),(14,NULL,'Cindy','Mason','2002-08-09','Teller',3,1,13),(15,NULL,'Frank','Portman','2003-04-01','Teller',3,1,13),(16,NULL,'Theresa','Markham','2001-03-15','Head Teller',4,1,4),(17,NULL,'Beth','Fowler','2002-06-29','Teller',4,1,16),(18,NULL,'Rick','Tulman','2002-12-12','Teller',4,1,16);
/*!40000 ALTER TABLE `EMPLOYEE` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `INDIVIDUAL`
--
DROP TABLE IF EXISTS `INDIVIDUAL`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `INDIVIDUAL` (
`BIRTH_DATE` date DEFAULT NULL,
`FIRST_NAME` varchar(30) NOT NULL,
`LAST_NAME` varchar(30) NOT NULL,
`CUST_ID` int(11) NOT NULL,
PRIMARY KEY (`CUST_ID`),
CONSTRAINT `INDIVIDUAL_CUSTOMER_FK` FOREIGN KEY (`CUST_ID`) REFERENCES `CUSTOMER` (`CUST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `INDIVIDUAL`
--
LOCK TABLES `INDIVIDUAL` WRITE;
/*!40000 ALTER TABLE `INDIVIDUAL` DISABLE KEYS */;
INSERT INTO `INDIVIDUAL` VALUES ('1972-04-22','James','Hadley',1),('1968-08-15','Susan','Tingley',2),('1958-02-06','Frank','Tucker',3),('1966-12-22','John','Hayward',4),('1971-08-25','Charles','Frasier',5),('1962-09-14','John','Spencer',6),('1947-03-19','Margaret','Young',7),('1977-07-01','Louis','Blake',8),('1968-06-16','Richard','Farley',9);
/*!40000 ALTER TABLE `INDIVIDUAL` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `OFFICER`
--
DROP TABLE IF EXISTS `OFFICER`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OFFICER` (
`OFFICER_ID` int(11) NOT NULL AUTO_INCREMENT,
`END_DATE` date DEFAULT NULL,
`FIRST_NAME` varchar(30) NOT NULL,
`LAST_NAME` varchar(30) NOT NULL,
`START_DATE` date NOT NULL,
`TITLE` varchar(20) DEFAULT NULL,
`CUST_ID` int(11) DEFAULT NULL,
PRIMARY KEY (`OFFICER_ID`),
KEY `OFFICER_CUSTOMER_FK` (`CUST_ID`),
CONSTRAINT `OFFICER_CUSTOMER_FK` FOREIGN KEY (`CUST_ID`) REFERENCES `CUSTOMER` (`CUST_ID`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `OFFICER`
--
LOCK TABLES `OFFICER` WRITE;
/*!40000 ALTER TABLE `OFFICER` DISABLE KEYS */;
INSERT INTO `OFFICER` VALUES (1,NULL,'John','Chilton','1995-05-01','President',10),(2,NULL,'Paul','Hardy','2001-01-01','President',11),(3,NULL,'Carl','Lutz','2002-06-30','President',12),(4,NULL,'Stanley','Cheswick','1999-05-01','President',13);
/*!40000 ALTER TABLE `OFFICER` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `PRODUCT`
--
DROP TABLE IF EXISTS `PRODUCT`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PRODUCT` (
`PRODUCT_CD` varchar(10) NOT NULL,
`DATE_OFFERED` date DEFAULT NULL,
`DATE_RETIRED` date DEFAULT NULL,
`NAME` varchar(50) NOT NULL,
`PRODUCT_TYPE_CD` varchar(255) DEFAULT NULL,
PRIMARY KEY (`PRODUCT_CD`),
KEY `PRODUCT_PRODUCT_TYPE_FK` (`PRODUCT_TYPE_CD`),
CONSTRAINT `PRODUCT_PRODUCT_TYPE_FK` FOREIGN KEY (`PRODUCT_TYPE_CD`) REFERENCES `PRODUCT_TYPE` (`PRODUCT_TYPE_CD`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!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 ('AUT','2000-01-01',NULL,'auto loan','LOAN'),('BUS','2000-01-01',NULL,'business line of credit','LOAN'),('CD','2000-01-01',NULL,'certificate of deposit','ACCOUNT'),('CHK','2000-01-01',NULL,'checking account','ACCOUNT'),('MM','2000-01-01',NULL,'money market account','ACCOUNT'),('MRT','2000-01-01',NULL,'home mortgage','LOAN'),('SAV','2000-01-01',NULL,'savings account','ACCOUNT'),('SBL','2000-01-01',NULL,'small business loan','LOAN');
/*!40000 ALTER TABLE `PRODUCT` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `PRODUCT_TYPE`
--
DROP TABLE IF EXISTS `PRODUCT_TYPE`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PRODUCT_TYPE` (
`PRODUCT_TYPE_CD` varchar(255) NOT NULL,
`NAME` varchar(50) DEFAULT NULL,
PRIMARY KEY (`PRODUCT_TYPE_CD`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `PRODUCT_TYPE`
--
LOCK TABLES `PRODUCT_TYPE` WRITE;
/*!40000 ALTER TABLE `PRODUCT_TYPE` DISABLE KEYS */;
INSERT INTO `PRODUCT_TYPE` VALUES ('ACCOUNT','Customer Accounts'),('INSURANCE','Insurance Offerings'),('LOAN','Individual and Business Loans');
/*!40000 ALTER TABLE `PRODUCT_TYPE` 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 2018-03-13 16:55:24