SQL - Programming Help

SQL – Design and Analysis of Data Systems

SQL – Design and Analysis of Data Systems

— phpMyAdmin SQL Dump
— version 4.9.2
— https://www.phpmyadmin.net/

— Host: 127.0.0.1
— Generation Time: Apr 06, 2020 at 01:56 PM
— Server version: 10.4.11-MariaDB
— PHP Version: 7.2.26

SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;
SET AUTOCOMMIT = 0;
START TRANSACTION;
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 utf8mb4 */;


— Database: `oltp`

— ——————————————————–


— Table structure for table `adventureworks`

CREATE TABLE `adventureworks` (
`ID` int(10) NOT NULL,
`Name` varchar(35) NOT NULL,
`Bike` varchar(35) NOT NULL,
`Model` varchar(35) NOT NULL,
`Color` varchar(35) NOT NULL,
`Year` year(4) NOT NULL,
`Sold` varchar(35) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


— Dumping data for table `adventureworks`

INSERT INTO `adventureworks` (`ID`, `Name`, `Bike`, `Model`, `Color`, `Year`, `Sold`) VALUES
(10, ‘Brown’, ‘Honda’, ‘H789’, ‘Red’, 2002, ‘Yes’),
(11, ‘Lucy’, ‘Adventure’, ‘A345’, ‘Blue’, 2003, ‘Yes’),
(12, ‘Alfreds’, ‘Flyer’, ‘F567’, ‘Black’, 2004, ‘Yes’),
(13, ‘Kaze’, ‘Activa’, ‘A345’, ‘Red’, 2003, ‘No’),
(14, ‘Lucy’, ‘Adventure’, ‘A345’, ‘Blue’, 2003, ‘No’),
(15, ‘Alfreds’, ‘Flyer’, ‘F567’, ‘Black’, 2004, ‘No’),
(16, ‘Kaze’, ‘Activa’, ‘A345’, ‘Red’, 2003, ‘Yes’),
(17, ‘Brown’, ‘Honda’, ‘H789’, ‘Red’, 2002, ‘No’),
(18, ‘Lucy’, ‘Adventure’, ‘A345’, ‘Blue’, 2003, ‘Yes’),
(19, ‘Alfreds’, ‘Flyer’, ‘F567’, ‘Black’, 2004, ‘No’),
(20, ‘Kaze’, ‘Activa’, ‘A345’, ‘Red’, 2003, ‘Yes’);

— ——————————————————–


— Table structure for table `customer`

CREATE TABLE `customer` (
`customerID` varchar(35) NOT NULL,
`ID` int(10) NOT NULL,
`Name` varchar(35) NOT NULL,
`Address` varchar(35) NOT NULL,
`State/province` varchar(35) NOT NULL,
`Email` varchar(35) NOT NULL,
`SalesVolume` varchar(35) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


— Dumping data for table `customer`

INSERT INTO `customer` (`customerID`, `ID`, `Name`, `Address`, `State/province`, `Email`, `SalesVolume`) VALUES
(‘C12’, 10, ‘Brown’, ‘Near Park 6’, ‘Newyork’, ‘brown@gmail.com’, ‘789’),
(‘C13’, 14, ‘Lucy’, ‘London near street 6’, ‘London’, ‘lucy@gmail.com’, ‘890’),
(‘C14’, 15, ‘Alfreds’, ‘South Carolina’, ‘South Est’, ‘a1@gmail.com’, ‘440’),
(‘C15’, 16, ‘Kaze’, ‘Near water park’, ‘London’, ‘ka@gmail.com’, ‘900’),
(‘C16’, 10, ‘Brown’, ‘Near Park 6’, ‘Newyork’, ‘brown@gmail.com’, ‘200’),
(‘C17’, 14, ‘Lucy’, ‘London near street 6’, ‘London’, ‘lucy@gmail.com’, ‘345’),
(‘C18’, 15, ‘Alfreds’, ‘South Carolina’, ‘South Est’, ‘a1@gmail.com’, ‘500’),
(‘C19’, 16, ‘Kaze’, ‘Near water park’, ‘London’, ‘ka@gmail.com’, ‘345’);

— ——————————————————–


— Table structure for table `dimemployee`

CREATE TABLE `dimemployee` (
`EmpID` varchar(35) NOT NULL,
`Name` varchar(35) NOT NULL,
`Address` varchar(35) NOT NULL,
`LoginID` varchar(35) NOT NULL,
`Password` varchar(35) NOT NULL,
`BikeID` varchar(35) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;


— Dumping data for table `dimemployee`

INSERT INTO `dimemployee` (`EmpID`, `Name`, `Address`, `LoginID`, `Password`, `BikeID`) VALUES
(‘E123’, ‘Tom Cru’, ‘Near Kk park’, ‘tw@gmail.com’, ‘123’, ’10’),
(‘E124’, ‘Maze’, ‘Water parrk’, ‘m@gmail.com’, ‘567’, ’11’),
(‘E125’, ‘Maze’, ‘Water parrk’, ‘m@gmail.com’, ‘567’, ’11’),
(‘E126’, ‘Tomy Cru’, ‘Near Kk park’, ‘tw@gmail.com’, ‘123’, ’12’),
(‘E127’, ‘Malle’, ‘Water parrk’, ‘m@gmail.com’, ‘567’, ’14’),
(‘E128’, ‘Toy Cru’, ‘Near Kk park’, ‘tw@gmail.com’, ‘123’, ’10’),
(‘E129’, ‘Maze’, ‘Water parrk’, ‘m@gmail.com’, ‘567’, ’15’),
(‘E130’, ‘Tom Cru’, ‘Near Kk park’, ‘tw@gmail.com’, ‘123’, ’19’),
(‘E131’, ‘Maze’, ‘Water parrk’, ‘m@gmail.com’, ‘567’, ’16’),
(‘E132’, ‘Tom Cru’, ‘Near Kk park’, ‘tw@gmail.com’, ‘123’, ’10’);


— Indexes for dumped tables


— Indexes for table `adventureworks`

ALTER TABLE `adventureworks`
ADD PRIMARY KEY (`ID`);


— Indexes for table `customer`

ALTER TABLE `customer`
ADD PRIMARY KEY (`customerID`);


— Indexes for table `dimemployee`

ALTER TABLE `dimemployee`
ADD PRIMARY KEY (`EmpID`);
COMMIT;

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