CREATE DATABASE  IF NOT EXISTS `unitedcghs` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `unitedcghs`;
-- MySQL dump 10.13  Distrib 5.6.17, for Win32 (x86)
--
-- Host: 127.0.0.1    Database: unitedcghs
-- ------------------------------------------------------
-- Server version	5.6.15

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

DROP TABLE IF EXISTS `ownership`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ownership` (
  `idownership` smallint(6) NOT NULL AUTO_INCREMENT,
  `idflatno` smallint(6) DEFAULT NULL,
  `date_purchase` date DEFAULT NULL,
  `is_member` tinyint(1) DEFAULT NULL,
  `membership_no` varchar(4) DEFAULT NULL,
  `joint_owners` tinyint(1) DEFAULT NULL,
  `current_owner` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`idownership`),
  KEY `fk_ownership_flatdata_idx` (`idflatno`),
  KEY `id_flat_owner` (`idflatno`,`idownership`),
  CONSTRAINT `fk_Ownership_FlatData` FOREIGN KEY (`idflatno`) REFERENCES `flatdata` (`idflatno`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `ownership`
--

LOCK TABLES `ownership` WRITE;
/*!40000 ALTER TABLE `ownership` DISABLE KEYS */;
INSERT INTO `ownership` VALUES (1,111,'2003-03-23',1,'285',0,1),(2,112,'2003-03-23',1,'284',0,1),(3,113,'2003-03-23',1,'110',0,0),(4,114,'2003-03-23',1,'340',1,1),(5,115,'2003-03-23',1,'197',0,0),(6,116,'2003-03-23',1,'318',0,1),(7,121,'2003-03-23',1,'106',0,0),(8,122,'2003-03-23',1,'249',0,1),(9,123,'2003-03-23',1,'329',0,1),(10,124,'2003-03-23',1,'324',0,0),(11,125,'2003-03-23',1,'163',0,0),(12,126,'2003-03-23',1,'335',0,1),(13,131,'2003-03-23',1,'261',0,0),(14,132,'2003-03-23',1,'258',0,1),(15,133,'2003-03-23',1,'290',0,1),(16,134,'2003-03-23',1,'226',0,1),(17,135,'2003-03-23',1,'198',0,1),(18,136,'2003-03-23',1,'338',0,0),(19,141,'2003-03-23',1,'286',0,0),(20,142,'2003-03-23',1,'251',0,0),(21,143,'2003-03-23',1,'114',0,0),(22,144,'2003-03-23',1,'153',0,0),(23,145,'2003-03-23',1,'336',0,0),(24,146,'2003-03-23',1,'339',0,0),(25,151,'2003-03-23',1,'334',0,1),(26,152,'2003-03-23',1,'326',0,1),(27,153,'2003-03-23',1,'287',0,1),(28,154,'2003-03-23',1,'171',0,1),(29,155,'2003-03-23',1,'303',1,1),(30,156,'2003-03-23',1,'252',0,1),(31,161,'2003-03-23',1,'321',0,1),(32,162,'2003-03-23',1,'136',0,0),(33,163,'2003-03-23',1,'341',1,1),(34,164,'2003-03-23',1,'296',0,1),(35,165,'2003-03-23',1,'253',0,1),(36,166,'2003-03-23',1,'301',0,0),(37,171,'2003-03-23',1,'295',0,1),(38,172,'2003-03-23',1,'217',0,1),(39,173,'2003-03-23',1,'241',0,1),(40,174,'2003-03-23',1,'342',0,1),(41,175,'2003-03-23',1,'158',0,0),(42,176,'2003-03-23',1,'229',0,0),(43,181,'2003-03-23',1,'302',0,1),(44,182,'2003-03-23',1,'188',0,0),(45,183,'2003-03-23',1,'328',0,1),(46,184,'2003-03-23',1,'169',0,1),(47,185,'2003-03-23',1,'345',0,1),(48,186,'2003-03-23',1,'250',0,1),(49,191,'2003-03-23',1,'315',0,1),(50,192,'2003-03-23',1,'289',0,0),(51,193,'2003-03-23',1,'298',0,1),(52,194,'2003-03-23',1,'330',0,1),(53,195,'2003-03-23',1,'305',0,1),(54,196,'2003-03-23',1,'246',0,1),(55,211,'2003-03-23',1,'244',0,1),(56,214,'2003-03-23',1,'121',0,0),(57,215,'2003-03-23',1,'319',0,0),(58,216,'2003-03-23',1,'300',0,1),(59,221,'2003-03-23',1,'113',0,0),(60,222,'2003-03-23',1,'322',0,1),(61,223,'2003-03-23',1,'227',0,1),(62,224,'2003-03-23',1,'107',0,0),(63,225,'2003-03-23',1,'288',0,1),(64,226,'2003-03-23',1,'325',0,0),(65,231,'2003-03-23',1,'337',0,0),(66,232,'2003-03-23',1,'194',0,1),(67,233,'2003-03-23',1,'102',0,0),(68,234,'2003-03-23',1,'239',0,1),(69,235,'2003-03-23',1,'297',0,1),(70,236,'2003-03-23',1,'254',0,1),(71,241,'2003-03-23',1,'222',0,0),(72,242,'2003-07-13',1,'346',0,1),(73,243,'2003-03-23',1,'168',0,0),(74,244,'2003-03-23',1,'332',1,1),(75,245,'2003-03-23',1,'231',0,0),(76,246,'2003-03-23',1,'307',0,1),(77,251,'2003-03-23',1,'294',0,1),(78,252,'2003-03-23',1,'323',0,1),(79,253,'2003-03-23',1,'316',0,1),(80,254,'2003-03-23',1,'344',0,0),(81,255,'2003-03-23',1,'306',0,0),(82,256,'2003-03-23',1,'232',0,1),(83,261,'2003-03-23',1,'164',0,1),(84,262,'2003-03-23',1,'283',0,1),(85,263,'2003-03-23',1,'320',0,1),(86,264,'2003-03-23',1,'331',0,1),(87,265,'2003-03-23',1,'293',0,0),(88,266,'2003-03-23',1,'291',0,0),(89,271,'2003-03-23',1,'256',0,1),(90,272,'2003-03-23',1,'333',0,0),(91,273,'2003-03-23',1,'103',0,1),(92,274,'2003-03-23',1,'259',0,1),(93,275,'2003-03-23',1,'195',0,1),(94,276,'2003-03-23',1,'242',0,1),(95,281,'2003-03-23',1,'308',0,1),(96,282,'2003-03-23',1,'299',0,1),(97,283,'2003-03-23',1,'257',0,0),(98,284,'2003-03-23',1,'156',0,0),(99,285,'2003-03-23',1,'116',0,0),(100,286,'2003-03-23',1,'183',0,1),(101,291,'2003-03-23',1,'304',0,1),(102,292,'2003-03-23',1,'327',0,0),(103,293,'2003-03-23',1,'347',0,1),(104,294,'2003-03-23',1,'238',0,0),(105,295,'2003-03-23',1,'343',0,1),(106,296,'2003-03-23',1,'240',0,1),(107,166,'2002-12-24',1,'352',0,1),(108,142,'2003-07-31',0,'NMEM',0,1),(109,285,'2003-08-29',0,'NMEM',0,1),(110,233,'2003-09-01',1,'348',0,1),(111,224,'2003-11-07',1,'361',0,1),(112,243,'2003-12-10',0,'NMEM',0,1),(113,272,'2003-12-23',1,'350',0,1),(114,182,'2004-01-09',0,'NMEM',0,0),(115,284,'2004-02-20',1,'376',0,1),(116,113,'2004-04-06',0,'NMEM',0,1),(117,143,'2004-04-07',1,'358',0,1),(118,221,'2004-04-30',0,'NMEM',0,0),(119,254,'2004-07-07',0,'NMEM',0,1),(120,241,'2004-08-23',1,'356',1,1),(121,255,'2005-05-20',1,'351',1,1),(122,182,'2005-06-06',0,'NMEM',0,0),(123,265,'2005-07-20',0,'NMEM',0,1),(124,124,'2005-11-11',0,'NMEM',0,1),(125,231,'2005-11-21',1,'354',0,1),(126,192,'2005-12-15',1,'353',1,1),(127,145,'2006-01-02',0,'NMEM',0,1),(128,245,'2006-02-02',0,'NMEM',0,1),(129,292,'2006-04-24',0,'NMEM',0,1),(130,115,'2006-05-26',0,'NMEM',0,0),(131,221,'2006-12-18',1,'355',1,1),(132,176,'2007-04-13',0,'NMEM',1,1),(133,121,'2007-05-14',1,'357',0,1),(134,283,'2008-01-01',1,'257',0,1),(135,226,'2008-01-30',1,'?362',0,0),(136,115,'2008-03-04',0,'NMEM',0,0),(137,136,'2008-05-02',1,'364',0,1),(138,182,'2008-05-30',1,'363',1,1),(139,175,'2008-06-06',1,'377',1,1),(140,115,'2008-06-20',1,'360',0,0),(141,141,'2010-04-07',1,'366',1,0),(142,125,'2010-10-04',1,'367',0,1),(143,141,'2010-10-18',1,'?371',1,1),(144,144,'2010-11-05',0,'NMEM',0,0),(145,131,'2010-12-08',1,'369',0,1),(146,144,'2011-02-23',0,'NMEM',0,1),(147,115,'2011-05-04',1,'368',1,1),(148,215,'2011-06-24',1,'375',1,1),(149,146,'2011-06-27',1,'370',0,1),(150,214,'2011-09-29',1,'372',0,1),(151,266,'2011-11-01',0,'NMEM',0,1),(152,226,'2011-11-30',0,'NMEM',0,1),(153,294,'2012-02-29',0,'NMEM',0,1),(154,162,'2013-05-08',0,'NMEM',1,1);
/*!40000 ALTER TABLE `ownership` 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 2014-08-16 11:56:07
