Home Jsf Richfaces Developing database for the application
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Developing database for the application

Advertisement
We have used MySQL for storing and retrieving the information for this application.

Developing Database for the Application

    

We have used MySQL for storing and retrieving the information for this application. The name of the table is "register" under the database named "application" where field "id" is primary key and is set to auto-increment

Fields of the table can be seen as in the figure below:  

 

 

 

 

 

 

You can create the database and table using "register.sql" sql script.

/*
SQLyog Community Edition- MySQL GUI v5.22a
Host - 5.0.19-nt : Database - application
*********************************************************************
Server version : 5.0.19-nt
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

create database if not exists `application`;

USE `application`;

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

/*Table structure for table `register` */

DROP TABLE IF EXISTS `register`;

CREATE TABLE `register` (
`id` bigint(10) NOT NULL auto_increment,
`firstName` varchar(20) default NULL,
`lastName` varchar(20) default NULL,
`userName` varchar(20) default NULL,
`password` varchar(20) default NULL,
`email` varchar(40) default NULL,
`contactNo` varchar(20) default NULL,
`address` varchar(40) default NULL,
`country` varchar(30) default NULL,
`state` varchar(30) default NULL,
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*Data for the table `register` */

insert into `register`(`id`,`firstName`,`lastName`,`userName`,`password`,
`email`,`contactNo`,`address`,`country`,`state`) values (1,'Ravi','Kant','ravikant','ravikant','raviksachan@gmail.com'
,'9999999999','Delhi','India','Delhi');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;

Download Script for database

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: June 24, 2008

Related Tutorials

Ask Questions?    Discuss: Developing database for the application  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com