Re: Index for username/password
- From: "David Portas" <REMOVE_BEFORE_REPLYING_dportas@xxxxxxx>
- Date: 28 Dec 2005 07:15:51 -0800
David Portas wrote:
> Cecil wrote:
>
> > >>I don't see the purpose of the ID column? Why not make the name the primary
> > >>key?
> >
> > I was thinking of doing that, but I intend for the Logon table to be
> > like an ID card. Only for efficient identification. I wanted to reuse
> > this table design in multiple projects that would require
> > authentication.
> >
>
> Name would still be unique though wouldn't it? So it should still have
> a unique constraint on name.
>
Apologies, I see that you have declared a unique INDEX on name. A
unique CONSTRAINT is virtually equivalent however and is usually the
preferred choice rather than an index.
--
David Portas
SQL Server MVP
--
.
- Follow-Ups:
- Re: Index for username/password
- From: Cecil
- Re: Index for username/password
- References:
- Index for username/password
- From: Cecil
- Re: Index for username/password
- From: Erland Sommarskog
- Re: Index for username/password
- From: Cecil
- Re: Index for username/password
- From: David Portas
- Index for username/password
- Prev by Date: Re: Index for username/password
- Next by Date: Re: Moving SQL Server to a new drive
- Previous by thread: Re: Index for username/password
- Next by thread: Re: Index for username/password
- Index(es):
Relevant Pages
|