Xref: alice comp.databases.oracle.misc:54232
Path: alice!news-feed.fnsi.net!hammer.uoregon.edu!logbridge.uoregon.edu!news.nero.net!news.uidaho.edu!sea-feed.news.verio.net!news.sierra.com!not-for-mail
From: "Steve McDaniels" <steve.mcdaniels@sierra.com>
Newsgroups: comp.databases.oracle.misc
Subject: Re: Newbie Question: field length
Date: Fri, 3 Mar 2000 12:02:59 -0800
Organization: Sierra On-Line, Inc.
Lines: 82
Message-ID: <89p63q$1u4$1@plo.sierra.com>
References: <89j0hn$bnu$1@tesla.a2000.nl>
X-Trace: plo.sierra.com 952114106 1988 209.67.71.100 (3 Mar 2000 20:08:26 GMT)
X-Complaints-To: usenet@plo.sierra.com
NNTP-Posting-Date: 3 Mar 2000 20:08:26 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700

for US + Canadian addresses, consider

address_line1
address_line2
city
state
postal_code (this is a better name than zip code)
country

also, what about e-mail addresses?

btw:  unless you are allowing the same logical address to appear in your
addresses table
more than once, you may want to consider first standardizing the address so
that you can
deduplicate at the address level.

("123 West Main Street"  is logically the same as "123 W Main St", etc)

Also, the middle_name field should be the same size as the firstname field
(consider:  John J Jones  and J John Jones)

A (very) simple sketch of a name address schema

NAMES_TABLE
name_id (PK)
address_id (FK)
name info...

ADDRESSES_TABLE
address id (PK)
street (line 1, line 2, apartment/bldg, etc)  info
city_state_id (FK)
do_not_mail_flag

CITY_STATE_TABLE
city_state_id (PK)
city (allow aliases)
state

TELEPHONE_TABLE
telephone_id (PK)
name_id (FK)
telephone_type (fax, daytime, nighttime, etc)
do_not_telephone_flag

EMAIL_TABLE
email_id (PK)
email_address
do_not_email_flag


good luck
--Steve.


"J. Park" <johan_park@hotmail.com> wrote in message
news:89j0hn$bnu$1@tesla.a2000.nl...
> I'm making my first oracle database
> and I am wondering for example
> what should be the the length of some fields
>
> this what I have at this moment.
> firstname (50 chars)
> surname (50 chars)
> initials (15 chars)
> telephone (20 chars)
> fax (20 chars)
> street (50 chars)
> zipcode (10 chars)
> city (50 chars)
> country (50 chars)
>
> Are they to long ( or to short ) ?
>
> thanks in advance,
> Johan (from Amsterdam, the Nethelands)
>
>
>


