-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 10, 2013 at 03:34 PM
-- Server version: 5.5.31
-- PHP Version: 5.3.10-1ubuntu3.6

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!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 */;

--
-- Database: `test`
--

-- --------------------------------------------------------

--
-- Table structure for table `AC`
--

DROP TABLE IF EXISTS `AC`;
CREATE TABLE IF NOT EXISTS `AC` (
  `bid` int(10) NOT NULL AUTO_INCREMENT,
  `Ac` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Cur` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `dt` datetime DEFAULT NULL,
  PRIMARY KEY (`bid`),
  KEY `cur` (`Cur`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
-- Dumping data for table `AC`
--

INSERT INTO `AC` (`bid`, `Ac`, `Cur`, `dt`) VALUES
(1, 'AC1', 'GBP', '0007-10-00 00:00:00'),
(2, 'AC2', 'USD', '2013-07-10 00:00:00'),
(3, 'AC3', 'GBP', NULL);

-- --------------------------------------------------------

--
-- Table structure for table `Currency`
--

DROP TABLE IF EXISTS `Currency`;
CREATE TABLE IF NOT EXISTS `Currency` (
  `CurrencyCode` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `CurrencyName` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`CurrencyCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `Currency`
--

INSERT INTO `Currency` (`CurrencyCode`, `CurrencyName`) VALUES
('GBP', 'British Pound'),
('USD', 'US Dollar');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `AC`
--
ALTER TABLE `AC`
  ADD CONSTRAINT `AC_ibfk_1` FOREIGN KEY (`Cur`) REFERENCES `Currency` (`CurrencyCode`);

/*!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 */;
