TEXT   59

database.txt

Guest on 10th June 2021 11:08:10 PM

  1. create table personal(
  2.    candidateId int not null auto_increment,
  3.    firstName varchar(100),
  4.    middleName varchar(100),
  5.    lastName varchar(100),
  6.    nickName varchar(100),
  7.    fatherName varchar(100),
  8.    fatherMiddleName varchar(100),
  9.    fatherLastName varchar(100),
  10.    dateofBirth date,
  11.    gender varchar(10),
  12.    maritalStatus varchar(20),
  13.    aadhaar varchar(15),
  14.    suggestion varchar(500),
  15.    remark varchar(500),
  16.    times datetime,  
  17.    primary key(candidateId)  
  18. )
  19.  
  20. create table birthDetail(
  21.       birthId int not null auto_increment,
  22.         candidateId int,
  23.         placeofBirth varchar(100),
  24.         stateofBirth varchar(100),
  25.         countryofBirth varchar(100),
  26.         primary key(birthId),
  27.         foreign key(candidateId)
  28.         references personal(candidateId)
  29.         ON UPDATE CASCADE ON DELETE RESTRICT
  30. )
  31.  
  32. create table contact(
  33.      contactId int not null auto_increment,
  34.        candidateId int,
  35.        mobileNumber varchar(12),
  36.        alternativeNumber varchar(12),
  37.        email varchar(50),
  38.        presentAddress varchar(300),
  39.        permanentAddress varchar(300),
  40.        primary key(contactId),
  41.      foreign key(candidateId)
  42.        references personal(candidateId)
  43.        ON UPDATE CASCADE ON DELETE RESTRICT      
  44. )
  45.  
  46. create table passport(
  47.      passportId int not null auto_increment,
  48.        candidateId int,
  49.        passportNumber varchar(30),
  50.        placeofIssue varchar(50),
  51.        dateofIssue date,
  52.        primary key(passportId),
  53.      foreign key(candidateId)
  54.        references personal(candidateId)
  55.        ON UPDATE CASCADE ON DELETE RESTRICT            
  56. )
  57.  
  58. create table qualification(
  59.      qualificationId int not null auto_increment,
  60.        candidateId int,
  61.        academic varchar(50),
  62.        technical varchar(50),
  63.        currentCompany varchar(50),
  64.        position varchar(50),
  65.        experience varchar(20),
  66.        primary key(qualificationId),
  67.      foreign key(candidateId)
  68.        references personal(candidateId)
  69.        ON UPDATE CASCADE ON DELETE RESTRICT            
  70. )
  71.  
  72. create table valuer(
  73.      valuerId int not null auto_increment,
  74.        candidateId int,
  75.        valuerName varchar(50),
  76.        valuerPosition varchar(50),
  77.        valuerContact varchar(50),
  78.        valuerDateofValidation date,
  79.        primary key(valuerId),
  80.      foreign key(candidateId)
  81.        references personal(candidateId)
  82.        ON UPDATE CASCADE ON DELETE RESTRICT            
  83. )
  84.  
  85. create table advance(
  86.      advandceId int not null auto_increment,
  87.        candidateId int,
  88.        photo int,
  89.        sms int,
  90.        treatcv int,
  91.        primary key (advandceId),
  92.      foreign key(candidateId)
  93.        references personal(candidateId)
  94.        ON UPDATE CASCADE ON DELETE RESTRICT            
  95. )

Raw Paste


Login or Register to edit or fork this paste. It's free.