The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
Create a small Java GUI with 3 forms and a menu for an SQL database. JDBC driver for MySQL
Â
Form 1
Â
Display information from a single table in the database. It should include four buttons(first, previous, next, and last). The buttons will allow the user to move through all the rows in table.
Â
Form 2
Will display information from more than one table. The underlying query must include join between at least two tables.
Â
Form 3:
Divided into two parts. The first reads input from the user. The form then uses the user input to retrieve information from the database then display it in the other part of the form.
Â
Menu:
Menu to allows for use of the three forms.
Â
.
.
.
DATABASE.SQL
DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customer` (
`cus_code` int(11) NOT NULL,
`cus_lname` varchar(20) DEFAULT NULL,
`cus_fname` varchar(20) DEFAULT NULL,
`cus_initial` char(1) DEFAULT NULL,
`cus_areacode` int(11) DEFAULT NULL,
`cus_phone` int(11) DEFAULT NULL,
PRIMARY KEY (`cus_code`),
KEY `idx_customer_cus_code` (`cus_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `customer` WRITE;
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
INSERT INTO `customer` VALUES (10010,'Algy','Alfred','A',615,8442573),(10011,'Dunne','Leona','K',713,8941238),(10012,'Smith','Kathy','W',615,8942285),(10013,'Olowski','Paul','F',615,2221672),(10014,'Orlando','Myron',NULL,615,2971228);
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `invoice`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoice` (
`inv_number` int(11) NOT NULL,
`cus_code` int(11) DEFAULT NULL,
`inv_date` date DEFAULT NULL,
PRIMARY KEY (`inv_number`),
KEY `cus_code` (`cus_code`),
CONSTRAINT `invoice_ibfk_1` FOREIGN KEY (`cus_code`) REFERENCES `customer` (`cus_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `invoice` WRITE;
/*!40000 ALTER TABLE `invoice` DISABLE KEYS */;
INSERT INTO `invoice` VALUES (1001,10011,'2008-08-03'),(1002,10014,'2008-08-04'),(1003,10012,'2008-03-20'),(1004,10014,'2008-09-23');
/*!40000 ALTER TABLE `invoice` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `line`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `line` (
`inv_number` int(11) NOT NULL,
`prod_code` int(11) NOT NULL,
`line_units` int(11) DEFAULT NULL,
PRIMARY KEY (`inv_number`,`prod_code`),
KEY `prod_code` (`prod_code`),
CONSTRAINT `line_ibfk_1` FOREIGN KEY (`inv_number`) REFERENCES `invoice` (`inv_number`),
CONSTRAINT `line_ibfk_2` FOREIGN KEY (`prod_code`) REFERENCES `product` (`prod_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `line` WRITE;
/*!40000 ALTER TABLE `line` DISABLE KEYS */;
INSERT INTO `line` VALUES (1001,12321,1),(1001,65781,3),(1002,12321,6),(1002,34256,6),(1003,12321,5);
/*!40000 ALTER TABLE `line` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `product` (
`prod_code` int(11) NOT NULL,
`prod_desc` varchar(50) DEFAULT NULL,
`prod_price` int(11) DEFAULT NULL,
`prod_quant` int(11) DEFAULT NULL,
`vend_code` int(11) DEFAULT NULL,
PRIMARY KEY (`prod_code`),
KEY `vend_code` (`vend_code`),
CONSTRAINT `product_ibfk_1` FOREIGN KEY (`vend_code`) REFERENCES `vendor` (`vend_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (12321,'hammer',189,20,232),(12322,'coil',189,20,231),(12333,'hanger',200,10,232),(34256,'tape',35,60,235),(65781,'chain',12,45,235);
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;
DROP TABLE IF EXISTS `vendor`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendor` (
`vend_code` int(11) NOT NULL,
`vend_name` varchar(30) DEFAULT NULL,
`vend_contact` varchar(30) DEFAULT NULL,
`vend_areacode` int(11) DEFAULT NULL,
`vend_phone` int(11) DEFAULT NULL,
PRIMARY KEY (`vend_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `vendor` WRITE;
/*!40000 ALTER TABLE `vendor` DISABLE KEYS */;
INSERT INTO `vendor` VALUES (871,'Adam','Eric',925,5559494),(232,'Bryson','Smith',871,5559713),(235,'Hanker','Anderson',208,5554933);
/*!40000 ALTER TABLE `vendor` ENABLE KEYS */;
UNLOCK TABLES;
-----------