You are on page 1of 4

------

MySQL dump 10.13 Distrib 5.6.25, for debian-linux-gnu (x86_64)


Host: localhost
Database: sjp481
-----------------------------------------------------Server version
5.6.25-1~dotdeb+7.1

/*!40101
/*!40101
/*!40101
/*!40101
/*!40103
/*!40103
/*!40014
/*!40014
*/;
/*!40101
/*!40111

SET
SET
SET
SET
SET
SET
SET
SET

@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
NAMES utf8 */;
@OLD_TIME_ZONE=@@TIME_ZONE */;
TIME_ZONE='+00:00' */;
@OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0

SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--- Table structure for table `Adminregister`


-DROP TABLE IF EXISTS `Adminregister`;
/*!40101 SET @saved_cs_client
= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Adminregister` (
`Full_Name` varchar(50) DEFAULT NULL,
`UserName` varchar(50) NOT NULL,
`Email` varchar(50) DEFAULT NULL,
`Password` varchar(40) DEFAULT NULL,
PRIMARY KEY (`UserName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--- Dumping data for table `Adminregister`
-LOCK TABLES `Adminregister` WRITE;
/*!40000 ALTER TABLE `Adminregister` DISABLE KEYS */;
INSERT INTO `Adminregister` VALUES ('Hetal Modi','Hetal Modi','hetal.modi30@gmai
l.com','1234'),('Sejal','Sejal Patel','Sejal@gmail.com','1234'),('Ujjwal Raj A',
'Ujjwal Raj','ujjwalraj@gmail.com','1234');
/*!40000 ALTER TABLE `Adminregister` ENABLE KEYS */;
UNLOCK TABLES;
--- Table structure for table `Productlist`
-DROP TABLE IF EXISTS `Productlist`;
/*!40101 SET @saved_cs_client
= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Productlist` (
`Prod_Id` int(11) NOT NULL AUTO_INCREMENT,
`Product_name` varchar(50) NOT NULL,
`Description` varchar(50) NOT NULL,
`price` decimal(7,2) NOT NULL,
`Picture` blob,
`Gender` varchar(25) NOT NULL,

`Select_item` int(12) DEFAULT NULL,


`Picture1` blob,
UNIQUE KEY `prod_number` (`Prod_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--- Dumping data for table `Productlist`
-LOCK TABLES `Productlist` WRITE;
/*!40000 ALTER TABLE `Productlist` DISABLE KEYS */;
INSERT INTO `Productlist` VALUES (1,'Clothing','new arrival sleeveless top',12.0
0,'topsl.jpg','Female',NULL,'topsl.jpg'),(2,'Clothing','unisex top',10.00,'unise
x.jpg','Both',NULL,'unisex.jpg'),(4,'Clothing','top',12.00,NULL,'Both',NULL,NULL
),(5,'Clothing','shirts',89.00,'male.jpg','Both',NULL,'male.jpg'),(6,'Footware',
'Menshoe',55.00,'maleshoe1.jpg','Male',NULL,'maleshoe1.jpg'),(7,'Footware','Mens
hoes',25.00,'maleshoe2.jpg','Male',NULL,'maleshoe2.jpg'),(8,'Footware','MenShoe'
,89.00,'bothshoe2.jpg','Both',NULL,'bothshoe2.jpg'),(9,'Accessories','menwatch',
125.00,'menwatch1.jpg','Male',NULL,'menwatch1.jpg'),(10,'Accessories','Baby hair
band',120.00,'GirlAcc1.jpg','Female',NULL,'GirlAcc1.jpg'),(11,'Accessories','uni
sex watch',156.00,'bothwatch.jpg','Both',NULL,'bothwatch.jpg'),(12,'Footware','w
omen shoe',89.00,'female1.jpg','Female',NULL,'female1.jpg'),(18,'Footware','new
arrival ',50.00,'female2.jpg','Female',NULL,NULL),(20,'Clothing','new arrival ',
20.00,'men.jpg','Male',NULL,NULL),(21,'Clothing','new arrival 2016',52.00,'image
.jpg','Female',NULL,NULL);
/*!40000 ALTER TABLE `Productlist` ENABLE KEYS */;
UNLOCK TABLES;
--- Table structure for table `Purchase`
-DROP TABLE IF EXISTS `Purchase`;
/*!40101 SET @saved_cs_client
= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Purchase` (
`Purchase_Id` int(15) NOT NULL AUTO_INCREMENT,
`Surname` varchar(30) NOT NULL,
`First_Name` varchar(30) NOT NULL,
`Address` varchar(30) NOT NULL,
`Postcode` varchar(30) NOT NULL,
`Phone_Number` int(10) NOT NULL,
`Card_type` varchar(30) DEFAULT NULL,
`Card_Number` int(15) DEFAULT NULL,
PRIMARY KEY (`Purchase_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--- Dumping data for table `Purchase`
-LOCK TABLES `Purchase` WRITE;
/*!40000 ALTER TABLE `Purchase` DISABLE KEYS */;
INSERT INTO `Purchase` VALUES (1,'Modi','hetal','11-6-A, John lester court','M6
5HE',2147483647,NULL,2147483647),(2,'Modi','Hetal','11-6-A, John lester court','
M6 5HE',2147483647,'visa',2147483647),(14,'Raj','Ujjwal','London','L786w',214748
3647,'Visa',2147483647),(15,'Modi','Vivek','Mumbai','4012HE',2147483647,'visa',2
147483647),(16,'Modi','Vivek','Mumbai','4012HE',2147483647,'visa',2147483647),(1

7,'Modi','Vivek','Mumbai','4012HE',2147483647,'visa',2147483647),(18,'Modi','Het
al','11-6-A, John lester court','M6 5HE',2147483647,'visa',2147483647),(19,'k','
hjh','jhj','782',2147483647,'visa',2147483647),(20,'Modi','Hetal','11-6-A, John
lester court','M6 5HE',2147483647,'visa',2147483647);
/*!40000 ALTER TABLE `Purchase` ENABLE KEYS */;
UNLOCK TABLES;
--- Table structure for table `Register`
-DROP TABLE IF EXISTS `Register`;
/*!40101 SET @saved_cs_client
= @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Register` (
`Full_Name` varchar(50) NOT NULL,
`UserName` varchar(50) NOT NULL DEFAULT '',
`Email` varchar(50) NOT NULL,
`Password` varchar(40) NOT NULL,
PRIMARY KEY (`UserName`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--- Dumping data for table `Register`
-LOCK TABLES `Register` WRITE;
/*!40000 ALTER TABLE `Register` DISABLE KEYS */;
INSERT INTO `Register` VALUES ('abc','abc','hjhkjk@hnm,m','1234'),('Gargie','Gar
gie','Gargie@gmail.com','1234'),('Hetal Modi','Hetal Modi','hetal.modi30@gmail.c
om','1234'),('Maame','Maame','maame@gmail.com','1234'),('Poovarasu ArulmozhiMuru
gesan','Poov','poovarasu.am@gmail.com','1234'),('Sejal','Sejal Patel','Sejal@gma
il.com','1234'),('Sid ','Sid','sid@gmail.com','1234'),('Tanzia Latifi','Tanzia L
atifi','ohi.latifi@gmail.com','1234'),('Ujjwal Raj A','Ujjwal Raj','ujjwalraj@gm
ail.com','1234'),('Visal','Vishal','vivek@gmail.com','1234'),('Vivek Modi','Vive
k Modi','vivek@gmail.com','1234');
/*!40000 ALTER TABLE `Register` ENABLE KEYS */;
UNLOCK TABLES;
--- Dumping events for database 'sjp481'
---- Dumping routines for database 'sjp481'
-/*!50003 DROP FUNCTION IF EXISTS `giveraise` */;
/*!50003 SET @saved_cs_client
= @@character_set_client */ ;
/*!50003 SET @saved_cs_results
= @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode
= @@sql_mode */ ;
/*!50003 SET sql_mode
= '' */ ;
DELIMITER ;;
CREATE DEFINER=`sjp481`@`%` FUNCTION `giveraise`(oldVal double, amount double) R
ETURNS double
DETERMINISTIC

begin
declare newVal double;
set newVal =oldVal * (1+ amount);
return newVal;
end ;;
DELIMITER ;
/*!50003 SET sql_mode
= @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `updateSalary` */;
/*!50003 SET @saved_cs_client
= @@character_set_client */ ;
/*!50003 SET @saved_cs_results
= @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode
= @@sql_mode */ ;
/*!50003 SET sql_mode
= '' */ ;
DELIMITER ;;
CREATE DEFINER=`sjp481`@`%` PROCEDURE `updateSalary`()
begin
declare done int default 0;
declare current_dnum int;
declare dnumcur cursor for select dnumber from deptsal;
declare continue handler for not found set done =1;
open dnumcur;
repeat
fetch dnumcur into current_dnum;
update deptsal
set totalsalary = (select sum(salary) from employee where dno=current_dnum)
where dnumber =current_dnum;
until done
end repeat;
close dnumcur;
end ;;
DELIMITER ;
/*!50003 SET sql_mode
= @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101
/*!40014
/*!40014
/*!40101
/*!40101
/*!40101
/*!40111

SET
SET
SET
SET
SET
SET
SET

SQL_MODE=@OLD_SQL_MODE */;
FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2016-01-14 22:54:51