-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 28, 2019 at 08:53 AM
-- Server version: 10.1.28-MariaDB
-- PHP Version: 7.1.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `applicants`
--

-- --------------------------------------------------------

--
-- Table structure for table `applicants_education`
--

CREATE TABLE `applicants_education` (
  `id` int(20) NOT NULL,
  `applicant_id` int(50) NOT NULL,
  `qualification` varchar(255) NOT NULL,
  `institute` varchar(255) NOT NULL,
  `obtained_marks` int(10) NOT NULL,
  `total_marks` int(10) NOT NULL,
  `grade_devision` varchar(50) NOT NULL,
  `passing_year` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `applicants_profile`
--

CREATE TABLE `applicants_profile` (
  `id` int(50) NOT NULL,
  `name` varchar(255) NOT NULL,
  `father_name` varchar(255) NOT NULL,
  `age` varchar(255) NOT NULL,
  `postal_address` varchar(255) NOT NULL,
  `contact_no` varchar(15) NOT NULL,
  `cnic` varchar(15) NOT NULL,
  `d_o_b` varchar(50) NOT NULL,
  `religion` varchar(40) NOT NULL,
  `image` varchar(255) NOT NULL,
  `post_name` varchar(255) NOT NULL,
  `apply_date` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `applicants_work_experience`
--

CREATE TABLE `applicants_work_experience` (
  `id` int(11) NOT NULL,
  `applicant_id` int(50) NOT NULL,
  `department_name` varchar(255) NOT NULL,
  `govt_or_semi` varchar(255) NOT NULL,
  `post_held` varchar(100) NOT NULL,
  `service_duration` varchar(100) NOT NULL,
  `permanent_or_contract` varchar(100) NOT NULL,
  `desig_of_dptt` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `applicants_education`
--
ALTER TABLE `applicants_education`
  ADD PRIMARY KEY (`id`),
  ADD KEY `applicant_id` (`applicant_id`);

--
-- Indexes for table `applicants_profile`
--
ALTER TABLE `applicants_profile`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `applicants_work_experience`
--
ALTER TABLE `applicants_work_experience`
  ADD PRIMARY KEY (`id`),
  ADD KEY `applicant_id` (`applicant_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `applicants_education`
--
ALTER TABLE `applicants_education`
  MODIFY `id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

--
-- AUTO_INCREMENT for table `applicants_profile`
--
ALTER TABLE `applicants_profile`
  MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77;

--
-- AUTO_INCREMENT for table `applicants_work_experience`
--
ALTER TABLE `applicants_work_experience`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `applicants_education`
--
ALTER TABLE `applicants_education`
  ADD CONSTRAINT `applicants_education_ibfk_1` FOREIGN KEY (`applicant_id`) REFERENCES `applicants_profile` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `applicants_work_experience`
--
ALTER TABLE `applicants_work_experience`
  ADD CONSTRAINT `applicants_work_experience_ibfk_1` FOREIGN KEY (`applicant_id`) REFERENCES `applicants_profile` (`id`) ON DELETE CASCADE;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
