[thelist] Q on databases

Jonathan Cone JCone at municode.com
Fri Mar 12 05:47:00 CST 2004


My first thought on this is to creat a contact method table, a list table with the types of contact methods.  Have a field in your job table that holds the foreign key of the contact method.  This will keep you from limiting your contact methods, in case one day there's a third or fourth way.  All you have to do at that point is drop in another contact method in your contact methods table instead of creating a new field and a new way to deal with it in all your queries and stored procedures.
	my 2c

-Jonathan

-----Original Message-----
From: jsWalter [mailto:jsWalter at torres.ws]
Sent: Thursday, March 11, 2004 10:18 AM
To: thelist at lists.evolt.org
Subject: [thelist] Q on databases


I have to create a "job board" type of site.

I'm thinking about the database right now.

I figure I'd have 2 tables...
  - employer                  - jobs
    - emp_id                    - job_id
    - emp_name                  - emp_id
    - emp_addr_1                - job_position
    - emp_addr_2                - job_title
    - emp_city                  - job_ck_desc
    - emp_st                    - job_ck_mail (bol)
    - emp_zip                   - job_ck_phone (bol)
    - emp_contact               - job_ck_fax (bol)
    - emp_phone                 - job_ck_email (bol)
    - emp_fax                     or
    - emp_email                 -  job_contac_method (bitmap value)


My real question here is contact method.

I've thought of 2 ways to do this:

 1) a column for each method, as a Boolean
 2) a single column with a bit map value indicating which method to use

The first method is easy (for a human) to read
The second is not

The first will nee to be expanded to include other contact types
The second will not, just program logic changes to handle new method.

How do you folks handle this type of thing?

Thanks

Walter

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 


More information about the thelist mailing list