-- phpMyAdmin SQL Dump
-- version 4.1.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 23 Lip 2015, 12:53
-- Server version: 5.6.16
-- PHP Version: 5.5.11

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: `kantor`
--

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

--
-- Struktura tabeli dla tabeli `klient`
--

CREATE TABLE IF NOT EXISTS `klient` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `imie` text,
  `nazwisko` text,
  `PESEL` text,
  `stanKonta` double DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Zrzut danych tabeli `klient`
--

INSERT INTO `klient` (`id`, `imie`, `nazwisko`, `PESEL`, `stanKonta`) VALUES
(1, 'Jan', 'Nowak', '00000000000', 302),
(2, 'Anna', 'Kowalska', '00000000000', 540),
(3, 'Krzysztof', 'Kowalski', '00000000000', 0);

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

--
-- Struktura tabeli dla tabeli `kurs`
--

CREATE TABLE IF NOT EXISTS `kurs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nazwaWaluty` text,
  `kurs` double DEFAULT NULL,
  `dataKursu` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Zrzut danych tabeli `kurs`
--

INSERT INTO `kurs` (`id`, `nazwaWaluty`, `kurs`, `dataKursu`) VALUES
(1, 'dolar', 3.7, '2015-07-01'),
(2, 'euro', 4.2, '2015-07-01'),
(3, 'frank szwajcarski', 4, '2015-07-01');

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

--
-- Struktura tabeli dla tabeli `wymiana`
--

CREATE TABLE IF NOT EXISTS `wymiana` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `klientId` int(10) unsigned DEFAULT NULL,
  `kursId` int(10) unsigned DEFAULT NULL,
  `ile` double DEFAULT NULL,
  `dataWymiany` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Zrzut danych tabeli `wymiana`
--

INSERT INTO `wymiana` (`id`, `klientId`, `kursId`, `ile`, `dataWymiany`) VALUES
(1, 1, 1, 20, '2015-07-16'),
(2, 2, 1, 30, '2015-07-07'),
(3, 2, 3, 10, '2015-07-14'),
(4, 3, 2, 10, '2015-07-14');

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