INT OR VARCHAR - Mailing list pgsql-sql

From Martín Marqués
Subject INT OR VARCHAR
Date
Msg-id 20011205204142.AA74CFA61@bugs.unl.edu.ar
Whole thread Raw
Responses Re: INT OR VARCHAR
List pgsql-sql
I have a table that will be populated with machines of a net we have. And we 
have more then 1 domain, so we thought about putting a seperate table with 
the domains, and a reference in the nodes table to the apropiate domain.

The question is, should I put an SERIAL field in the domain table and use 
that as the PK, and use an INT reference in the nodes table?
Or is it a good idea to just leave the domain name (a CHAR(30) field) in the 
domain table and make the node.domain a CHAR(30) that references to 
domain.name?
What would be the best approche?

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-----------------------------------------------------------------
Martín Marqués                  |        mmarques@unl.edu.ar
Programador, Administrador, DBA |       Centro de Telematica                      Universidad Nacional
        del Litoral
 
-----------------------------------------------------------------


pgsql-sql by date:

Previous
From: Roberto Mello
Date:
Subject: Getting matching and non-matching results (long)
Next
From: "Aasmund Midttun Godal"
Date:
Subject: Re: INT OR VARCHAR