Ciprian Trofin writes:
>Basically I have some tables with only 2 fields (ID and name), and a
>central table, joined by a one-to-many relation. The key point here are the
>2-field tables. If I keep them separate, I can extend them (add new fields)
>without problem when need arise. But if there is no need for an extension
>(my case), all I get is a greater number of tables that I have to take care
>of. Wouldn't be better (maybe more efficient ?) to put all the 2-field
>tables in only table, with a separate ENUM field to separate the records on
>categories ?

Ciprian,
     There are two main purposes for normalization in this case.  The first
is to provide consistency of data.  Going back to your example, placing the
city name in each record allows the possibility of multiple spellings for
the city name, since each record has its own copy of the data.  The second
is space savings, since storing an int is usually 4 bytes at worst while a
city name is definitely more than 4 bytes.  Yes it does generate a second
table that only has the mappings from cityID to cityName, but you will likely
find it well worth the effort to use the mapping.
               Brad Eacker ([EMAIL PROTECTED])



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

Reply via email to