Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Posts
    39

    Unanswered: Please help me to design database for job site

    Hi all, I would like this job site to list result according to country, and search jobs according to country. How do I achieve it ? So far, I have normalised this far, I don't know how to do countrywise. pls help

    Code:
    CREATE TABLE `categories` (
      `id` int(11) NOT NULL auto_increment,
      `name` varchar(255) default NULL,
      PRIMARY KEY  (`id`)
    );
    
    
    CREATE TABLE `jobs` (
      `id` int(11) NOT NULL auto_increment,
      `category_id` int(11) default NULL,
      `title` varchar(250) default NULL,
      `description` text,
      `location` varchar(100) default NULL,
      `company` varchar(100) default NULL,
      `posted` decimal(10,0) default NULL,
      `type` varchar(30) default NULL,
      `email` varchar(250) default NULL,
      `url` varchar(250) default NULL,
      PRIMARY KEY  (`id`)
    );
    
    CREATE TABLE `employers` (
     `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
     `group_id` mediumint(8) unsigned NOT NULL,
     `username` varchar(15) NOT NULL,
     `password` varchar(40) NOT NULL,
     `salt` varchar(40) DEFAULT NULL,
     `email` varchar(40) NOT NULL,
     `created_on` int(11) unsigned NOT NULL,
     `last_login` int(11) unsigned DEFAULT NULL,
     `active` int(1) unsigned DEFAULT NULL,
     PRIMARY KEY (`id`)
    )

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by linux1880 View Post
    How do I achieve it ?
    add a country column to the jobs table

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2010
    Posts
    39
    Thank you sir, how can i optimize these tables from search perspectives ?

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by linux1880 View Post
    Thank you sir, how can i optimize these tables from search perspectives ?
    that depends on the query, doesn't it
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •