> > Disclaimer: SQL/database newbie here.
>
> Nothing wrong with being a newbie :-)
Thanks for the help.
> > Let's say I have a table of authors with columns for last name and first
> > name. Is there any general guideline re using a separate
> integer for the
> > primary key as opposed to a co
> That's not really true. You can use an auto_increment field as the primary
> key and create a seperate UNIQUE index that combines both the firstname and
> lastname fields that will be inforced for inserts.
> Usually its easier to work with integers as primary keys, especially when
> you referen
> > Let's say I have a table of authors with columns for last name and first
> > name. Is there any general guideline re using a separate integer for the
> > primary key as opposed to a combination of the last and first names as the
> > key? I ask because by using the names, this would prevent d
> Disclaimer: SQL/database newbie here.
Nothing wrong with being a newbie :-)
> Let's say I have a table of authors with columns for last name and first
> name. Is there any general guideline re using a separate integer for the
> primary key as opposed to a combination of the last and first nam
Christian Stromberger wrote:
> Disclaimer: SQL/database newbie here.
>
> Let's say I have a table of authors with columns for last name and first
> name. Is there any general guideline re using a separate integer for the
> primary key as opposed to a combination of the last and first names as th
That's not really true. You can use an auto_increment field as the primary
key and create a seperate UNIQUE index that combines both the firstname and
lastname fields that will be inforced for inserts.
Usually its easier to work with integers as primary keys, especially when
you reference them in