If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Please help me to design database for job site

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-05-10, 04:07
linux1880 linux1880 is offline
Registered User
 
Join Date: Jul 2010
Posts: 39
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`)
)
Reply With Quote
  #2 (permalink)  
Old 08-05-10, 04:54
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by linux1880 View Post
How do I achieve it ?
add a country column to the jobs table

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 08-05-10, 15:08
linux1880 linux1880 is offline
Registered User
 
Join Date: Jul 2010
Posts: 39
Thank you sir, how can i optimize these tables from search perspectives ?
Reply With Quote
  #4 (permalink)  
Old 08-05-10, 15:21
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Tags
job

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On