-- MySQL dump 10.11
--
-- Host: localhost    Database: _db_kakeibo
-- ------------------------------------------------------
-- Server version	5.0.51a

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

DROP TABLE IF EXISTS `m_chokin`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `m_chokin` (
  `id_chokin` int(10) unsigned NOT NULL auto_increment,
  `id_ginkou` int(10) unsigned NOT NULL,
  `c_kinyuShohin` varchar(300) NOT NULL,
  `c_keiyakuSha` varchar(100) NOT NULL,
  `c_keiyakuKin` int(10) NOT NULL,
  `c_keiyakuYMD` datetime NOT NULL,
  `c_ritsu` decimal(4,2) NOT NULL,
  `c_mankiYMD` datetime NOT NULL,
  `c_bikou` longtext NOT NULL,
  `id_account` int(10) unsigned NOT NULL,
  `c_registtime` datetime NOT NULL,
  `c_updatetime` datetime NOT NULL,
  `c_delete` int(10) unsigned NOT NULL default '0',
  `id_shurui` int(10) unsigned NOT NULL,
  `id_mankitype` int(10) unsigned NOT NULL,
  PRIMARY KEY  USING BTREE (`id_chokin`)
) ENGINE=MyISAM AUTO_INCREMENT=54 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `m_chokin`
--

LOCK TABLES `m_chokin` WRITE;
/*!40000 ALTER TABLE `m_chokin` DISABLE KEYS */;
INSERT INTO `m_chokin` VALUES (11,5,'定期','花子',1000,'2008-09-18 00:00:00','1.00','2011-09-18 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:04:15',0,10,40),(12,5,'定期','りんご',200,'2008-11-12 00:00:00','1.00','2011-11-12 00:00:00','',10001,'0000-00-00 00:00:00','2009-06-04 20:50:04',0,10,40),(13,4,'円定期','太郎',500,'2006-09-19 00:00:00','1.00','2011-09-24 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:16:47',0,10,40),(14,4,'円定期','太郎',1000,'2004-08-24 00:00:00','1.00','2009-08-25 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:17:12',0,10,40),(26,3,'１０年定期','花子',100,'2004-04-20 00:00:00','1.50','2014-04-20 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,10,40),(27,3,'毎月積立','花子',5,'2004-01-24 00:00:00','0.20','2014-01-24 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,50,20),(28,3,'毎月積立','りんご',10,'2006-04-06 00:00:00','0.30','2016-04-06 00:00:00','',10001,'0000-00-00 00:00:00','2009-06-04 20:50:04',0,50,20),(32,2,'５年定期','花子',1000,'2002-07-27 00:00:00','1.00','2007-07-27 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,10,40),(33,2,'５年定期','太郎',500,'2000-03-12 00:00:00','1.50','2005-03-12 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-31 09:57:21',0,10,80),(34,4,'５年定期','花子',500,'2003-11-17 00:00:00','1.50','2008-11-17 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-31 09:57:21',0,10,80),(41,1,'定額貯金','太郎',500,'2002-11-26 00:00:00','0.50','2012-11-25 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,10,20),(43,1,'定額貯金','太郎',500,'2004-01-17 00:00:00','1.00','2009-01-16 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,10,20),(44,1,'定額貯金','花子',500,'2004-12-15 00:00:00','1.00','2009-12-14 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:27:44',0,10,40),(45,1,'定額貯金','太郎',1000,'2005-10-28 00:00:00','1.00','2010-10-27 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:28:28',0,10,40),(46,1,'定期積立','太郎',5,'2001-01-29 00:00:00','0.25','2011-01-28 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 23:23:27',0,50,40),(47,1,'定期積立','花子',10,'2001-08-09 00:00:00','0.25','2011-08-08 00:00:00','',10001,'0000-00-00 00:00:00','2009-05-30 22:59:32',0,50,40);
/*!40000 ALTER TABLE `m_chokin` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `m_ginkou`
--

DROP TABLE IF EXISTS `m_ginkou`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `m_ginkou` (
  `id_account` int(10) unsigned NOT NULL,
  `id_ginkou` int(10) unsigned NOT NULL auto_increment,
  `c_ginkouName` varchar(50) NOT NULL,
  `c_ginkouDisplayOrder` int(10) unsigned NOT NULL default '0',
  `c_delete` int(10) unsigned NOT NULL default '0',
  `c_registtime` datetime NOT NULL,
  `c_updatetime` datetime NOT NULL,
  PRIMARY KEY  (`id_ginkou`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `m_ginkou`
--

LOCK TABLES `m_ginkou` WRITE;
/*!40000 ALTER TABLE `m_ginkou` DISABLE KEYS */;
INSERT INTO `m_ginkou` VALUES (10001,1,'郵便局',10,0,'2009-05-19 21:03:30','2009-05-30 10:13:59'),(10001,2,'菜の花バンク',20,0,'2009-05-19 21:03:30','2009-05-30 23:22:53'),(10001,3,'みずいろ銀行',30,0,'2009-05-19 21:03:30','2009-05-30 22:44:03'),(10001,4,'新緑信託',40,0,'2009-05-19 21:03:30','2009-05-30 22:44:38'),(10001,5,'春夏銀行',50,0,'2009-05-19 21:03:30','2009-05-30 22:44:03');
/*!40000 ALTER TABLE `m_ginkou` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `r_mankitype`
--

DROP TABLE IF EXISTS `r_mankitype`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `r_mankitype` (
  `id_mankitype` int(10) unsigned NOT NULL,
  `c_mankitype` varchar(45) NOT NULL,
  PRIMARY KEY  (`id_mankitype`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `r_mankitype`
--

LOCK TABLES `r_mankitype` WRITE;
/*!40000 ALTER TABLE `r_mankitype` DISABLE KEYS */;
INSERT INTO `r_mankitype` VALUES (40,'解約'),(20,'継続'),(80,'解約済');
/*!40000 ALTER TABLE `r_mankitype` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `r_shurui`
--

DROP TABLE IF EXISTS `r_shurui`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `r_shurui` (
  `id_shurui` int(10) unsigned NOT NULL,
  `c_shurui` varchar(45) NOT NULL,
  PRIMARY KEY  (`id_shurui`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `r_shurui`
--

LOCK TABLES `r_shurui` WRITE;
/*!40000 ALTER TABLE `r_shurui` DISABLE KEYS */;
INSERT INTO `r_shurui` VALUES (10,'定期'),(50,'月積');
/*!40000 ALTER TABLE `r_shurui` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Temporary table structure for view `v_chokin`
--

DROP TABLE IF EXISTS `v_chokin`;
/*!50001 DROP VIEW IF EXISTS `v_chokin`*/;
/*!50001 CREATE TABLE `v_chokin` (
  `id_chokin` int(10) unsigned,
  `id_ginkou` int(10) unsigned,
  `c_kinyuShohin` varchar(300),
  `c_keiyakuSha` varchar(100),
  `c_keiyakuKin` int(10),
  `c_keiyakuYMD` datetime,
  `c_ritsu` decimal(4,2),
  `c_mankiYMD` datetime,
  `c_bikou` longtext,
  `id_account` int(10) unsigned,
  `c_registtime` datetime,
  `c_updatetime` datetime,
  `c_delete` int(10) unsigned,
  `id_shurui` int(10) unsigned,
  `id_mankitype` int(10) unsigned,
  `c_ginkouName` varchar(50),
  `c_ginkouDisplayOrder` int(10) unsigned,
  `c_shurui` varchar(45),
  `c_mankitype` varchar(45)
) */;

--
-- Temporary table structure for view `v_keiyakusha`
--

DROP TABLE IF EXISTS `v_keiyakusha`;
/*!50001 DROP VIEW IF EXISTS `v_keiyakusha`*/;
/*!50001 CREATE TABLE `v_keiyakusha` (
  `id_account` int(10) unsigned,
  `c_keiyakuSha` varchar(100)
) */;

--
-- Final view structure for view `v_chokin`
--

/*!50001 DROP TABLE `v_chokin`*/;
/*!50001 DROP VIEW IF EXISTS `v_chokin`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_chokin` AS select `m_chokin`.`id_chokin` AS `id_chokin`,`m_chokin`.`id_ginkou` AS `id_ginkou`,`m_chokin`.`c_kinyuShohin` AS `c_kinyuShohin`,`m_chokin`.`c_keiyakuSha` AS `c_keiyakuSha`,`m_chokin`.`c_keiyakuKin` AS `c_keiyakuKin`,`m_chokin`.`c_keiyakuYMD` AS `c_keiyakuYMD`,`m_chokin`.`c_ritsu` AS `c_ritsu`,`m_chokin`.`c_mankiYMD` AS `c_mankiYMD`,`m_chokin`.`c_bikou` AS `c_bikou`,`m_chokin`.`id_account` AS `id_account`,`m_chokin`.`c_registtime` AS `c_registtime`,`m_chokin`.`c_updatetime` AS `c_updatetime`,`m_chokin`.`c_delete` AS `c_delete`,`m_chokin`.`id_shurui` AS `id_shurui`,`m_chokin`.`id_mankitype` AS `id_mankitype`,`m_ginkou`.`c_ginkouName` AS `c_ginkouName`,`m_ginkou`.`c_ginkouDisplayOrder` AS `c_ginkouDisplayOrder`,`r_shurui`.`c_shurui` AS `c_shurui`,`r_mankitype`.`c_mankitype` AS `c_mankitype` from (((`m_chokin` left join `m_ginkou` on((`m_chokin`.`id_ginkou` = `m_ginkou`.`id_ginkou`))) left join `r_shurui` on((`m_chokin`.`id_shurui` = `r_shurui`.`id_shurui`))) left join `r_mankitype` on((`m_chokin`.`id_mankitype` = `r_mankitype`.`id_mankitype`))) where (`m_chokin`.`c_delete` = 0) */;

--
-- Final view structure for view `v_keiyakusha`
--

/*!50001 DROP TABLE `v_keiyakusha`*/;
/*!50001 DROP VIEW IF EXISTS `v_keiyakusha`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_keiyakusha` AS select distinct `m_chokin`.`id_account` AS `id_account`,`m_chokin`.`c_keiyakuSha` AS `c_keiyakuSha` from `m_chokin` */;
/*!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 2009-06-04 11:50:57
