Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.software.database > #2998

Re: Tipo di dati e prestazioni

Path csiph.com!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From Marco aka FreCho <ppillo.test@tiscali.it>
Newsgroups it.comp.software.database
Subject Re: Tipo di dati e prestazioni
Date Mon, 30 May 2016 15:26:05 +0000 (UTC)
Organization Aioe.org NNTP Server
Lines 37
Message-ID <nihm2d$158s$1@gioia.aioe.org> (permalink)
References <nie3r6$4mr$1@gioia.aioe.org>
NNTP-Posting-Host NJYc73kRy4AA8N8QGR6K5A.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Complaints-To abuse@aioe.org
User-Agent Pan/0.136 (I'm far too busy being delicious; GIT 926a150 git://git.gnome.org/pan2)
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com it.comp.software.database:2998

Show key headers only | View raw


On Sun, 29 May 2016 08:56:37 +0200, Ruper wrote:

> Non sapevo bene come definire l'oggetto. Però non capisco vari esempi di
> DB che utilizzano questa semplice struttura.
> 
> 
> 
> Tabella Professioni
> 
> idProfessione PK Autoincr. Integer professione Varchar
> 
> 
> 
> Tabella Clienti
> 
> cod_fisc    PK nome cognome idProfessione FK Integer
> 
> 
> 
> La mia domanda è banale ma non ho trovato risposta su libri o
> pellegrinaggi vari. Che vantaggio c'è nell'avere nella tabella Clienti
> un integer al posto di un Varchar, cioè una tabella :
> 
> Tabella Clienti
> 
> cod_fisc    PK nome cognome professione Varchar
> 
> 
> Ruper

La FK DEVE puntare ad una colonna PK o UNIQUE.
La domanda dunque dovrebbe essere:

che vantaggio c'è nell'avere nella tabella Professioni
la colonna idProfessione con datatype autoincrement (che è un intero).

Back to it.comp.software.database | Previous | NextPrevious in thread | Find similar


Thread

Tipo di dati e prestazioni Ruper <ruper12548@email.it> - 2016-05-29 08:56 +0200
  Re: Tipo di dati e prestazioni enoquick <enoquick@gmail.com> - 2016-05-29 20:34 -0500
    Re: Tipo di dati e prestazioni Ruper <ruper12548@email.it> - 2016-05-30 17:34 +0200
  Re: Tipo di dati e prestazioni Marco aka FreCho <ppillo.test@tiscali.it> - 2016-05-30 15:26 +0000

csiph-web