/*
SQLyog Enterprise - MySQL GUI v7.15
MySQL - 5.0.51b-community-nt-log : Database - bus_db
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!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' */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`bus_db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
insert into `tb_busprice`(`price_id`,`bustype_id`,`busstop_id`,`price`) values (1,1,1,20),(2,1,2,25),(3,1,3,30),(4,2,1,10),(5,2,2,15),(6,2,3,12),(7,3,1,5),(8,3,2,12),(9,3,3,7);
insert into `tb_busstop`(`busstop_id`,`route_id`,`station_id`,`station_id2`,`point_no`,`distance`) values (1,1,1,2,0,5),(2,1,2,8,1,10),(3,1,8,5,2,20),(4,1,5,NULL,3,0),(5,2,1,4,0,10),(6,2,4,5,1,10),(7,2,5,NULL,2,0),(8,3,1,4,0,5),(9,3,4,5,1,15),(10,3,5,3,2,30),(11,3,3,NULL,3,0),(12,4,6,8,0,5),(13,4,8,5,1,10),(14,4,5,NULL,2,0),(15,5,6,10,0,15),(16,5,10,11,1,10),(17,5,11,NULL,2,0);
insert into `tb_bustime`(`time_id`,`bus_id`,`busstop_id`,`time_travel`,`time_stop`) values (1,1,1,'05:00:00','06:00:00'),(2,1,2,'06:05:00','08:00:00'),(3,1,3,'08:05:00','09:00:00'),(5,2,1,'10:00:00','11:00:00'),(6,2,2,'11:05:00','12:00:00'),(7,2,3,'12:05:00','13:00:00'),(9,3,1,'14:00:00','15:00:00'),(10,3,2,'15:05:00','16:00:00'),(11,3,3,'16:05:00','17:00:00'),(13,4,5,'04:00:00','05:00:00'),(14,4,6,'05:05:00','06:00:00'),(16,5,5,'05:00:00','06:00:00'),(17,5,6,'06:05:00','07:00:00');
insert into `tb_station`(`station_id`,`station_name`,`lat`,`lng`) values (1,'ขอนแก่น',16.496666,102.785339),(2,'เชียงยืน',16.407846,103.105919),(3,'ร้อยเอ็ด',16.016775,103.647766),(4,'โกสุมพิสัย',16.248545,103.066818),(5,'มหาสารคาม',16.127625,103.314056),(6,'กาฬสินธุ์',16.434027,103.505974),(7,'อุดรธานี',13.974925,100.590607),(8,'กันทรวิชัย',16.259504,103.257751),(9,'กมลาไสย',16.338797,103.575752),(10,'สกลนคร',17.125124,104.053871),(11,'นครพนม',17.379515,104.682152);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;