Database Design
Posted on: March 3, 2011 at 12:00 AM
Database Design

Database Design

To design the database you first need to install the MySql database. The After create the database as

 create database if not exists `onlinexamination`;
Then create the table new_ques which contains the queshon.

CREATE TABLE `new_ques` (                    
            `quesno` int(10) NOT NULL auto_increment,  
            `language` varchar(15) NOT NULL,           
            `question` varchar(800) NOT NULL,          
            `ans1` varbinary(150) NOT NULL,            
            `ans2` varchar(150) NOT NULL,              
            `ans3` varchar(150) default NULL,          
            `ans4` varchar(150) default NULL,          
            `rightans` varchar(150) NOT NULL,          
            PRIMARY KEY  (`quesno`)                    

Create Table result_info Which consists results of online examination
CREATE TABLE `result_info` (            
               `username` varchar(20) default NULL,  
               `quesno` int(10) NOT NULL,            
               `selectopt` varchar(150) NOT NULL,    
               `language` varchar(100) default NULL  

Then After create s_registration table which contains the student detail
CREATE TABLE `s_registration` (         
                  `name` varchar(50) default NULL,      
                  `address` varchar(100) default NULL,  
                  `dob` datetime default NULL,          
                  `phone` varchar(12) default NULL,     
                  `gender` varchar(2) default NULL,     
                  `branch` varchar(20) default NULL,    
                  `year` varchar(4) default NULL,       
                  `rollno` int(10) default NULL,        
                  `username` varchar(20) NOT NULL,      
                  `password` varchar(10) default NULL,  
                  PRIMARY KEY  (`username`)             

You can also download the Database BackUp.

Related Tags for Database Design:



Advertisement null