Hi All, I agree with Sean about the PK name, except I never add ID. Making it derivative of the table makes it its use as a Foreign Key clearer.
i.e. Client Table Client (PK) Last Name . . . SalePerson Table SalesPerson (PK) Last Name . . . SalePersonClient Table SalesPersonClient (PK) SalesPerson (FK) Client (FK) I also agree with the self generate PKs, especially when adding parents and children. Scott Sean Cross wrote: > Firstly I have never understood why people want to have the same name for the > primary key column of different tables. My policy is to use the table name > followed by ID. Eg ClientId, EmployeeId etc. The only good reason I know of > for using the same name, is that it makes object persistence easier. > > Re the uniqueness, I am now moving to making the id's globally unique. I > create them in code and assign them when required. In part this is because I > am moving to using tiOPF, but I am also doing it as a general move. > >> I am firm believer that all tables' starts with one column, I my case I >> always call the column UID. The UID is a Unique Identifier. This way I __________________________________________________ Delphi-Talk mailing list -> Delphi-Talk@elists.org http://www.elists.org/mailman/listinfo/delphi-talk