Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Naming standard for Primary Key having two fields
Tue, Jul 30 2013 12:03 AMPermanent Link

Peter Evans

I plan on having a Primary Key made up of two fields.

So I plan on having something like:-

  CONSTRAINT "Person_Surname_PrimaryKey" PRIMARY KEY ("Person", "Surname")

The 2 fields are Person and Surname.

So is the naming convention in ElevateDB to call the key
"Person_Surname_PrimaryKey" ?

Regards,
  Peter Evans
Tue, Jul 30 2013 6:29 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Peter,

I don't know if there is any naming convention, I just call them "PrimaryKey" or sometimes "PK" as there is always only one in each table. For the Foreign Key constraints I call them FK<FirstColumn> or FK<FirstColumn><SecondColumn> if needed.

--
Fernando Dias
[Team Elevate]
Tue, Jul 30 2013 7:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Peter


I'm a bit like Fernando and use PK for the primary key.

All my column names start with _. I use persistent fields a lot and its easy then to see where the table name stops and the column name starts

For foreign keys the columns are named _fktablename (so _fkCompanies, _fkContacts)

Any other index is named sort of descriptively - but short since I'll probably never have to look at or remember it

Roy Lambert
Tue, Jul 30 2013 7:29 PMPermanent Link

Peter Evans

Thanks for the feedback.
I will go with the shortened PK instead of PrimaryKey and see how that
works.

Regards,
  Peter Evans
Image