Senin, 16 April 2012

Database Bank Mateng Beserta Isinya


-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 15, 2011 at 03:00 AM
-- Server version: 5.1.41
-- PHP Version: 5.3.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


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

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

--
-- Table structure for table `accounts`
--

CREATE TABLE IF NOT EXISTS `accounts` (
  `account_no` varchar(10) NOT NULL,
  `acc_balance` int(7) NOT NULL,
  `branch_no` varchar(8) NOT NULL,
  PRIMARY KEY (`account_no`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` (`account_no`, `acc_balance`, `branch_no`) VALUES
('02831', 150, '98-55-41'),
('02832', 1000, '98-55-41'),
('02833', 500, '98-55-41');

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

--
-- Table structure for table `branch`
--

CREATE TABLE IF NOT EXISTS `branch` (
  `branch_no` varchar(8) NOT NULL,
  `branch_address` varchar(30) NOT NULL,
  `manager` varchar(30) NOT NULL,
  PRIMARY KEY (`branch_no`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `branch`
--

INSERT INTO `branch` (`branch_no`, `branch_address`, `manager`) VALUES
('98-55-41', '6 main st', 'Mr Jones'),
('98-55-42', '14 silver st', 'Mrs Jennifer');

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

--
-- Table structure for table `customers`
--

CREATE TABLE IF NOT EXISTS `customers` (
  `cust_code` varchar(10) NOT NULL,
  `cust_name` varchar(20) NOT NULL,
  `cust_address` varchar(40) NOT NULL,
  `cust_occupation` varchar(40) NOT NULL,
  PRIMARY KEY (`cust_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` (`cust_code`, `cust_name`, `cust_address`, `cust_occupation`) VALUES
('1023F', 'Jim Green', '4 Blackhill Rd', 'Doctor'),
('6481D', 'Marry Black', '8 Town Rd', 'Student'),
('9111H', 'Pat Brown', '102 Main St', 'Unemployed');

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

--
-- Table structure for table `have`
--

CREATE TABLE IF NOT EXISTS `have` (
  `cust_code` varchar(10) NOT NULL,
  `account_no` varchar(20) NOT NULL,
  PRIMARY KEY (`cust_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `have`
--

INSERT INTO `have` (`cust_code`, `account_no`) VALUES
('1023F', '02831'),
('6481D', '02832'),
('9111H', '02833');

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

--
-- Table structure for table `transactions`
--

CREATE TABLE IF NOT EXISTS `transactions` (
  `trans_no` varchar(4) NOT NULL,
  `trans_date` date NOT NULL,
  `trans_time` varchar(5) NOT NULL,
  `trans_amount` int(4) NOT NULL,
  `trans_type` varchar(20) NOT NULL,
  `account_no` varchar(20) NOT NULL,
  PRIMARY KEY (`trans_no`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `transactions`
--

INSERT INTO `transactions` (`trans_no`, `trans_date`, `trans_time`, `trans_amount`, `trans_type`, `account_no`) VALUES
('1021', '2001-05-16', '08.20', 100, 'withdrawal', '02831'),
('1032', '2001-05-18', '10.10', 50, 'withdrawal', '02831'),
('8999', '2001-07-20', '13.02', 40, 'deposit', '02832'),
('4432', '2001-08-21', '09.22', 10, 'withdrawal', '02833'),
('9433', '2001-08-21', '10.34', 10, 'withdrawal', '02833');

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

0 komentar:

Posting Komentar