Re: Schema

From: Robert Mibus <mibus.a.t.bigpond.com>
Date: Thu Feb 14 2002 - 19:03:30 EST

On Fri, 2002-02-15 at 00:41, Derrell.Lipman@UnwiredUniverse.com wrote:
> Erik Bågfors <erik@bagfors.nu> writes:
>
> > While we're at it why not try to be compatible with other major
> > contact-software. In my world that means evolution.
Me too ;-D

> > ...

> create table person (
> id int4 primary key,
> first_name varchar(32),
> last_name varchar(32),
> company varchar(64),
As suggested, I like the idea of using 'org' not 'company'.
(Not organi[sz]ation, saves spelling arguments :-)
> )
>
> create table contact_types (
> contact_type_id int4 primary key,
> contact_type_name varchar(32) -- e.g. home phone, work email, etc.
> )
Do you mean literally name="Home Email" or (eg)
name="mibus@bigpond.com"?

> create table contact (
> contact_id int4 primary key,
> person_id int4 not null references person,
> contact_type_id int4 not null references contact_types
If you meant name="Home Email", you'd surely need varchar(n)
contact_data = "mibus@bigpond.com"?
Otherwise you get either (a) the data, without knowing what it is, or
(b) what it is, and not the data!
(Or am I going nuts again :-)

> )

> Many of the fields that you suggest could be added as well. However, for the
> "Phone" field, I call those "contacts" (the name could be changed if that's
> confusing).
How about 'contact', 'contact_info_types', and 'contact_info'
respectively? (Assuming I've gotten their use right :).

<snip explanation>
Sounds like I thought then...

> Cheers,
>
> Derrell
mibus

-- 
Robert Mibus <mibus@bigpond.com>
Did you hear that two rabbits escaped from the zoo and so far they have
only recaptured 116 of them?
Received on Thu Feb 14 16:03:33 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:41:27 EDT