Hi,

Split frequently used columns from other non frequently used. Splitting them 
will improve the disk access. You don't need to separate as too many tables. 
You need to index all the tables if you split into many.

Saravanan



--- On Fri, 1/18/08, Alex K <[EMAIL PROTECTED]> wrote:

> From: Alex K <[EMAIL PROTECTED]>
> Subject: basic style shema question
> To: mysql@lists.mysql.com
> Date: Friday, January 18, 2008, 11:14 PM
> Hi Guys,
> 
> Let's suppose I have the following table:
> 
> create table companies
> (
>     id              int(11) not null auto_increment primary
> key,
> 
>     # user's login and password
>     email           varchar(100),
>     password        varchar(100),
> 
>     # basic information
>     company_name    varchar(100),
>     contact_name    varchar(100),
>     street          varchar(100),
>     city            varchar(100),
>     state           varchar(7),
>     zip             varchar(13),
>     phone           varchar(25),
> 
>     # user's company description
>     description     text,
>     category_other  text,
> 
>     # localization
>     desired_zip     varchar(7),
>     latitude        dec(10,7),
>     longitude       dec(10,7),
> 
>     # user's personalized options
>     url             varchar(200) not null unique,
>     logo_md5        varchar(32),
>     linked_url      varchar(200),
>     color_bgrd      varchar(16),
> 
>     # content moderation (null if nothing, 1 for new, 2 for
> updates)
>     updates         smallint,
>     banned          boolean
> );
> 
> Would you keep this as one table or would you split it into
> multiple
> tables such as users, company localizations, personalized
> options and
> moderation which would hold each the fields under each
> comment
> together with a company_id? The first way of doing it is
> easier to
> update because I would not have to update all the other
> linked tables.
> But the other way of doing seems cleaner.
> 
> To summarize one table vs. many tables with one to one
> relations?
> 
> Thank you,
> 
> Alex
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:   
> http://lists.mysql.com/[EMAIL PROTECTED]


      
____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to