text: -- phpMyAdmin SQL Dump
  -- version 3.4.10.1deb1
  -- http://www.phpmyadmin.net
  --
  -- Host: localhost
  -- Generation Time: Oct 15, 2015 at 04:53 PM
  -- Server version: 5.5.43
  -- PHP Version: 5.4.42-1+deb.sury.org~precise+1
  
  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: `loop`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `company`
  --
  
  CREATE TABLE IF NOT EXISTS `company` (
    `company_id` int(11) NOT NULL AUTO_INCREMENT,
    `company_name` varchar(255) NOT NULL,
    `company_description` text NOT NULL,
    PRIMARY KEY (`company_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `event`
  --
  
  CREATE TABLE IF NOT EXISTS `event` (
    `event_id` int(11) NOT NULL AUTO_INCREMENT,
    `event_name` varchar(255) NOT NULL,
    `event_description` text NOT NULL,
    `event_time` datetime NOT NULL,
    PRIMARY KEY (`event_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `product`
  --
  
  CREATE TABLE IF NOT EXISTS `product` (
    `product_id` int(11) NOT NULL AUTO_INCREMENT,
    `product_name` varchar(255) NOT NULL,
    `product_description` text NOT NULL,
    `company_id` int(11) NOT NULL,
    PRIMARY KEY (`product_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `rating_user_upload`
  --
  
  CREATE TABLE IF NOT EXISTS `rating_user_upload` (
    `upload_id` int(11) NOT NULL,
    `user_id` int(11) NOT NULL,
    `rating` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `relation_upload_product`
  --
  
  CREATE TABLE IF NOT EXISTS `relation_upload_product` (
    `upload_product_id` int(11) NOT NULL AUTO_INCREMENT,
    `upload_id` int(11) NOT NULL,
    `product_id` int(11) NOT NULL,
    PRIMARY KEY (`upload_product_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `upload`
  --
  
  CREATE TABLE IF NOT EXISTS `upload` (
    `upload_id` int(11) NOT NULL AUTO_INCREMENT,
    `upload_name` varchar(255) DEFAULT NULL,
    `upload_time` datetime DEFAULT NULL,
    `upload_type` varchar(255) DEFAULT NULL,
    `sport_category` varchar(255) DEFAULT NULL,
    `upload_path` varchar(255) DEFAULT NULL,
    `upload_data` longblob,
    `event_id` int(11) DEFAULT NULL,
    `average_rating` double DEFAULT NULL,
    PRIMARY KEY (`upload_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE IF NOT EXISTS `user` (
    `user_id` int(11) NOT NULL AUTO_INCREMENT,
    `user_name` varchar(255) NOT NULL,
    `user_email` varchar(255) NOT NULL,
    `user_password` varchar(255) NOT NULL,
    PRIMARY KEY (`user_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
  
  /*!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 */;
  